continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r652556 [2/3] - in /continuum/branches/continuum-jpa-evenisse: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/continuum/ src/main/java/org/apache/continuum/dao/ src/main/java/org/apach...
Date Thu, 01 May 2008 15:19:55 GMT
Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/SuiteResult.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/SuiteResult.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/SuiteResult.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/SuiteResult.java Thu May  1 08:19:53 2008
@@ -0,0 +1,136 @@
+package org.apache.continuum.model.scm;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import java.util.List;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ */
+@Entity
+@Table(name = "SUITE_RESULT")
+public class SuiteResult
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field name
+     */
+    @Basic
+    @Column(name = "NAME")
+    private String name;
+
+    /**
+     * Field testCount
+     */
+    @Basic
+    @Column(name = "TEST_COUNT")
+    private int testCount = 0;
+
+    /**
+     * Field failureCount
+     */
+    @Basic
+    @Column(name = "FAILURE_COUNT")
+    private int failureCount = 0;
+
+    /**
+     * Field totalTime
+     */
+    @Basic
+    @Column(name = "TOTAL_TIME")
+    private long totalTime = 0;
+
+    /**
+     * Field failures
+     */
+    @OneToMany
+    private List<TestCaseFailure> failures;
+
+    /**
+     * @return the name
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    /**
+     * @return the testCount
+     */
+    public int getTestCount()
+    {
+        return testCount;
+    }
+
+    /**
+     * @param testCount the testCount to set
+     */
+    public void setTestCount( int testCount )
+    {
+        this.testCount = testCount;
+    }
+
+    /**
+     * @return the failureCount
+     */
+    public int getFailureCount()
+    {
+        return failureCount;
+    }
+
+    /**
+     * @param failureCount the failureCount to set
+     */
+    public void setFailureCount( int failureCount )
+    {
+        this.failureCount = failureCount;
+    }
+
+    /**
+     * @return the totalTime
+     */
+    public long getTotalTime()
+    {
+        return totalTime;
+    }
+
+    /**
+     * @param totalTime the totalTime to set
+     */
+    public void setTotalTime( long totalTime )
+    {
+        this.totalTime = totalTime;
+    }
+
+    /**
+     * @return the failures
+     */
+    public List<TestCaseFailure> getFailures()
+    {
+        return failures;
+    }
+
+    /**
+     * @param failures the failures to set
+     */
+    public void setFailures( List<TestCaseFailure> failures )
+    {
+        this.failures = failures;
+    }
+
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/SuiteResult.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/SuiteResult.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestCaseFailure.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestCaseFailure.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestCaseFailure.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestCaseFailure.java Thu May  1 08:19:53 2008
@@ -0,0 +1,66 @@
+package org.apache.continuum.model.scm;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ */
+@Entity
+@Table(name = "TEST_CASE_FAILURE")
+public class TestCaseFailure
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field name
+     */
+    @Basic
+    @Column(name = "NAME")
+    private String name;
+
+    /**
+     * Field exception
+     */
+    @Basic
+    @Column(name = "EXCEPTION")
+    private String exception;
+
+    /**
+     * @return the name
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    /**
+     * @return the exception
+     */
+    public String getException()
+    {
+        return exception;
+    }
+
+    /**
+     * @param exception the exception to set
+     */
+    public void setException( String exception )
+    {
+        this.exception = exception;
+    }
+
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestCaseFailure.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestCaseFailure.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestResult.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestResult.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestResult.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestResult.java Thu May  1 08:19:53 2008
@@ -0,0 +1,113 @@
+package org.apache.continuum.model.scm;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import java.util.List;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ */
+@Entity
+@Table(name = "TEST_RESULT")
+public class TestResult
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field testCount
+     */
+    @Basic
+    @Column(name = "TEST_COUNT", nullable = false)
+    private int testCount = 0;
+
+    /**
+     * Field failureCount
+     */
+    @Basic
+    @Column(name = "FAILURE_COUNT", nullable = false)
+    private int failureCount = 0;
+
+    /**
+     * Field totalTime
+     */
+    @Basic
+    @Column(name = "TOTAL_TIME", nullable = false)
+    private long totalTime = 0;
+
+    /**
+     * Field suiteResults
+     */
+    @OneToMany
+    private List<SuiteResult> suiteResults;
+
+    /**
+     * @return the testCount
+     */
+    public int getTestCount()
+    {
+        return testCount;
+    }
+
+    /**
+     * @param testCount the testCount to set
+     */
+    public void setTestCount( int testCount )
+    {
+        this.testCount = testCount;
+    }
+
+    /**
+     * @return the failureCount
+     */
+    public int getFailureCount()
+    {
+        return failureCount;
+    }
+
+    /**
+     * @param failureCount the failureCount to set
+     */
+    public void setFailureCount( int failureCount )
+    {
+        this.failureCount = failureCount;
+    }
+
+    /**
+     * @return the totalTime
+     */
+    public long getTotalTime()
+    {
+        return totalTime;
+    }
+
+    /**
+     * @param totalTime the totalTime to set
+     */
+    public void setTotalTime( long totalTime )
+    {
+        this.totalTime = totalTime;
+    }
+
+    /**
+     * @return the suiteResults
+     */
+    public List<SuiteResult> getSuiteResults()
+    {
+        return suiteResults;
+    }
+
+    /**
+     * @param suiteResults the suiteResults to set
+     */
+    public void setSuiteResults( List<SuiteResult> suiteResults )
+    {
+        this.suiteResults = suiteResults;
+    }
+
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestResult.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestResult.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/ContinuumDatabase.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/ContinuumDatabase.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/ContinuumDatabase.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/ContinuumDatabase.java Thu May  1 08:19:53 2008
@@ -0,0 +1,290 @@
+package org.apache.continuum.model.system;
+
+import java.io.Serializable;
+
+import org.apache.continuum.model.project.ProjectGroup;
+import org.apache.continuum.model.project.Schedule;
+
+/**
+ * This is not an entity.
+ * 
+ * @version $Revision$ $Date$
+ */
+public class ContinuumDatabase implements Serializable
+{
+
+    /**
+     * Field projectGroups
+     */
+    private java.util.List projectGroups;
+
+    /**
+     * Field systemConfiguration
+     */
+    private SystemConfiguration systemConfiguration;
+
+    /**
+     * Field installations
+     */
+    private java.util.List installations;
+
+    /**
+     * Field schedules
+     */
+    private java.util.List schedules;
+
+    /**
+     * Field profiles
+     */
+    private java.util.List profiles;
+
+    // -----------/
+    // - Methods -/
+    // -----------/
+
+    /**
+     * Method addInstallation
+     * 
+     * @param installation
+     */
+    public void addInstallation( Installation installation )
+    {
+        if ( !( installation instanceof Installation ) )
+        {
+            throw new ClassCastException(
+                                          "ContinuumDatabase.addInstallations(installation) parameter must be instanceof "
+                                                          + Installation.class.getName() );
+        }
+        getInstallations().add( installation );
+    } // -- void addInstallation(Installation)
+
+    /**
+     * Method addProfile
+     * 
+     * @param profile
+     */
+    public void addProfile( Profile profile )
+    {
+        if ( !( profile instanceof Profile ) )
+        {
+            throw new ClassCastException( "ContinuumDatabase.addProfiles(profile) parameter must be instanceof "
+                            + Profile.class.getName() );
+        }
+        getProfiles().add( profile );
+    } // -- void addProfile(Profile)
+
+    /**
+     * Method addProjectGroup
+     * 
+     * @param projectGroup
+     */
+    public void addProjectGroup( ProjectGroup projectGroup )
+    {
+        if ( !( projectGroup instanceof ProjectGroup ) )
+        {
+            throw new ClassCastException(
+                                          "ContinuumDatabase.addProjectGroups(projectGroup) parameter must be instanceof "
+                                                          + ProjectGroup.class.getName() );
+        }
+        getProjectGroups().add( projectGroup );
+    } // -- void addProjectGroup(ProjectGroup)
+
+    /**
+     * Method addSchedule
+     * 
+     * @param schedule
+     */
+    public void addSchedule( Schedule schedule )
+    {
+        if ( !( schedule instanceof Schedule ) )
+        {
+            throw new ClassCastException( "ContinuumDatabase.addSchedules(schedule) parameter must be instanceof "
+                            + Schedule.class.getName() );
+        }
+        getSchedules().add( schedule );
+    } // -- void addSchedule(Schedule)
+
+    /**
+     * Method getInstallations
+     */
+    public java.util.List getInstallations()
+    {
+        if ( this.installations == null )
+        {
+            this.installations = new java.util.ArrayList();
+        }
+
+        return this.installations;
+    } // -- java.util.List getInstallations()
+
+    /**
+     * Method getProfiles
+     */
+    public java.util.List getProfiles()
+    {
+        if ( this.profiles == null )
+        {
+            this.profiles = new java.util.ArrayList();
+        }
+
+        return this.profiles;
+    } // -- java.util.List getProfiles()
+
+    /**
+     * Method getProjectGroups
+     */
+    public java.util.List getProjectGroups()
+    {
+        if ( this.projectGroups == null )
+        {
+            this.projectGroups = new java.util.ArrayList();
+        }
+
+        return this.projectGroups;
+    } // -- java.util.List getProjectGroups()
+
+    /**
+     * Method getSchedules
+     */
+    public java.util.List getSchedules()
+    {
+        if ( this.schedules == null )
+        {
+            this.schedules = new java.util.ArrayList();
+        }
+
+        return this.schedules;
+    } // -- java.util.List getSchedules()
+
+    /**
+     * Get null
+     */
+    public SystemConfiguration getSystemConfiguration()
+    {
+        return this.systemConfiguration;
+    } // -- SystemConfiguration getSystemConfiguration()
+
+    /**
+     * Method removeInstallation
+     * 
+     * @param installation
+     */
+    public void removeInstallation( Installation installation )
+    {
+        if ( !( installation instanceof Installation ) )
+        {
+            throw new ClassCastException(
+                                          "ContinuumDatabase.removeInstallations(installation) parameter must be instanceof "
+                                                          + Installation.class.getName() );
+        }
+        getInstallations().remove( installation );
+    } // -- void removeInstallation(Installation)
+
+    /**
+     * Method removeProfile
+     * 
+     * @param profile
+     */
+    public void removeProfile( Profile profile )
+    {
+        if ( !( profile instanceof Profile ) )
+        {
+            throw new ClassCastException( "ContinuumDatabase.removeProfiles(profile) parameter must be instanceof "
+                            + Profile.class.getName() );
+        }
+        getProfiles().remove( profile );
+    } // -- void removeProfile(Profile)
+
+    /**
+     * Method removeProjectGroup
+     * 
+     * @param projectGroup
+     */
+    public void removeProjectGroup( ProjectGroup projectGroup )
+    {
+        if ( !( projectGroup instanceof ProjectGroup ) )
+        {
+            throw new ClassCastException(
+                                          "ContinuumDatabase.removeProjectGroups(projectGroup) parameter must be instanceof "
+                                                          + ProjectGroup.class.getName() );
+        }
+        getProjectGroups().remove( projectGroup );
+    } // -- void removeProjectGroup(ProjectGroup)
+
+    /**
+     * Method removeSchedule
+     * 
+     * @param schedule
+     */
+    public void removeSchedule( Schedule schedule )
+    {
+        if ( !( schedule instanceof Schedule ) )
+        {
+            throw new ClassCastException( "ContinuumDatabase.removeSchedules(schedule) parameter must be instanceof "
+                            + Schedule.class.getName() );
+        }
+        getSchedules().remove( schedule );
+    } // -- void removeSchedule(Schedule)
+
+    /**
+     * Set null
+     * 
+     * @param installations
+     */
+    public void setInstallations( java.util.List installations )
+    {
+        this.installations = installations;
+    } // -- void setInstallations(java.util.List)
+
+    /**
+     * Set null
+     * 
+     * @param profiles
+     */
+    public void setProfiles( java.util.List profiles )
+    {
+        this.profiles = profiles;
+    } // -- void setProfiles(java.util.List)
+
+    /**
+     * Set null
+     * 
+     * @param projectGroups
+     */
+    public void setProjectGroups( java.util.List projectGroups )
+    {
+        this.projectGroups = projectGroups;
+    } // -- void setProjectGroups(java.util.List)
+
+    /**
+     * Set null
+     * 
+     * @param schedules
+     */
+    public void setSchedules( java.util.List schedules )
+    {
+        this.schedules = schedules;
+    } // -- void setSchedules(java.util.List)
+
+    /**
+     * Set null
+     * 
+     * @param systemConfiguration
+     */
+    public void setSystemConfiguration( SystemConfiguration systemConfiguration )
+    {
+        this.systemConfiguration = systemConfiguration;
+    } // -- void setSystemConfiguration(SystemConfiguration)
+
+    private String modelEncoding = "UTF-8";
+
+    public void setModelEncoding( String modelEncoding )
+    {
+        this.modelEncoding = modelEncoding;
+    }
+
+    public String getModelEncoding()
+    {
+        return modelEncoding;
+    }
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/ContinuumDatabase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/ContinuumDatabase.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Installation.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Installation.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Installation.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Installation.java Thu May  1 08:19:53 2008
@@ -0,0 +1,114 @@
+package org.apache.continuum.model.system;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ */
+@Entity
+@Table(name = "INSTALLATION")
+public class Installation
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field type
+     * <p/>
+     * TODO: Enum?
+     */
+    @Basic
+    @Column(name = "INSTALLATION_TYPE")
+    private String type;
+
+    /**
+     * Field varValue
+     */
+    @Basic
+    @Column(name = "VAR_VALUE")
+    private String varValue;
+
+    /**
+     * Field varName
+     */
+    @Basic
+    @Column(name = "VAR_NAME")
+    private String varName;
+
+    /**
+     * Field name
+     */
+    @Basic
+    @Column(name = "NAME")
+    private String name;
+
+    /**
+     * @return the type
+     */
+    public String getType()
+    {
+        return type;
+    }
+
+    /**
+     * @param type the type to set
+     */
+    public void setType( String type )
+    {
+        this.type = type;
+    }
+
+    /**
+     * @return the varValue
+     */
+    public String getVarValue()
+    {
+        return varValue;
+    }
+
+    /**
+     * @param varValue the varValue to set
+     */
+    public void setVarValue( String varValue )
+    {
+        this.varValue = varValue;
+    }
+
+    /**
+     * @return the varName
+     */
+    public String getVarName()
+    {
+        return varName;
+    }
+
+    /**
+     * @param varName the varName to set
+     */
+    public void setVarName( String varName )
+    {
+        this.varName = varName;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Installation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Installation.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/NotificationAddress.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/NotificationAddress.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/NotificationAddress.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/NotificationAddress.java Thu May  1 08:19:53 2008
@@ -0,0 +1,94 @@
+package org.apache.continuum.model.system;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+/**
+ * Configures one method for notifying users/developers when a build breaks.
+ *
+ * @version $Id$
+ */
+@Entity
+@Table(name = "NOTIFICATION_ADDRESS")
+public class NotificationAddress
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field type
+     * <p/>
+     * TODO: Enum?
+     */
+    @Basic
+    @Column(name = "ADDRESS_TYPE")
+    private String type = "mail";
+
+    /**
+     * Field address
+     */
+    @Basic
+    @Column(name = "ADDRESS")
+    private String address;
+
+    /**
+     * Field configuration
+     * <p/>
+     * TODO: Map!
+     */
+    @Transient
+    private java.util.Map configuration;
+
+    /**
+     * @return the type
+     */
+    public String getType()
+    {
+        return type;
+    }
+
+    /**
+     * @param type the type to set
+     */
+    public void setType( String type )
+    {
+        this.type = type;
+    }
+
+    /**
+     * @return the address
+     */
+    public String getAddress()
+    {
+        return address;
+    }
+
+    /**
+     * @param address the address to set
+     */
+    public void setAddress( String address )
+    {
+        this.address = address;
+    }
+
+    /**
+     * @return the configuration
+     */
+    public java.util.Map getConfiguration()
+    {
+        return configuration;
+    }
+
+    /**
+     * @param configuration the configuration to set
+     */
+    public void setConfiguration( java.util.Map configuration )
+    {
+        this.configuration = configuration;
+    }
+
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/NotificationAddress.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/NotificationAddress.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Profile.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Profile.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Profile.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Profile.java Thu May  1 08:19:53 2008
@@ -0,0 +1,206 @@
+package org.apache.continuum.model.system;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.OneToMany;
+import javax.persistence.OneToOne;
+import javax.persistence.Table;
+import java.util.List;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ */
+@Entity
+@Table(name = "PROFILE")
+public class Profile
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field active
+     */
+    @Basic
+    @Column(name = "FLG_ACTIVE", nullable = false)
+    private boolean active = false;
+
+    /**
+     * Field name
+     */
+    @Basic
+    @Column(name = "NAME", nullable = false)
+    private String name;
+
+    /**
+     * Field description
+     */
+    @Basic
+    @Column(name = "DESCRIPTION")
+    private String description;
+
+    /**
+     * Field scmMode
+     * <p/>
+     * TODO: Enum?
+     */
+    @Basic
+    @Column(name = "SCM_MODE", nullable = false)
+    private int scmMode = 0;
+
+    /**
+     * Field buildWithoutChanges
+     */
+    @Basic
+    @Column(name = "FLG_BUILD_WITHOUT_CHANGES", nullable = false)
+    private boolean buildWithoutChanges = false;
+
+    /**
+     * Field jdk
+     */
+    @OneToOne
+    private Installation jdk;
+
+    /**
+     * Field builder
+     */
+    @OneToOne
+    private Installation builder;
+
+    /**
+     * Field environmentVariables
+     */
+    @OneToMany
+    private List<Installation> environmentVariables;
+
+    /**
+     * @return the active
+     */
+    public boolean isActive()
+    {
+        return active;
+    }
+
+    /**
+     * @param active the active to set
+     */
+    public void setActive( boolean active )
+    {
+        this.active = active;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    /**
+     * @return the description
+     */
+    public String getDescription()
+    {
+        return description;
+    }
+
+    /**
+     * @param description the description to set
+     */
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
+    /**
+     * @return the scmMode
+     */
+    public int getScmMode()
+    {
+        return scmMode;
+    }
+
+    /**
+     * @param scmMode the scmMode to set
+     */
+    public void setScmMode( int scmMode )
+    {
+        this.scmMode = scmMode;
+    }
+
+    /**
+     * @return the buildWithoutChanges
+     */
+    public boolean isBuildWithoutChanges()
+    {
+        return buildWithoutChanges;
+    }
+
+    /**
+     * @param buildWithoutChanges the buildWithoutChanges to set
+     */
+    public void setBuildWithoutChanges( boolean buildWithoutChanges )
+    {
+        this.buildWithoutChanges = buildWithoutChanges;
+    }
+
+    /**
+     * @return the jdk
+     */
+    public Installation getJdk()
+    {
+        return jdk;
+    }
+
+    /**
+     * @param jdk the jdk to set
+     */
+    public void setJdk( Installation jdk )
+    {
+        this.jdk = jdk;
+    }
+
+    /**
+     * @return the builder
+     */
+    public Installation getBuilder()
+    {
+        return builder;
+    }
+
+    /**
+     * @param builder the builder to set
+     */
+    public void setBuilder( Installation builder )
+    {
+        this.builder = builder;
+    }
+
+    /**
+     * @return the environmentVariables
+     */
+    public List<Installation> getEnvironmentVariables()
+    {
+        return environmentVariables;
+    }
+
+    /**
+     * @param environmentVariables the environmentVariables to set
+     */
+    public void setEnvironmentVariables( List<Installation> environmentVariables )
+    {
+        this.environmentVariables = environmentVariables;
+    }
+
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Profile.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Profile.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/SystemConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/SystemConfiguration.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/SystemConfiguration.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/SystemConfiguration.java Thu May  1 08:19:53 2008
@@ -0,0 +1,204 @@
+package org.apache.continuum.model.system;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ */
+@Entity
+@Table(name = "SYSTEM_CONFIGURATION")
+public class SystemConfiguration
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field guestAccountEnabled
+     */
+    @Basic
+    @Column(name = "FLG_GUEST_ACCOUNT_ENABLED", nullable = false)
+    private boolean guestAccountEnabled = true;
+
+    /**
+     * Field defaultScheduleDescription
+     */
+    @Basic
+    @Column(name = "DEFAULT_SCHEDULE_DESC", nullable = false)
+    private String defaultScheduleDescription = "Run hourly";
+
+    /**
+     * Field defaultScheduleCronExpression
+     */
+    @Basic
+    @Column(name = "DEFAULT_SCHEDULE_CRON_EXP", nullable = false)
+    private String defaultScheduleCronExpression = "0 0 * * * ?";
+
+    /**
+     * Field workingDirectory
+     */
+    @Basic
+    @Column(name = "WORKING_DIRECTORY", nullable = false)
+    private String workingDirectory = "working-directory";
+
+    /**
+     * Field buildOutputDirectory
+     */
+    @Basic
+    @Column(name = "BUILD_OUTPUT_DIRECTORY", nullable = false)
+    private String buildOutputDirectory = "build-output-directory";
+
+    /**
+     * Field deploymentRepositoryDirectory
+     */
+    @Basic
+    @Column(name = "DEPLOYMENT_REPOSITORY_DIRECTORY")
+    private String deploymentRepositoryDirectory;
+
+    /**
+     * Field baseUrl
+     */
+    @Basic
+    @Column(name = "BASE_URL")
+    private String baseUrl;
+
+    /**
+     * Field initialized
+     */
+    @Basic
+    @Column(name = "FLG_INITIALIZED", nullable = false)
+    private boolean initialized = false;
+
+    /**
+     * @return the guestAccountEnabled
+     */
+    public boolean isGuestAccountEnabled()
+    {
+        return guestAccountEnabled;
+    }
+
+    /**
+     * @param guestAccountEnabled the guestAccountEnabled to set
+     */
+    public void setGuestAccountEnabled( boolean guestAccountEnabled )
+    {
+        this.guestAccountEnabled = guestAccountEnabled;
+    }
+
+    /**
+     * @return the defaultScheduleDescription
+     */
+    public String getDefaultScheduleDescription()
+    {
+        return defaultScheduleDescription;
+    }
+
+    /**
+     * @param defaultScheduleDescription the defaultScheduleDescription to set
+     */
+    public void setDefaultScheduleDescription( String defaultScheduleDescription )
+    {
+        this.defaultScheduleDescription = defaultScheduleDescription;
+    }
+
+    /**
+     * @return the defaultScheduleCronExpression
+     */
+    public String getDefaultScheduleCronExpression()
+    {
+        return defaultScheduleCronExpression;
+    }
+
+    /**
+     * @param defaultScheduleCronExpression the defaultScheduleCronExpression to set
+     */
+    public void setDefaultScheduleCronExpression( String defaultScheduleCronExpression )
+    {
+        this.defaultScheduleCronExpression = defaultScheduleCronExpression;
+    }
+
+    /**
+     * @return the workingDirectory
+     */
+    public String getWorkingDirectory()
+    {
+        return workingDirectory;
+    }
+
+    /**
+     * @param workingDirectory the workingDirectory to set
+     */
+    public void setWorkingDirectory( String workingDirectory )
+    {
+        this.workingDirectory = workingDirectory;
+    }
+
+    /**
+     * @return the buildOutputDirectory
+     */
+    public String getBuildOutputDirectory()
+    {
+        return buildOutputDirectory;
+    }
+
+    /**
+     * @param buildOutputDirectory the buildOutputDirectory to set
+     */
+    public void setBuildOutputDirectory( String buildOutputDirectory )
+    {
+        this.buildOutputDirectory = buildOutputDirectory;
+    }
+
+    /**
+     * @return the deploymentRepositoryDirectory
+     */
+    public String getDeploymentRepositoryDirectory()
+    {
+        return deploymentRepositoryDirectory;
+    }
+
+    /**
+     * @param deploymentRepositoryDirectory the deploymentRepositoryDirectory to set
+     */
+    public void setDeploymentRepositoryDirectory( String deploymentRepositoryDirectory )
+    {
+        this.deploymentRepositoryDirectory = deploymentRepositoryDirectory;
+    }
+
+    /**
+     * @return the baseUrl
+     */
+    public String getBaseUrl()
+    {
+        return baseUrl;
+    }
+
+    /**
+     * @param baseUrl the baseUrl to set
+     */
+    public void setBaseUrl( String baseUrl )
+    {
+        this.baseUrl = baseUrl;
+    }
+
+    /**
+     * @return the initialized
+     */
+    public boolean isInitialized()
+    {
+        return initialized;
+    }
+
+    /**
+     * @param initialized the initialized to set
+     */
+    public void setInitialized( boolean initialized )
+    {
+        this.initialized = initialized;
+    }
+
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/SystemConfiguration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/SystemConfiguration.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectGroupService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectGroupService.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectGroupService.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectGroupService.java Thu May  1 08:19:53 2008
@@ -0,0 +1,35 @@
+package org.apache.continuum.service.api;
+
+import org.apache.continuum.model.project.Project;
+import org.apache.continuum.model.project.ProjectGroup;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public interface ProjectGroupService
+{
+    ProjectGroup saveOrUpdate( ProjectGroup projectGroup );
+
+    ProjectGroup getProjectGroup( long pgId );
+
+    ProjectGroup getProjectGroup( String groupId );
+
+    ProjectGroup addProjectGroup( ProjectGroup pg );
+
+    void removeProjectGroup( ProjectGroup pg );
+
+    void addProject( ProjectGroup pg, Project p );
+
+    void removeProject( ProjectGroup pg, Project p );
+
+    List<Project> getProjects( ProjectGroup pg );
+
+    //BuildResult buildProjectGroup( ProjectGroup pg );
+
+    //BuildResult buildProjectGroup( ProjectGroup, BuildDefinition bd );
+
+    //BuildResult buildProjectGroup( ProjectGroup, BuildDefinition bd, boolean force );
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectGroupService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectGroupService.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectService.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectService.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectService.java Thu May  1 08:19:53 2008
@@ -0,0 +1,33 @@
+package org.apache.continuum.service.api;
+
+import org.apache.continuum.model.project.Project;
+import org.apache.continuum.model.project.ProjectNotifier;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public interface ProjectService
+{
+    Project saveOrUpdate( Project project );
+
+    Project getProject( long projecId );
+
+    Project getProject( String groupId, String artifactId, String version );
+
+    List<ProjectNotifier> getNotifiers( Project p );
+
+    void addNotifier( Project p, ProjectNotifier notifier );
+
+    void removeNotifier( Project p, ProjectNotifier notifier );
+
+    //BuildDefinition getDefaultBuildDefinition( Project p );
+
+    //BuildResult buildProject( Project p );
+
+    //BuildResult buildProject( Project p, BuildDefinition bd );
+
+    //BuildResult buildProject( Project p, BuildDefinition bd, boolean force );
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectService.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectGroupServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectGroupServiceImpl.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectGroupServiceImpl.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectGroupServiceImpl.java Thu May  1 08:19:53 2008
@@ -0,0 +1,105 @@
+package org.apache.continuum.service.impl;
+
+import org.apache.continuum.dao.api.GenericDao;
+import org.apache.continuum.model.project.Project;
+import org.apache.continuum.model.project.ProjectGroup;
+import org.apache.continuum.service.api.ProjectGroupService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+@Service
+public class ProjectGroupServiceImpl
+    implements ProjectGroupService
+{
+    GenericDao<ProjectGroup> projectGroupDao;
+
+    GenericDao<Project> projectDao;
+
+    public ProjectGroup saveOrUpdate( ProjectGroup projectGroup )
+    {
+        return projectGroupDao.saveOrUpdate( projectGroup );
+    }
+
+    public ProjectGroup getProjectGroup( long pgId )
+    {
+        return projectGroupDao.findById( pgId );
+    }
+
+    public ProjectGroup getProjectGroup( String groupId )
+    {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put( "groupId", groupId );
+        return projectGroupDao.findUniqByNamedQueryAndNamedParams( ProjectGroup.class, "ProjectGroup.findProjectGroup",
+                                                                   params );
+    }
+
+    public ProjectGroup addProjectGroup( ProjectGroup pg )
+    {
+        return projectGroupDao.saveOrUpdate( pg );
+    }
+
+    @Transactional
+    public void removeProjectGroup( ProjectGroup pg )
+    {
+        if ( pg == null )
+        {
+            return;
+        }
+
+        for ( Project p : pg.getProjects() )
+        {
+            projectDao.delete( p );
+        }
+
+        projectGroupDao.delete( pg );
+    }
+
+    public void addProject( ProjectGroup pg, Project p )
+    {
+        pg.addProject( p );
+        projectGroupDao.saveOrUpdate( pg );
+    }
+
+    @Transactional
+    public void removeProject( ProjectGroup pg, Project p )
+    {
+        pg.removeProject( p );
+        projectDao.delete( p );
+        projectGroupDao.saveOrUpdate( pg );
+    }
+
+    public List<Project> getProjects( ProjectGroup pg )
+    {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put( "projectGroup", pg );
+        return projectDao.findByNamedQueryAndNamedParams( Project.class, "ProjectGroup.findProjects", params );
+    }
+
+    public GenericDao<ProjectGroup> getProjectGroupDao()
+    {
+        return projectGroupDao;
+    }
+
+    public void setProjectGroupDao( GenericDao<ProjectGroup> projectGroupDao )
+    {
+        this.projectGroupDao = projectGroupDao;
+    }
+
+    public GenericDao<Project> getProjectDao()
+    {
+        return projectDao;
+    }
+
+    public void setProjectDao( GenericDao<Project> projectDao )
+    {
+        this.projectDao = projectDao;
+    }
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectGroupServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectGroupServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectServiceImpl.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectServiceImpl.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectServiceImpl.java Thu May  1 08:19:53 2008
@@ -0,0 +1,85 @@
+package org.apache.continuum.service.impl;
+
+import org.apache.continuum.dao.api.GenericDao;
+import org.apache.continuum.model.project.Project;
+import org.apache.continuum.model.project.ProjectNotifier;
+import org.apache.continuum.service.api.ProjectService;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class ProjectServiceImpl
+    implements ProjectService
+{
+    GenericDao<Project> projectDao;
+
+    GenericDao<ProjectNotifier> notifierDao;
+
+    public Project saveOrUpdate( Project project )
+    {
+        return projectDao.saveOrUpdate( project );
+    }
+
+    public Project getProject( long projecId )
+    {
+        return projectDao.findById( projecId );
+    }
+
+    public Project getProject( String groupId, String artifactId, String version )
+    {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put( "groupId", groupId );
+        params.put( "artifactId", artifactId );
+        params.put( "version", version );
+        return projectDao.findUniqByNamedQueryAndNamedParams( Project.class, "Project.find", params );
+    }
+
+    public List<ProjectNotifier> getNotifiers( Project p )
+    {
+        Map<String, Object> params = new HashMap<String, Object>();
+        params.put( "projectId", p.getId() );
+        return notifierDao.findByNamedQueryAndNamedParams( ProjectNotifier.class, "Notifier.findAllFromProject",
+                                                           params );
+    }
+
+    @Transactional
+    public void addNotifier( Project p, ProjectNotifier notifier )
+    {
+        p.addNotifier( notifier );
+        projectDao.saveOrUpdate( p );
+    }
+
+    @Transactional
+    public void removeNotifier( Project p, ProjectNotifier notifier )
+    {
+        p.removeNotifier( notifier );
+        notifierDao.delete( notifier );
+        projectDao.saveOrUpdate( p );
+    }
+
+    public GenericDao<Project> getProjectDao()
+    {
+        return projectDao;
+    }
+
+    public void setProjectDao( GenericDao<Project> projectDao )
+    {
+        this.projectDao = projectDao;
+    }
+
+    public GenericDao<ProjectNotifier> getNotifierDao()
+    {
+        return notifierDao;
+    }
+
+    public void setNotifierDao( GenericDao<ProjectNotifier> notifierDao )
+    {
+        this.notifierDao = notifierDao;
+    }
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/DeprecatedSystemStore.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/DeprecatedSystemStore.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/DeprecatedSystemStore.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/DeprecatedSystemStore.java Thu May  1 08:19:53 2008
@@ -0,0 +1,207 @@
+package org.apache.continuum.store.api;
+
+import java.util.List;
+
+import org.apache.continuum.model.project.Schedule;
+import org.apache.continuum.model.system.Installation;
+import org.apache.continuum.model.system.Profile;
+import org.apache.continuum.model.system.SystemConfiguration;
+
+/**
+ * Defines the contract consisting of operations that can be performed on following entities:
+ * <ul>
+ * <li>{@link Schedule},</li>
+ * <li>{@link Profile},</li>
+ * <li>{@link Installation},</li>
+ * <li>{@link SystemConfiguration}</li>
+ * </ul>
+ * 
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ * @since 1.1
+ */
+public interface DeprecatedSystemStore
+{
+    public static final String ROLE = DeprecatedSystemStore.class.getName();
+
+    /**
+     * Removes the passed {@link Installation} instance from the underlying store.
+     * 
+     * @param project
+     *            {@link Installation} instance to remove.
+     * @throws StoreException
+     *             if there was an error removing the entity.
+     */
+    public void deleteInstallation( Installation installation ) throws StoreException;
+
+    /**
+     * Removes the passed {@link Profile} instance from the underlying store.
+     * 
+     * @param project
+     *            {@link Profile} instance to remove.
+     * @throws StoreException
+     *             if there was an error removing the entity.
+     */
+    public void deleteProfile( Profile profile ) throws StoreException;
+
+    /**
+     * Removes the passed {@link Schedule} instance from the underlying store.
+     * 
+     * @param project
+     *            {@link Schedule} instance to remove.
+     * @throws StoreException
+     *             if there was an error removing the entity.
+     */
+    public void deleteSchedule( Schedule schedule ) throws StoreException;
+
+    /**
+     * Removes the passed {@link SystemConfiguration} instance from the underlying store.
+     * 
+     * @param project
+     *            {@link SystemConfiguration} instance to remove.
+     * @throws StoreException
+     *             if there was an error removing the entity.
+     */
+    public void deleteSystemConfiguration( SystemConfiguration systemConfiguration ) throws StoreException;
+
+    /**
+     * Looks up the underlying store and returns a {@link Installation} instance that matches the specified id.
+     * 
+     * @param id
+     *            {@link Installation} id to match.
+     * @return matching {@link Installation} instance.
+     * @throws EntityNotFoundException
+     *             if the instance could not be looked up.
+     * @throws StoreException
+     */
+    public Installation lookupInstallation( long id ) throws EntityNotFoundException, StoreException;
+
+    /**
+     * Looks up the underlying store and returns a {@link Profile} instance that matches the specified id.
+     * 
+     * @param id
+     *            {@link Profile} id to match.
+     * @return matching {@link Profile} instance.
+     * @throws EntityNotFoundException
+     *             if the instance could not be looked up.
+     * @throws StoreException
+     */
+    public Profile lookupProfile( long id ) throws EntityNotFoundException, StoreException;
+
+    /**
+     * Looks up the underlying store and returns a {@link Schedule} instance that matches the specified id.
+     * 
+     * @param id
+     *            {@link Schedule} id to match.
+     * @return matching {@link Schedule} instance.
+     * @throws EntityNotFoundException
+     *             if the instance could not be looked up.
+     * @throws StoreException
+     */
+    public Schedule lookupSchedule( long id ) throws EntityNotFoundException, StoreException;
+
+    /**
+     * Looks up the underlying store and returns a {@link SystemConfiguration} instance that matches the specified id.
+     * 
+     * @param id
+     *            {@link SystemConfiguration} id to match.
+     * @return matching {@link SystemConfiguration} instance.
+     * @throws EntityNotFoundException
+     *             if the instance could not be looked up.
+     * @throws StoreException
+     */
+    public SystemConfiguration lookupSystemConfiguration( long id ) throws EntityNotFoundException, StoreException;
+
+    /**
+     * Persists the passed in {@link Installation} instance to the underlying store.
+     * <p>
+     * If the entity instance already exists in the database it is updated, else a new instance is created and an
+     * store-generated identifier assigned to it.
+     * 
+     * @param project
+     *            {@link Installation} instance to be created/saved.
+     * @return updated {@link Installation} instance.
+     * @throws StoreException
+     *             if there was an error saving the entity.
+     */
+    public Installation saveInstallation( Installation installation ) throws StoreException;
+
+    /**
+     * Persists the passed in {@link Profile} instance to the underlying store.
+     * <p>
+     * If the entity instance already exists in the database it is updated, else a new instance is created and an
+     * store-generated identifier assigned to it.
+     * 
+     * @param project
+     *            {@link Profile} instance to be created/saved.
+     * @return updated {@link Profile} instance.
+     * @throws StoreException
+     *             if there was an error saving the entity.
+     */
+    public Profile saveProfile( Profile profile ) throws StoreException;
+
+    /**
+     * Persists the passed in {@link Schedule} instance to the underlying store.
+     * <p>
+     * If the entity instance already exists in the database it is updated, else a new instance is created and an
+     * store-generated identifier assigned to it.
+     * 
+     * @param project
+     *            {@link Schedule} instance to be created/saved.
+     * @return updated {@link Schedule} instance.
+     * @throws StoreException
+     *             if there was an error saving the entity.
+     */
+    public Schedule saveSchedule( Schedule schedule ) throws StoreException;
+
+    /**
+     * Persists the passed in {@link SystemConfiguration} instance to the underlying store.
+     * <p>
+     * If the entity instance already exists in the database it is updated, else a new instance is created and an
+     * store-generated identifier assigned to it.
+     * 
+     * @param project
+     *            {@link SystemConfiguration} instance to be created/saved.
+     * @return updated {@link SystemConfiguration} instance.
+     * @throws StoreException
+     *             if there was an error saving the entity.
+     */
+    public SystemConfiguration saveSystemConfiguration( SystemConfiguration systemConfiguration ) throws StoreException;
+
+    /**
+     * Obtains and returns a {@link List} of <b>all</b> {@link Schedule} instances for the system, stored in the
+     * underlying store.
+     * 
+     * @return list of all {@link Schedule} instances stored.
+     * @throws StoreException
+     */
+    public List getAllSchedules() throws StoreException;
+
+    /**
+     * Obtains and returns a {@link List} of <b>all</b> {@link Profile} instances for the system, stored in the
+     * underlying store.
+     * 
+     * @return list of all {@link Profile} instances stored.
+     * @throws StoreException
+     */
+    public List getAllProfiles() throws StoreException;
+
+    /**
+     * Obtains and returns a {@link List} of <b>all</b> {@link Installation} instances for the system, stored in the
+     * underlying store.
+     * 
+     * @return list of all {@link Installation} instances stored.
+     * @throws StoreException
+     */
+    public List getAllInstallations() throws StoreException;
+
+    /**
+     * Obtains and returns a {@link List} of <b>all</b> {@link SystemConfiguration} instances for the system, stored in
+     * the underlying store.
+     * 
+     * @return list of all {@link SystemConfiguration} instances stored.
+     * @throws StoreException
+     */
+    public List getAllSystemConfigurations() throws StoreException;
+
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/DeprecatedSystemStore.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/DeprecatedSystemStore.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/EntityNotFoundException.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/EntityNotFoundException.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/EntityNotFoundException.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/EntityNotFoundException.java Thu May  1 08:19:53 2008
@@ -0,0 +1,42 @@
+package org.apache.continuum.store.api;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class EntityNotFoundException extends StoreException
+{
+    public EntityNotFoundException()
+    {
+        super();
+    }
+
+    public EntityNotFoundException( String message )
+    {
+        super( message );
+    }
+
+    public EntityNotFoundException( String type, String id )
+    {
+        this( "Could not find object. Type '" + type + "'. Id: '" + id + "'." );
+    }
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/EntityNotFoundException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/EntityNotFoundException.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Query.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Query.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Query.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Query.java Thu May  1 08:19:53 2008
@@ -0,0 +1,33 @@
+/**
+ * 
+ */
+package org.apache.continuum.store.api;
+
+import java.util.Map;
+
+/**
+ * Wraps up Type Query criteria to be used by store extensions to filter (and obtain) matching type instances.
+ * <p>
+ * Implementations/extensions are expected to override {@link Object#toString()} method and return a <b>JPQL</b>
+ * formatted string. The JPQL string is consumed by the {@link Store} implementation in {@link Store#query(Query)}
+ * operations.
+ * 
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ * @since 1.2
+ */
+public interface Query<Q>
+{
+
+    /**
+     * Returns this instance of {@link Query} as a JPQL String.
+     * 
+     * @param whereClause
+     *            {@link Map} containing the named parameters to be substituted in the JPQL query. This is populated by
+     *            the {@link Query} implementation and subsequently used by the {@link Store} implementation to
+     *            interpolate the parameters before the JPQL query is executed.
+     * 
+     * @return {@link Query} as a JPQL String
+     */
+    public String toString( Map<String, Object> whereClause );
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Query.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Query.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/QueryFactory.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/QueryFactory.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/QueryFactory.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/QueryFactory.java Thu May  1 08:19:53 2008
@@ -0,0 +1,32 @@
+/**
+ * 
+ */
+package org.apache.continuum.store.api;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ * @since 1.2
+ */
+public class QueryFactory
+{
+    public static <T, Q extends Query<T>> Q createQuery( Class<Q> klass )
+    {
+        Q qry = null;
+        try
+        {
+            qry = klass.newInstance();
+        }
+        catch ( InstantiationException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        catch ( IllegalAccessException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return qry;
+    }
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/QueryFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/QueryFactory.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Store.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Store.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Store.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Store.java Thu May  1 08:19:53 2008
@@ -0,0 +1,79 @@
+/**
+ * 
+ */
+package org.apache.continuum.store.api;
+
+import java.util.List;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+
+/**
+ * Interface that Continuum store extensions/implementations are expected to implement to allow operations on the
+ * underlying store.
+ * <ul>
+ * <li>Entity look ups</li>
+ * <li>Entity insert/updates</li>
+ * <li>Entity removal</li>
+ * <li>Querying one or more entity/entities based on specified criteria</li>
+ * </ul>
+ * 
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ * @since 1.2
+ */
+public interface Store<T extends CommonUpdatableEntity, Q extends Query<T>>
+{
+
+    /**
+     * Looks up the underlying store and returns a {@link T} instance that matches the specified id.
+     * 
+     * @param klass
+     *            {@link Class} for type entity to lookup and return an instance of.
+     * @param id
+     *            Entity Type {@link T}'s id to match.
+     * 
+     * @return matching entity type {@link T} instance.
+     * @throws StoreException
+     * @throws EntityNotFoundException
+     *             if the entity specified by the identifier could be located in the system.
+     * @throws EntityNotFoundException
+     *             if the instance could not be looked up.
+     */
+    public T lookup( Class<T> klass, Long id ) throws StoreException, EntityNotFoundException;
+
+    /**
+     * Persists the passed in entity type {@link T} instance to the underlying store.
+     * <p>
+     * If the entity instance already exists in the database it is updated, else a new instance is created and an
+     * store-generated identifier assigned to it.
+     * 
+     * @param entity
+     *            Type {@link T} instance to be created/saved.
+     * @return updated entity type {@link T} instance.
+     * @throws StoreException
+     *             if there was an error saving the entity.
+     */
+    public T save( T entity ) throws StoreException;
+
+    /**
+     * Removes the passed entity type {@link T} instance from the underlying store.
+     * 
+     * @param entity
+     *            Type {@link T} instance to remove.
+     * @throws StoreException
+     *             if there was an error removing the entity.
+     */
+    public void delete( T entity ) throws StoreException;
+
+    /**
+     * Obtains a {@link List} of instances of entity type {@link T} which match the criteria specified by the passed in
+     * query instance.
+     * 
+     * @param query
+     *            instance that wraps up the criteria for querying matching instances in the system.
+     * @return {@link List} of instances of entity type {@link T} which match the specified query.
+     * @throws StoreException
+     */
+    public List<T> query( Q query ) throws StoreException;
+
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Store.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Store.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/StoreException.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/StoreException.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/StoreException.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/StoreException.java Thu May  1 08:19:53 2008
@@ -0,0 +1,43 @@
+package org.apache.continuum.store.api;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class StoreException extends Exception
+{
+
+    public StoreException()
+    {
+        super();
+    }
+
+    public StoreException( String msg )
+    {
+        super( msg );
+    }
+
+    public StoreException( String msg, Exception ex )
+    {
+        super( msg, ex );
+    }
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/StoreException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/StoreException.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStore.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStore.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStore.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStore.java Thu May  1 08:19:53 2008
@@ -0,0 +1,93 @@
+/**
+ * 
+ */
+package org.apache.continuum.store.jpa;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+import org.apache.continuum.store.api.EntityNotFoundException;
+import org.apache.continuum.store.api.Query;
+import org.apache.continuum.store.api.Store;
+import org.apache.continuum.store.api.StoreException;
+import org.springframework.orm.jpa.JpaObjectRetrievalFailureException;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ * @since 1.2
+ */
+public class JpaStore<T extends CommonUpdatableEntity, Q extends Query<T>> extends StoreSupport implements Store<T, Q>
+{
+
+    /**
+     * @{inheritDoc}
+     * 
+     * @see org.apache.continuum.store.api.Store#delete(java.lang.Object)
+     */
+    @Transactional( readOnly = false )
+    public void delete( T entity ) throws StoreException
+    {
+        getJpaTemplate().remove( entity );
+    }
+
+    /**
+     * @{inheritDoc}
+     * 
+     * @see org.apache.continuum.store.api.Store#lookup(Class, java.lang.Long)
+     */
+    public T lookup( Class<T> klass, Long id ) throws StoreException, EntityNotFoundException
+    {
+        if ( id == null )
+            throw new EntityNotFoundException();
+        T entity = null;
+        try
+        {
+            entity = getJpaTemplate().find( klass, id );
+        }
+        catch ( JpaObjectRetrievalFailureException e )
+        {
+            throw new EntityNotFoundException();
+        }
+        if ( entity == null )
+            throw new EntityNotFoundException();
+        return entity;
+    }
+
+    /**
+     * @{inheritDoc}
+     * 
+     * @see org.apache.continuum.store.api.Store#query(org.apache.continuum.store.api.Query)
+     */
+    public List<T> query( Q query ) throws StoreException
+    {
+        Map<String, Object> where = new HashMap<String, Object>();
+        String q = query.toString( where );
+
+        List<T> results = find( q, where, 0, 0 );
+
+        return results;
+    }
+
+    /**
+     * @{inheritDoc}
+     * 
+     * @see org.apache.continuum.store.api.Store#save(java.lang.Object)
+     */
+    @Transactional( readOnly = true )
+    public T save( T entity ) throws StoreException
+    {
+        if ( null != entity )
+        {
+            if ( null == entity.getId() )
+                getJpaTemplate().persist( entity );
+            else
+                entity = getJpaTemplate().merge( entity );
+        }
+        return entity;
+    }
+
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStore.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStore.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStoreFactory.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStoreFactory.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStoreFactory.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStoreFactory.java Thu May  1 08:19:53 2008
@@ -0,0 +1,70 @@
+/**
+ * 
+ */
+package org.apache.continuum.store.jpa;
+
+import org.apache.continuum.model.project.Project;
+import org.apache.continuum.model.project.ProjectGroup;
+import org.apache.continuum.model.project.ProjectNotifier;
+import org.apache.continuum.store.api.Store;
+
+/**
+ * Bean factory that is used by Spring container to create and return instances of {@link Store} implementations.
+ * 
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ * @since 1.2
+ */
+public class JpaStoreFactory
+{
+
+    /**
+     * Store instance that services executes requests on underlying store for {@link Project} entities.
+     */
+    private final JpaStore<Project, ProjectQuery<Project>> JPA_PROJECT_STORE =
+        new JpaStore<Project, ProjectQuery<Project>>();
+
+    /**
+     * Store instance that services executes requests on underlying store for {@link ProjectGroup} entities.
+     */
+    private final JpaStore<ProjectGroup, ProjectGroupQuery<ProjectGroup>> JPA_PROJECT_GROUP_STORE =
+        new JpaStore<ProjectGroup, ProjectGroupQuery<ProjectGroup>>();
+
+    /**
+     * Store instance that services executes requests on underlying store for {@link ProjectNotifier} entities.
+     */
+    private final JpaStore<ProjectNotifier, ProjectNotifierQuery<ProjectNotifier>> JPA_PROJECT_NOTIFIER_STORE =
+        new JpaStore<ProjectNotifier, ProjectNotifierQuery<ProjectNotifier>>();
+
+    /**
+     * Returns a {@link Store} instance to service {@link Project} Entity.
+     * 
+     * @return a {@link Store} instance to service {@link Project} Entity
+     */
+    public Store<Project, ProjectQuery<Project>> createProjectGroupStoreInstance()
+    {
+        return JPA_PROJECT_STORE;
+    }
+
+    /**
+     * Returns a {@link Store} instance to service {@link ProjectGroup} Entity.
+     * 
+     * @return a {@link Store} instance to service {@link ProjectGroup} Entity.
+     */
+    public Store<ProjectGroup, ProjectGroupQuery<ProjectGroup>> createProjectStoreInstance()
+    {
+        return JPA_PROJECT_GROUP_STORE;
+    }
+
+    /**
+     * Returns a {@link Store} instance to service {@link ProjectNotifier} Entity.
+     * 
+     * @return a {@link Store} instance to service {@link ProjectNotifier} Entity.
+     */
+    public Store<ProjectNotifier, ProjectNotifierQuery<ProjectNotifier>> createProjectNotifierStoreInstance()
+    {
+
+        return JPA_PROJECT_NOTIFIER_STORE;
+    }
+
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStoreFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStoreFactory.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/ProjectGroupQuery.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/ProjectGroupQuery.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/ProjectGroupQuery.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/ProjectGroupQuery.java Thu May  1 08:19:53 2008
@@ -0,0 +1,308 @@
+/**
+ * 
+ */
+package org.apache.continuum.store.jpa;
+
+import java.util.Date;
+import java.util.Map;
+
+import org.apache.continuum.store.api.Query;
+
+/**
+ * Wraps up retrieval criteria for {@link ProjectGroup}s.
+ * 
+ * @author <a href='mailto:rinku@apache.org'>Rahul Thakur</a>
+ * @version $Id$
+ * @since 1.2
+ */
+public class ProjectGroupQuery<ProjectGroup> implements Query<ProjectGroup>
+{
+
+    /**
+     * ProjectGroup creation date criteria.
+     */
+    private Date dateCreated;
+
+    /**
+     * ProjectGroup update date criteria.
+     */
+    private Date dateUpdated;
+
+    /**
+     * ProjectGroup description criteria.
+     */
+    private String description;
+
+    /**
+     * ProjectGroup groupId criteria.
+     */
+    private String groupId;
+
+    /**
+     * ProjectGroup Id criteria.
+     */
+    private Long id;
+
+    /**
+     * ProjectGroup model encoding criteria.
+     */
+    private String modelEncoding;
+
+    /**
+     * ProjectGroup name criteria.
+     */
+    private String name;
+
+    /**
+     * @return
+     * 
+     */
+    public Date getDateCreated()
+    {
+        return this.dateCreated;
+    }
+
+    /**
+     * @return
+     * @see org.apache.continuum.model.CommonUpdatableEntity#getDateUpdated()
+     */
+    public Date getDateUpdated()
+    {
+        return this.dateUpdated;
+    }
+
+    /**
+     * @return
+     * 
+     */
+    public String getDescription()
+    {
+        return this.description;
+    }
+
+    /**
+     * @return
+     * 
+     */
+    public String getGroupId()
+    {
+        return this.groupId;
+    }
+
+    /**
+     * Determine if a date of creation was specified in the query.
+     * 
+     * @return <code>true</code> if a date of creation was specified, else <code>false</code>.
+     */
+    public boolean hasDateCreated()
+    {
+        return ( null != this.dateCreated );
+    }
+
+    /**
+     * Determine if an update date was specified in the query.
+     * 
+     * @return <code>true</code> if a date of update was specified, else <code>false</code>.
+     */
+    public boolean hasDateUpdated()
+    {
+        return ( null != this.dateUpdated );
+    }
+
+    /**
+     * Determine if there was a Project Group 'description' specified in the query.
+     * 
+     * @return <code>true</code> if there was a Project Group 'description' specified , else <code>false</code>.
+     */
+    public boolean hasDescription()
+    {
+        return ( null != this.description && this.description.length() > 0 );
+    }
+
+    /**
+     * Determine if there was a Group Id for the {@link ProjectGroup} specified in the query.
+     * 
+     * @return <code>true</code> if there was a Group Id for the {@link ProjectGroup} specified, else
+     *         <code>false</code>.
+     */
+    public boolean hasGroupId()
+    {
+        return ( null != this.groupId && this.groupId.length() > 0 );
+    }
+
+    /**
+     * 
+     * @return
+     */
+    public boolean hasId()
+    {
+        return ( null != this.id && this.id.longValue() > 0L );
+    }
+
+    /**
+     * Determine if there was a model encoding specified in the query.
+     * 
+     * @return <code>true</code> if there was a model encoding specified, else <code>false</code>.
+     */
+    public boolean hasModelEncoding()
+    {
+        return ( null != this.modelEncoding && this.modelEncoding.length() > 0 );
+    }
+
+    /**
+     * Determine if there is a {@link ProjectGroup} name specified in the query.
+     * 
+     * @return <code>true</code> if there is a {@link ProjectGroup} name specified, else <code>false</code>.
+     */
+    public boolean hasName()
+    {
+        return ( null != this.name && this.name.length() > 0 );
+    }
+
+    /**
+     * @return
+     */
+    public Long getId()
+    {
+        return this.id;
+    }
+
+    /**
+     * @return
+     */
+    public String getModelEncoding()
+    {
+        return this.modelEncoding;
+    }
+
+    /**
+     * @return
+     */
+    public String getName()
+    {
+        return this.name;
+    }
+
+    /**
+     * @param dateCreated
+     */
+    public void setDateCreated( Date dateCreated )
+    {
+        this.dateCreated = dateCreated;
+    }
+
+    /**
+     * @param dateUpdated
+     */
+    public void setDateUpdated( Date dateUpdated )
+    {
+        this.dateUpdated = dateUpdated;
+    }
+
+    /**
+     * @param description
+     */
+    public void setDescription( String description )
+    {
+        this.description = description;
+    }
+
+    /**
+     * @param groupId
+     */
+    public void setGroupId( String groupId )
+    {
+        this.groupId = groupId;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId( Long id )
+    {
+        this.id = id;
+    }
+
+    /**
+     * @param modelEncoding
+     */
+    public void setModelEncoding( String modelEncoding )
+    {
+        this.modelEncoding = modelEncoding;
+    }
+
+    /**
+     * @param name
+     */
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    /**
+     * @{inheritDoc}
+     * 
+     * @see org.apache.continuum.store.api.Query#toString(java.util.Map)
+     */
+    public String toString( Map<String, Object> whereClause )
+    {
+        StringBuffer sb = new StringBuffer();
+
+        if ( this.hasId() )
+        {
+            whereClause.put( "id", this.getId() );
+            if ( sb.length() > 0 )
+                sb.append( "and" );
+            sb.append( " projectGroup.id =:id " );
+        }
+        if ( this.hasDateCreated() )
+        {
+            whereClause.put( "dateCreated", this.getDateCreated() );
+            if ( sb.length() > 0 )
+                sb.append( "and" );
+            sb.append( " projectGroup.dateCreated =:dateCreated " );
+        }
+        if ( this.hasDateUpdated() )
+        {
+            whereClause.put( "dateUpdated", this.getDateUpdated() );
+            if ( sb.length() > 0 )
+                sb.append( "and" );
+            sb.append( " projectGroup.dateUpdated =:dateUpdated " );
+        }
+        if ( this.hasDescription() )
+        {
+            whereClause.put( "description", this.getDescription() );
+            if ( sb.length() > 0 )
+                sb.append( "and" );
+            sb.append( " projectGroup.description =:description " );
+        }
+        if ( this.hasGroupId() )
+        {
+            whereClause.put( "groupId", this.getGroupId() );
+            if ( sb.length() > 0 )
+                sb.append( "and" );
+            sb.append( " projectGroup.groupId =:groupId " );
+        }
+        if ( this.hasModelEncoding() )
+        {
+            whereClause.put( "modelEncoding", this.getModelEncoding() );
+            if ( sb.length() > 0 )
+                sb.append( "and" );
+            sb.append( " projectGroup.modelEncoding =:modelEncoding " );
+        }
+        if ( this.hasName() )
+        {
+            whereClause.put( "name", this.getName() );
+            if ( sb.length() > 0 )
+                sb.append( "and" );
+            sb.append( " projectGroup.name =:name " );
+        }
+
+        if ( sb.length() > 0 )
+            sb.insert( 0, " where " );
+        sb.insert( 0, "select projectGroup from ProjectGroup as projectGroup " );
+
+        return sb.toString();
+    }
+
+}

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/ProjectGroupQuery.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/ProjectGroupQuery.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message