continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r652556 [1/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
Author: evenisse
Date: Thu May  1 08:19:53 2008
New Revision: 652556

URL: http://svn.apache.org/viewvc?rev=652556&view=rev
Log:
Add JPA implementation based on NamedQueries

Added:
    continuum/branches/continuum-jpa-evenisse/TODO.txt   (with props)
    continuum/branches/continuum-jpa-evenisse/pom.xml   (with props)
    continuum/branches/continuum-jpa-evenisse/src/
    continuum/branches/continuum-jpa-evenisse/src/main/
    continuum/branches/continuum-jpa-evenisse/src/main/java/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/api/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/api/GenericDao.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/impl/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/impl/DaoFactoryImpl.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/impl/GenericDaoJpa.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonCreatedEntity.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonPersistableEntity.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonUpdatableEntity.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildDefinition.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildDefinitionTemplate.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildResult.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ContinuumModelloMetadata.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ContinuumProjectState.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/Project.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectDependency.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectDeveloper.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectGroup.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectNotifier.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/Schedule.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ChangeFile.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ChangeSet.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ScmResult.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/SuiteResult.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestCaseFailure.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/TestResult.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/ContinuumDatabase.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Installation.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/NotificationAddress.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/Profile.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/system/SystemConfiguration.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectGroupService.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/api/ProjectService.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectGroupServiceImpl.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/service/impl/ProjectServiceImpl.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/DeprecatedSystemStore.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/EntityNotFoundException.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Query.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/QueryFactory.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/Store.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/api/StoreException.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStore.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/JpaStoreFactory.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/ProjectGroupQuery.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/ProjectNotifierQuery.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/ProjectQuery.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/store/jpa/StoreSupport.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/main/resources/
    continuum/branches/continuum-jpa-evenisse/src/test/
    continuum/branches/continuum-jpa-evenisse/src/test/java/
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/continuum/
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/continuum/store/
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/continuum/store/ApplicationContextAwareStoreTestCase.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/continuum/store/jpa/
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/continuum/store/jpa/JpaProjectGroupStoreTest.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/continuum/store/jpa/JpaProjectStoreTest.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/openjpa/
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/openjpa/persistence/
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/openjpa/persistence/test/
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/openjpa/persistence/test/SQLListenerTestCase.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java   (with props)
    continuum/branches/continuum-jpa-evenisse/src/test/resources/
    continuum/branches/continuum-jpa-evenisse/src/test/resources/META-INF/
    continuum/branches/continuum-jpa-evenisse/src/test/resources/META-INF/org.apache.openjpa.lib.conf.ProductDerivation
    continuum/branches/continuum-jpa-evenisse/src/test/resources/META-INF/persistence.xml   (with props)
    continuum/branches/continuum-jpa-evenisse/src/test/resources/META-INF/spring-config.xml   (with props)
    continuum/branches/continuum-jpa-evenisse/src/test/resources/sql/
    continuum/branches/continuum-jpa-evenisse/src/test/resources/sql/project-group-table-data.sql
    continuum/branches/continuum-jpa-evenisse/src/test/resources/sql/project-notifier-table-data.sql
    continuum/branches/continuum-jpa-evenisse/src/test/resources/sql/project-table-data.sql

Added: continuum/branches/continuum-jpa-evenisse/TODO.txt
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/TODO.txt?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/TODO.txt (added)
+++ continuum/branches/continuum-jpa-evenisse/TODO.txt Thu May  1 08:19:53 2008
@@ -0,0 +1,5 @@
+
+TODO for Continuum JPA store implementation
+-------------------------------------------
+
+1)  Review JPA annotated Entities.  

Propchange: continuum/branches/continuum-jpa-evenisse/TODO.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/TODO.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/pom.xml?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/pom.xml (added)
+++ continuum/branches/continuum-jpa-evenisse/pom.xml Thu May  1 08:19:53 2008
@@ -0,0 +1,55 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.continuum</groupId>
+  <artifactId>continuum-model-jpa</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <name>continuum-model-jpa</name>
+  <url>http://maven.apache.org</url>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.4</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openjpa</groupId>
+      <artifactId>openjpa</artifactId>
+      <version>1.0.1</version>
+    </dependency>
+    <dependency>
+      <groupId>hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <version>1.8.0.7</version>
+      <scope>test</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring</artifactId>
+      <version>2.5</version>      
+    </dependency>
+    
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-test</artifactId>
+      <version>2.5</version>      
+    </dependency>
+    
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: continuum/branches/continuum-jpa-evenisse/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-jpa-evenisse/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/api/GenericDao.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/api/GenericDao.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/api/GenericDao.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/api/GenericDao.java Thu May  1 08:19:53 2008
@@ -0,0 +1,34 @@
+package org.apache.continuum.dao.api;
+
+import org.springframework.dao.DataAccessException;
+import org.springframework.orm.ObjectRetrievalFailureException;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public interface GenericDao<T>
+{
+    Class<T> getPersistentClass();
+
+    T findById( long id )
+        throws ObjectRetrievalFailureException;
+
+    @SuppressWarnings("unchecked")
+    List<T> findAll();
+
+    @SuppressWarnings("unchecked")
+    List<T> findByNamedQueryAndNamedParams( Class<T> entityClass, String queryName, Map<String, Object> params )
+        throws DataAccessException;
+
+    T findUniqByNamedQueryAndNamedParams( Class<T> entityClass, String queryName, Map<String, Object> params );
+
+    T saveOrUpdate( T entity );
+
+    void delete( long id );
+
+    void delete( T entity );
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/impl/DaoFactoryImpl.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/impl/DaoFactoryImpl.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/impl/DaoFactoryImpl.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/impl/DaoFactoryImpl.java Thu May  1 08:19:53 2008
@@ -0,0 +1,28 @@
+package org.apache.continuum.dao.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.model.project.ProjectNotifier;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class DaoFactoryImpl
+{
+    public GenericDao<ProjectGroup> createProjectGroupDao()
+    {
+        return new GenericDaoJpa<ProjectGroup>( ProjectGroup.class );
+    }
+
+    public GenericDao<Project> createProjectDao()
+    {
+        return new GenericDaoJpa<Project>( Project.class );
+    }
+
+    public GenericDao<ProjectNotifier> createNotifierDao()
+    {
+        return new GenericDaoJpa<ProjectNotifier>( ProjectNotifier.class );
+    }
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/impl/GenericDaoJpa.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/impl/GenericDaoJpa.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/impl/GenericDaoJpa.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/dao/impl/GenericDaoJpa.java Thu May  1 08:19:53 2008
@@ -0,0 +1,106 @@
+package org.apache.continuum.dao.impl;
+
+import org.apache.continuum.dao.api.GenericDao;
+import org.apache.continuum.model.CommonPersistableEntity;
+import org.springframework.dao.DataAccessException;
+import org.springframework.orm.ObjectRetrievalFailureException;
+import org.springframework.orm.jpa.JpaCallback;
+import org.springframework.orm.jpa.support.JpaDaoSupport;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceException;
+import javax.persistence.Query;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class GenericDaoJpa<T extends CommonPersistableEntity>
+    extends JpaDaoSupport
+    implements GenericDao<T>
+{
+    private Class<T> entityClass;
+
+    public GenericDaoJpa()
+    {
+    }
+
+    public GenericDaoJpa( Class<T> type )
+    {
+        entityClass = type;
+    }
+
+    public Class<T> getPersistentClass()
+    {
+        return entityClass;
+    }
+
+    public T findById( long id )
+        throws ObjectRetrievalFailureException
+    {
+        return getJpaTemplate().find( getPersistentClass(), id );
+    }
+
+    @SuppressWarnings("unchecked")
+    public List<T> findAll()
+    {
+        String q = "SELECT z FROM " + entityClass.getSimpleName() + " z";
+        return (List<T>) getJpaTemplate().find( q );
+    }
+
+    @SuppressWarnings("unchecked")
+    public List<T> findByNamedQueryAndNamedParams( Class<T> entityClass, String queryName, Map<String, Object> params )
+        throws DataAccessException
+    {
+        return (List<T>) getJpaTemplate().findByNamedQueryAndNamedParams( queryName, params );
+    }
+
+    @SuppressWarnings("unchecked")
+    public T findUniqByNamedQueryAndNamedParams( Class<T> entityClass, final String queryName,
+                                                 final Map<String, Object> params )
+        throws DataAccessException
+    {
+        JpaCallback cb = new JpaCallback()
+        {
+            public Object doInJpa( EntityManager entityManager )
+                throws PersistenceException
+            {
+                Query q = entityManager.createNamedQuery( queryName );
+                for ( String key : params.keySet() )
+                {
+                    q.setParameter( key, params.get( key ) );
+                }
+                return q.getSingleResult();
+            }
+        };
+        return (T) getJpaTemplate().execute( cb );
+    }
+
+    @Transactional
+    public T saveOrUpdate( T entity )
+    {
+        if ( null == entity.getId() )
+        {
+            getJpaTemplate().persist( entity );
+        }
+        else
+        {
+            entity = getJpaTemplate().merge( entity );
+        }
+        return entity;
+    }
+
+    @Transactional
+    public void delete( long id )
+    {
+        delete( findById( id ) );
+    }
+
+    public void delete( T entity )
+    {
+        getJpaTemplate().remove( entity );
+    }
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonCreatedEntity.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonCreatedEntity.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonCreatedEntity.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonCreatedEntity.java Thu May  1 08:19:53 2008
@@ -0,0 +1,45 @@
+/**
+ * 
+ */
+package org.apache.continuum.model;
+
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.MappedSuperclass;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ */
+@MappedSuperclass
+public abstract class CommonCreatedEntity extends CommonPersistableEntity
+{
+
+    /**
+     * Date the entity was created.
+     */
+    @Temporal( TemporalType.TIMESTAMP )
+    @Column( name = "DATE_CREATED" )
+    private Date dateCreated;
+
+    /**
+     * @return the dateCreated
+     */
+    public Date getDateCreated()
+    {
+        return dateCreated;
+    }
+
+    /**
+     * @param dateCreated
+     *            the dateCreated to set
+     */
+    public void setDateCreated( Date dateCreated )
+    {
+        this.dateCreated = dateCreated;
+    }
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonPersistableEntity.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonPersistableEntity.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonPersistableEntity.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonPersistableEntity.java Thu May  1 08:19:53 2008
@@ -0,0 +1,90 @@
+/**
+ * 
+ */
+package org.apache.continuum.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.MappedSuperclass;
+
+/**
+ * Common persistable entity.
+ * 
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ */
+@MappedSuperclass
+public abstract class CommonPersistableEntity implements Serializable
+{
+
+    /**
+     * Unique persistence identifier.
+     * <p>
+     * This is <code>null</code> if not persisted.
+     */
+    @Id
+    @GeneratedValue( strategy = GenerationType.IDENTITY )
+    @Column( name = "ID" )
+    private Long id;
+
+    /**
+     * @return the id which is the unique persistence identifier.
+     */
+    public Long getId()
+    {
+        return id;
+    }
+
+    /**
+     * @param id
+     *            Unique persistence identifier to set.
+     */
+    public void setId( Long id )
+    {
+        this.id = id;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode()
+    {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ( ( id == null ) ? 0 : id.hashCode() );
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals( Object obj )
+    {
+        if ( this == obj )
+            return true;
+        if ( obj == null )
+            return false;
+        if ( getClass() != obj.getClass() )
+            return false;
+        CommonPersistableEntity other = (CommonPersistableEntity) obj;
+        if ( id == null )
+        {
+            if ( other.id != null )
+                return false;
+        }
+        else if ( !id.equals( other.id ) )
+            return false;
+        return true;
+    }
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonUpdatableEntity.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonUpdatableEntity.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonUpdatableEntity.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/CommonUpdatableEntity.java Thu May  1 08:19:53 2008
@@ -0,0 +1,70 @@
+/**
+ * 
+ */
+package org.apache.continuum.model;
+
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.MappedSuperclass;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.persistence.Version;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ */
+@MappedSuperclass
+public abstract class CommonUpdatableEntity extends CommonCreatedEntity
+{
+
+    /**
+     * Date the entity was last updated.
+     */
+    @Temporal( TemporalType.TIMESTAMP )
+    @Column( name = "DATE_UPDATED" )
+    private Date dateUpdated;
+
+    /**
+     * Version for optimistic locking.
+     */
+    @Version
+    @Column( name = "OBJ_VERSION" )
+    private long objectVersion;
+
+    /**
+     * @return the dateUpdated
+     */
+    public Date getDateUpdated()
+    {
+        return dateUpdated;
+    }
+
+    /**
+     * @param dateUpdated
+     *            the dateUpdated to set
+     */
+    public void setDateUpdated( Date dateUpdated )
+    {
+        this.dateUpdated = dateUpdated;
+    }
+
+    /**
+     * @return the version
+     */
+    public long getObjectVersion()
+    {
+        return objectVersion;
+    }
+
+    /**
+     * @param version
+     *            the version to set
+     */
+    public void setObjectVersion( long version )
+    {
+        this.objectVersion = version;
+    }
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildDefinition.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildDefinition.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildDefinition.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildDefinition.java Thu May  1 08:19:53 2008
@@ -0,0 +1,97 @@
+package org.apache.continuum.model.project;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+import org.apache.continuum.model.system.Profile;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.OneToOne;
+import javax.persistence.Table;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ */
+@Entity
+@Table(name = "BUILD_DEFINITION")
+public class BuildDefinition
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field defaultForProject
+     */
+    @Basic
+    @Column(name = "FLG_DEFAULT_PROJECT", nullable = false)
+    private boolean defaultForProject = false;
+
+    /**
+     * Field goals
+     */
+    @Basic
+    @Column(name = "GOALS")
+    private String goals;
+
+    /**
+     * Field arguments
+     */
+    @Basic
+    @Column(name = "ARGUMENTS")
+    private String arguments;
+
+    /**
+     * Field buildFile
+     */
+    @Basic
+    @Column(name = "BUILD_FILE")
+    private String buildFile;
+
+    /**
+     * Field buildFresh
+     */
+    @Basic
+    @Column(name = "FLG_BUILD_FRESH", nullable = false)
+    private boolean buildFresh = false;
+
+    /**
+     * Field description
+     */
+    @Basic
+    @Column(name = "DESCRIPTION")
+    private String description;
+
+    /**
+     * Field type
+     */
+    @Basic
+    @Column(name = "TYPE")
+    private String type;
+
+    /**
+     * Field schedule
+     */
+    @OneToOne
+    private Schedule schedule;
+
+    /**
+     * Field profile
+     */
+    @OneToOne
+    private Profile profile;
+
+    /**
+     * Field alwaysBuild
+     */
+    @Basic
+    @Column(name = "FLG_ALWAYS_BUILD")
+    private boolean alwaysBuild = false;
+
+    /**
+     * Field template
+     */
+    @Basic
+    @Column(name = "FLG_TEMPLATE")
+    private boolean template = false;
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildDefinitionTemplate.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildDefinitionTemplate.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildDefinitionTemplate.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildDefinitionTemplate.java Thu May  1 08:19:53 2008
@@ -0,0 +1,116 @@
+package org.apache.continuum.model.project;
+
+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;
+
+/**
+ * Template which contains some buildDefinitions
+ *
+ * @version $Id$
+ */
+@Entity
+@Table(name = "BUILD_DEFINITION_TEMPLATE")
+public class BuildDefinitionTemplate
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field name
+     */
+    @Basic
+    @Column(name = "NAME", nullable = false)
+    private String name;
+
+    /**
+     * Field continuumDefault
+     */
+    @Basic
+    @Column(name = "FLG_CONTINUUM_DEFAULT", nullable = false)
+    private boolean continuumDefault = false;
+
+    /**
+     * Field type
+     * <p/>
+     * TODO: Enum?
+     */
+    @Basic
+    @Column(name = "TEMPLATE_TYPE")
+    private String type;
+
+    /**
+     * Field buildDefinitions
+     */
+    @OneToMany
+    private List<BuildDefinition> buildDefinitions;
+
+    /**
+     * @return the name
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    /**
+     * @return the continuumDefault
+     */
+    public boolean isContinuumDefault()
+    {
+        return continuumDefault;
+    }
+
+    /**
+     * @param continuumDefault the continuumDefault to set
+     */
+    public void setContinuumDefault( boolean continuumDefault )
+    {
+        this.continuumDefault = continuumDefault;
+    }
+
+    /**
+     * @return the type
+     */
+    public String getType()
+    {
+        return type;
+    }
+
+    /**
+     * @param type the type to set
+     */
+    public void setType( String type )
+    {
+        this.type = type;
+    }
+
+    /**
+     * @return the buildDefinitions
+     */
+    public List<BuildDefinition> getBuildDefinitions()
+    {
+        return buildDefinitions;
+    }
+
+    /**
+     * @param buildDefinitions the buildDefinitions to set
+     */
+    public void setBuildDefinitions( List<BuildDefinition> buildDefinitions )
+    {
+        this.buildDefinitions = buildDefinitions;
+    }
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildResult.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildResult.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildResult.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/BuildResult.java Thu May  1 08:19:53 2008
@@ -0,0 +1,336 @@
+package org.apache.continuum.model.project;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+import org.apache.continuum.model.scm.ScmResult;
+import org.apache.continuum.model.scm.TestResult;
+
+import javax.persistence.Basic;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinTable;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.OneToOne;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * This class is a single continuum build.
+ *
+ * @version $Id$
+ */
+@Entity
+@Table(name = "BUILD_RESULT")
+public class BuildResult
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field project
+     */
+    @ManyToOne
+    @JoinColumn(name = "ID_PROJECT")
+    private Project project;
+
+    /**
+     * Field buildDefinition
+     */
+    @OneToOne
+    @JoinColumn(name = "ID_BUILD_DEFINITION")
+    private BuildDefinition buildDefinition = null;
+
+    /**
+     * Field buildNumber
+     */
+    @Basic
+    @Column(name = "BUILD_NUMBER")
+    private int buildNumber = 0;
+
+    /**
+     * Field state.
+     * <p/>
+     * TODO: This is a candidate for enum.
+     */
+    @Basic
+    @Column(name = "RESULT_STATE")
+    private int state = 0;
+
+    /**
+     * Field trigger
+     * <p/>
+     * TODO: enum?
+     */
+    @Basic
+    @Column(name = "RESULT_TRIGGER")
+    private int trigger = 0;
+
+    /**
+     * Field startTime
+     */
+    @Temporal(TemporalType.TIME)
+    @Column(name = "START_TIME", nullable = false)
+    private Date startTime;
+
+    /**
+     * Field endTime
+     */
+    @Temporal(TemporalType.TIME)
+    @Column(name = "END_TIME", nullable = false)
+    private Date endTime;
+
+    /**
+     * Field error
+     */
+    @Basic
+    @Column(name = "ERROR")
+    private String error;
+
+    /**
+     * Field success
+     */
+    @Basic
+    @Column(name = "FLG_SUCCESS", nullable = false)
+    private boolean success = false;
+
+    /**
+     * Field exitCode
+     */
+    @Basic
+    @Column(name = "EXIT_CODE", nullable = false)
+    private int exitCode = 0;
+
+    /**
+     * Field scmResult
+     */
+    @OneToOne(fetch = FetchType.EAGER)
+    private ScmResult scmResult;
+
+    /**
+     * Field testResult
+     */
+    @OneToOne(fetch = FetchType.EAGER)
+    private TestResult testResult;
+
+    /**
+     * Field modifiedDependencies
+     */
+    @OneToMany(cascade = CascadeType.ALL)
+    @JoinTable(name = "PROJECT_DEPENDENCY", joinColumns = @JoinColumn(name = "BUILD_ID"),
+               inverseJoinColumns = @JoinColumn(name = "ID_PROJECT_DEPENDENCY"))
+    private List<ProjectDependency> modifiedDependencies;
+
+    /**
+     * @return the project
+     */
+    public Project getProject()
+    {
+        return project;
+    }
+
+    /**
+     * @param project the project to set
+     */
+    public void setProject( Project project )
+    {
+        this.project = project;
+    }
+
+    /**
+     * @return the buildDefinition
+     */
+    public BuildDefinition getBuildDefinition()
+    {
+        return buildDefinition;
+    }
+
+    /**
+     * @param buildDefinition the buildDefinition to set
+     */
+    public void setBuildDefinition( BuildDefinition buildDefinition )
+    {
+        this.buildDefinition = buildDefinition;
+    }
+
+    /**
+     * @return the buildNumber
+     */
+    public int getBuildNumber()
+    {
+        return buildNumber;
+    }
+
+    /**
+     * @param buildNumber the buildNumber to set
+     */
+    public void setBuildNumber( int buildNumber )
+    {
+        this.buildNumber = buildNumber;
+    }
+
+    /**
+     * @return the state
+     */
+    public int getState()
+    {
+        return state;
+    }
+
+    /**
+     * @param state the state to set
+     */
+    public void setState( int state )
+    {
+        this.state = state;
+    }
+
+    /**
+     * @return the trigger
+     */
+    public int getTrigger()
+    {
+        return trigger;
+    }
+
+    /**
+     * @param trigger the trigger to set
+     */
+    public void setTrigger( int trigger )
+    {
+        this.trigger = trigger;
+    }
+
+    /**
+     * @return the startTime
+     */
+    public Date getStartTime()
+    {
+        return startTime;
+    }
+
+    /**
+     * @param startTime the startTime to set
+     */
+    public void setStartTime( Date startTime )
+    {
+        this.startTime = startTime;
+    }
+
+    /**
+     * @return the endTime
+     */
+    public Date getEndTime()
+    {
+        return endTime;
+    }
+
+    /**
+     * @param endTime the endTime to set
+     */
+    public void setEndTime( Date endTime )
+    {
+        this.endTime = endTime;
+    }
+
+    /**
+     * @return the error
+     */
+    public String getError()
+    {
+        return error;
+    }
+
+    /**
+     * @param error the error to set
+     */
+    public void setError( String error )
+    {
+        this.error = error;
+    }
+
+    /**
+     * @return the success
+     */
+    public boolean isSuccess()
+    {
+        return success;
+    }
+
+    /**
+     * @param success the success to set
+     */
+    public void setSuccess( boolean success )
+    {
+        this.success = success;
+    }
+
+    /**
+     * @return the exitCode
+     */
+    public int getExitCode()
+    {
+        return exitCode;
+    }
+
+    /**
+     * @param exitCode the exitCode to set
+     */
+    public void setExitCode( int exitCode )
+    {
+        this.exitCode = exitCode;
+    }
+
+    /**
+     * @return the scmResult
+     */
+    public ScmResult getScmResult()
+    {
+        return scmResult;
+    }
+
+    /**
+     * @param scmResult the scmResult to set
+     */
+    public void setScmResult( ScmResult scmResult )
+    {
+        this.scmResult = scmResult;
+    }
+
+    /**
+     * @return the testResult
+     */
+    public TestResult getTestResult()
+    {
+        return testResult;
+    }
+
+    /**
+     * @param testResult the testResult to set
+     */
+    public void setTestResult( TestResult testResult )
+    {
+        this.testResult = testResult;
+    }
+
+    /**
+     * @return the modifiedDependencies
+     */
+    public List<ProjectDependency> getModifiedDependencies()
+    {
+        return modifiedDependencies;
+    }
+
+    /**
+     * @param modifiedDependencies the modifiedDependencies to set
+     */
+    public void setModifiedDependencies( List<ProjectDependency> modifiedDependencies )
+    {
+        this.modifiedDependencies = modifiedDependencies;
+    }
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ContinuumModelloMetadata.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ContinuumModelloMetadata.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ContinuumModelloMetadata.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ContinuumModelloMetadata.java Thu May  1 08:19:53 2008
@@ -0,0 +1,23 @@
+package org.apache.continuum.model.project;
+
+// Model class imports
+
+/**
+ * Generated ModelloMetadata class for Continuum.
+ * 
+ * @author Mr Modello
+ */
+public class ContinuumModelloMetadata
+{
+    private String modelVersion;
+
+    public String getModelVersion()
+    {
+        return modelVersion;
+    }
+
+    public void setModelVersion( String modelVersion )
+    {
+        this.modelVersion = modelVersion;
+    }
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ContinuumProjectState.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ContinuumProjectState.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ContinuumProjectState.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ContinuumProjectState.java Thu May  1 08:19:53 2008
@@ -0,0 +1,102 @@
+package org.apache.continuum.model.project;
+
+/**
+ * null
+ * 
+ * @version $Revision$ $Date$
+ */
+public class ContinuumProjectState implements java.io.Serializable
+{
+
+    /**
+     * Field name
+     */
+    private String name;
+
+    // -----------/
+    // - Methods -/
+    // -----------/
+
+    /**
+     * Get null
+     */
+    public String getName()
+    {
+        return this.name;
+    } // -- String getName()
+
+    /**
+     * Set null
+     * 
+     * @param name
+     */
+    public void setName( String name )
+    {
+        this.name = name;
+    } // -- void setName(String)
+
+    public final static int NEW = 1;
+
+    public final static int OK = 2;
+
+    public final static int FAILED = 3;
+
+    public final static int ERROR = 4;
+
+    public final static int BUILDING = 6;
+
+    public final static int CHECKING_OUT = 7;
+
+    public final static int UPDATING = 8;
+
+    public final static int WARNING = 9;
+
+    public final static int CHECKEDOUT = 10;
+
+    // TODO: maybe move these to another class
+    public static final int TRIGGER_FORCED = 1;
+
+    // TODO: remove
+    public static final int TRIGGER_SCHEDULED = 0;
+
+    public static final int TRIGGER_UNKNOWN = TRIGGER_SCHEDULED;
+
+    public String getI18nKey()
+    {
+        return "org.apache.continuum.project.state." + name;
+    }
+
+    public boolean equals( Object object )
+    {
+        if ( !( object instanceof ContinuumProjectState ) )
+        {
+            return false;
+        }
+
+        ContinuumProjectState other = (ContinuumProjectState) object;
+
+        return name.equals( other.name );
+    }
+
+    public int hashCode()
+    {
+        return name.hashCode();
+    }
+
+    public String toString()
+    {
+        return name;
+    }
+
+    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/project/ContinuumProjectState.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/Project.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/Project.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/Project.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/Project.java Thu May  1 08:19:53 2008
@@ -0,0 +1,599 @@
+package org.apache.continuum.model.project;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+import org.apache.continuum.model.scm.ScmResult;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.NamedQueries;
+import javax.persistence.OneToMany;
+import javax.persistence.OneToOne;
+import javax.persistence.Table;
+import javax.persistence.NamedQuery;
+import java.util.List;
+
+/**
+ * A Project registered in the system.
+ *
+ * @version $Id$
+ */
+@Entity
+@Table(name = "PROJECT")
+@NamedQueries(
+{
+    @NamedQuery(name = "Project.findAll", query = "SELECT p from Project as p"),
+    @NamedQuery(name = "Project.find", query = "SELECT p from Project as p WHERE p.groupId = :groupId AND p.artifactId = :artifactId AND p.version = :version")
+})
+
+public class Project
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field groupId
+     */
+    @Basic
+    @Column(name = "GROUP_ID")
+    private String groupId;
+
+    /**
+     * Field artifactId
+     */
+    @Basic
+    @Column(name = "ARTIFACT_ID")
+    private String artifactId;
+
+    /**
+     * Artifact version
+     */
+    @Basic
+    @Column(name = "VERSION")
+    private String version;
+
+    /**
+     * Field executorId
+     */
+    @Basic
+    @Column(name = "EXECUTOR_ID")
+    private String executorId;
+
+    /**
+     * Field name
+     */
+    @Basic
+    @Column(name = "NAME")
+    private String name;
+
+    /**
+     * Field description
+     */
+    @Basic
+    @Column(name = "DESCRIPTION")
+    private String description;
+
+    /**
+     * Field url
+     */
+    @Basic
+    @Column(name = "URL")
+    private String url;
+
+    /**
+     * Field scmUrl
+     */
+    @Basic
+    @Column(name = "SCM_URL")
+    private String scmUrl;
+
+    /**
+     * Field scmTag
+     */
+    @Basic
+    @Column(name = "SCM_TAG")
+    private String scmTag;
+
+    /**
+     * Field scmUsername
+     */
+    @Basic
+    @Column(name = "SCM_USERNAME")
+    private String scmUsername;
+
+    /**
+     * Field scmPassword
+     */
+    @Basic
+    @Column(name = "SCM_PASSWORD")
+    private String scmPassword;
+
+    /**
+     * Field scmUseCache
+     */
+    @Basic
+    @Column(name = "FLG_SCM_USE_CACHE", nullable = false)
+    private boolean scmUseCache = false;
+
+    /**
+     * Field state.
+     * <p/>
+     * TODO: Review! This is a candidate for an enum type.
+     */
+    @Basic
+    @Column(name = "STATE")
+    private int state = 1;
+
+    /**
+     * Field oldState
+     * <p/>
+     * TODO: Review! This is a candidate for an enum type.
+     */
+    @Basic
+    @Column(name = "OLD_STATE")
+    private int oldState = 0;
+
+    /**
+     * Field latestBuildId
+     */
+    @Basic
+    @Column(name = "LATEST_BUILD_ID")
+    private int latestBuildId = 0;
+
+    /**
+     * Field buildNumber
+     */
+    @Basic
+    @Column(name = "BUILD_NUMBER")
+    private int buildNumber = 0;
+
+    /**
+     * Field workingDirectory
+     */
+    @Basic
+    @Column(name = "WORKING_DIRECTORY")
+    private String workingDirectory;
+
+    /**
+     * Collection of {@link BuildResult}s for this {@link Project} instance.
+     */
+    @OneToMany(mappedBy = "project")
+    private List<BuildResult> buildResults;
+
+    /**
+     * Field checkoutResult
+     */
+    @OneToOne
+    @JoinColumn(name = "ID_CHECKOUT_RESULT")
+    private ScmResult checkoutResult;
+
+    /**
+     * Field developers
+     * <p/>
+     * TODO:
+     */
+    @OneToMany
+    private List<ProjectDeveloper> developers;
+
+    /**
+     * Field parent
+     */
+    @OneToOne
+    @JoinColumn(name = "ID_PARENT")
+    private ProjectDependency parent;
+
+    /**
+     * Field dependencies
+     */
+    @OneToMany
+    private List<ProjectDependency> dependencies;
+
+    /**
+     * Field projectGroup
+     */
+    @ManyToOne
+    @JoinColumn(name = "ID_PROJECT_GROUP")
+    private ProjectGroup projectGroup;
+
+    /**
+     * Field notifiers
+     */
+    @OneToMany
+    private List<ProjectNotifier> notifiers;
+
+    public void addNotifier( ProjectNotifier n )
+    {
+        notifiers.add( n );
+    }
+
+    public void removeNotifier( ProjectNotifier notifier )
+    {
+        notifiers.remove( notifier );
+    }
+
+    /**
+     * @return the groupId
+     */
+    public String getGroupId()
+    {
+        return groupId;
+    }
+
+    /**
+     * @param groupId the groupId to set
+     */
+    public void setGroupId( String groupId )
+    {
+        this.groupId = groupId;
+    }
+
+    /**
+     * @return the artifactId
+     */
+    public String getArtifactId()
+    {
+        return artifactId;
+    }
+
+    /**
+     * @param artifactId the artifactId to set
+     */
+    public void setArtifactId( String artifactId )
+    {
+        this.artifactId = artifactId;
+    }
+
+    /**
+     * @return the version
+     */
+    public String getVersion()
+    {
+        return version;
+    }
+
+    /**
+     * @param version the version to set
+     */
+    public void setVersion( String version )
+    {
+        this.version = version;
+    }
+
+    /**
+     * @return the executorId
+     */
+    public String getExecutorId()
+    {
+        return executorId;
+    }
+
+    /**
+     * @param executorId the executorId to set
+     */
+    public void setExecutorId( String executorId )
+    {
+        this.executorId = executorId;
+    }
+
+    /**
+     * @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 url
+     */
+    public String getUrl()
+    {
+        return url;
+    }
+
+    /**
+     * @param url the url to set
+     */
+    public void setUrl( String url )
+    {
+        this.url = url;
+    }
+
+    /**
+     * @return the scmUrl
+     */
+    public String getScmUrl()
+    {
+        return scmUrl;
+    }
+
+    /**
+     * @param scmUrl the scmUrl to set
+     */
+    public void setScmUrl( String scmUrl )
+    {
+        this.scmUrl = scmUrl;
+    }
+
+    /**
+     * @return the scmTag
+     */
+    public String getScmTag()
+    {
+        return scmTag;
+    }
+
+    /**
+     * @param scmTag the scmTag to set
+     */
+    public void setScmTag( String scmTag )
+    {
+        this.scmTag = scmTag;
+    }
+
+    /**
+     * @return the scmUsername
+     */
+    public String getScmUsername()
+    {
+        return scmUsername;
+    }
+
+    /**
+     * @param scmUsername the scmUsername to set
+     */
+    public void setScmUsername( String scmUsername )
+    {
+        this.scmUsername = scmUsername;
+    }
+
+    /**
+     * @return the scmPassword
+     */
+    public String getScmPassword()
+    {
+        return scmPassword;
+    }
+
+    /**
+     * @param scmPassword the scmPassword to set
+     */
+    public void setScmPassword( String scmPassword )
+    {
+        this.scmPassword = scmPassword;
+    }
+
+    /**
+     * @return the scmUseCache
+     */
+    public boolean isScmUseCache()
+    {
+        return scmUseCache;
+    }
+
+    /**
+     * @param scmUseCache the scmUseCache to set
+     */
+    public void setScmUseCache( boolean scmUseCache )
+    {
+        this.scmUseCache = scmUseCache;
+    }
+
+    /**
+     * @return the state
+     */
+    public int getState()
+    {
+        return state;
+    }
+
+    /**
+     * @param state the state to set
+     */
+    public void setState( int state )
+    {
+        this.state = state;
+    }
+
+    /**
+     * @return the oldState
+     */
+    public int getOldState()
+    {
+        return oldState;
+    }
+
+    /**
+     * @param oldState the oldState to set
+     */
+    public void setOldState( int oldState )
+    {
+        this.oldState = oldState;
+    }
+
+    /**
+     * @return the latestBuildId
+     */
+    public int getLatestBuildId()
+    {
+        return latestBuildId;
+    }
+
+    /**
+     * @param latestBuildId the latestBuildId to set
+     */
+    public void setLatestBuildId( int latestBuildId )
+    {
+        this.latestBuildId = latestBuildId;
+    }
+
+    /**
+     * @return the buildNumber
+     */
+    public int getBuildNumber()
+    {
+        return buildNumber;
+    }
+
+    /**
+     * @param buildNumber the buildNumber to set
+     */
+    public void setBuildNumber( int buildNumber )
+    {
+        this.buildNumber = buildNumber;
+    }
+
+    /**
+     * @return the workingDirectory
+     */
+    public String getWorkingDirectory()
+    {
+        return workingDirectory;
+    }
+
+    /**
+     * @param workingDirectory the workingDirectory to set
+     */
+    public void setWorkingDirectory( String workingDirectory )
+    {
+        this.workingDirectory = workingDirectory;
+    }
+
+    /**
+     * @return the buildResults
+     */
+    public List<BuildResult> getBuildResults()
+    {
+        return buildResults;
+    }
+
+    /**
+     * @param buildResults the buildResults to set
+     */
+    public void setBuildResults( List<BuildResult> buildResults )
+    {
+        this.buildResults = buildResults;
+    }
+
+    /**
+     * @return the checkoutResult
+     */
+    public ScmResult getCheckoutResult()
+    {
+        return checkoutResult;
+    }
+
+    /**
+     * @param checkoutResult the checkoutResult to set
+     */
+    public void setCheckoutResult( ScmResult checkoutResult )
+    {
+        this.checkoutResult = checkoutResult;
+    }
+
+    /**
+     * @return the developers
+     */
+    public List<ProjectDeveloper> getDevelopers()
+    {
+        return developers;
+    }
+
+    /**
+     * @param developers the developers to set
+     */
+    public void setDevelopers( List<ProjectDeveloper> developers )
+    {
+        this.developers = developers;
+    }
+
+    /**
+     * @return the parent
+     */
+    public ProjectDependency getParent()
+    {
+        return parent;
+    }
+
+    /**
+     * @param parent the parent to set
+     */
+    public void setParent( ProjectDependency parent )
+    {
+        this.parent = parent;
+    }
+
+    /**
+     * @return the dependencies
+     */
+    public List<ProjectDependency> getDependencies()
+    {
+        return dependencies;
+    }
+
+    /**
+     * @param dependencies the dependencies to set
+     */
+    public void setDependencies( List<ProjectDependency> dependencies )
+    {
+        this.dependencies = dependencies;
+    }
+
+    /**
+     * @return the projectGroup
+     */
+    public ProjectGroup getProjectGroup()
+    {
+        return projectGroup;
+    }
+
+    /**
+     * @param projectGroup the projectGroup to set
+     */
+    public void setProjectGroup( ProjectGroup projectGroup )
+    {
+        this.projectGroup = projectGroup;
+    }
+
+    /**
+     * @return the notifiers
+     */
+    public List<ProjectNotifier> getNotifiers()
+    {
+        return notifiers;
+    }
+
+    /**
+     * @param notifiers the notifiers to set
+     */
+    public void setNotifiers( List<ProjectNotifier> notifiers )
+    {
+        this.notifiers = notifiers;
+    }
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectDependency.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectDependency.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectDependency.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectDependency.java Thu May  1 08:19:53 2008
@@ -0,0 +1,89 @@
+package org.apache.continuum.model.project;
+
+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 = "PROJECT_DEPENDENCY")
+public class ProjectDependency
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field groupId
+     */
+    @Basic
+    @Column(name = "GROUP_ID")
+    private String groupId;
+
+    /**
+     * Field artifactId
+     */
+    @Basic
+    @Column(name = "ARTIFACT_ID")
+    private String artifactId;
+
+    /**
+     * Field version
+     */
+    @Basic
+    @Column(name = "VERSION")
+    private String version;
+
+    /**
+     * @return the groupId
+     */
+    public String getGroupId()
+    {
+        return groupId;
+    }
+
+    /**
+     * @param groupId the groupId to set
+     */
+    public void setGroupId( String groupId )
+    {
+        this.groupId = groupId;
+    }
+
+    /**
+     * @return the artifactId
+     */
+    public String getArtifactId()
+    {
+        return artifactId;
+    }
+
+    /**
+     * @param artifactId the artifactId to set
+     */
+    public void setArtifactId( String artifactId )
+    {
+        this.artifactId = artifactId;
+    }
+
+    /**
+     * @return the version
+     */
+    public String getVersion()
+    {
+        return version;
+    }
+
+    /**
+     * @param version the version to set
+     */
+    public void setVersion( String version )
+    {
+        this.version = version;
+    }
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectDeveloper.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectDeveloper.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectDeveloper.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectDeveloper.java Thu May  1 08:19:53 2008
@@ -0,0 +1,48 @@
+package org.apache.continuum.model.project;
+
+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 = "PROJECT_DEVELOPER")
+public class ProjectDeveloper
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field scmId
+     */
+    @Basic
+    @Column(name = "SCM_USERNAME")
+    private String scmId;
+
+    /**
+     * Field name
+     */
+    @Basic
+    @Column(name = "NAME")
+    private String name;
+
+    /**
+     * Field email
+     */
+    @Basic
+    @Column(name = "EMAIL")
+    private String email;
+
+    /**
+     * Field continuumId
+     */
+    @Basic
+    @Column(name = "CONTINUUM_ID", nullable = false)
+    private int continuumId = 0;
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectGroup.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectGroup.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectGroup.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectGroup.java Thu May  1 08:19:53 2008
@@ -0,0 +1,189 @@
+package org.apache.continuum.model.project;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ */
+@Entity
+@Table(name = "PROJECT_GROUP")
+@NamedQueries(
+{
+    @NamedQuery ( name = "ProjectGroup.findProjectGroup", query = "SELECT pg FROM ProjectGroup as pg WHERE pg.groupId = :groupId"),
+    @NamedQuery ( name = "ProjectGroup.findProjects", query = "SELECT pg.projects FROM ProjectGroup as pg WHERE pg = :projectGroup")
+})
+public class ProjectGroup
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field groupId
+     */
+    @Basic
+    @Column(name = "GROUP_ID")
+    private String groupId;
+
+    /**
+     * Field name
+     */
+    @Basic
+    @Column(name = "NAME")
+    private String name;
+
+    /**
+     * Field description
+     */
+    @Basic
+    @Column(name = "DESCRIPTION")
+    private String description;
+
+    /**
+     * Field projects
+     */
+    @OneToMany(mappedBy = "projectGroup")
+    private List<Project> projects;
+
+    /**
+     * Field notifiers
+     */
+    @OneToMany
+    private List<ProjectNotifier> notifiers;
+
+    /**
+     * Field buildDefinitions
+     */
+    @OneToMany
+    private List<BuildDefinition> buildDefinitions;
+
+    public void addProject( Project p )
+    {
+        projects.add( p );
+    }
+
+    public void addNotifier( ProjectNotifier n )
+    {
+        notifiers.add( n );
+    }
+
+    public void removeProject( Project p )
+    {
+        projects.remove( p );
+    }
+
+    public void removeNotifier( ProjectNotifier notifier )
+    {
+        notifiers.remove( notifier );
+    }
+
+    /**
+     * @return the groupId
+     */
+    public String getGroupId()
+    {
+        return groupId;
+    }
+
+    /**
+     * @param groupId the groupId to set
+     */
+    public void setGroupId( String groupId )
+    {
+        this.groupId = groupId;
+    }
+
+    /**
+     * @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 projects
+     */
+    public List<Project> getProjects()
+    {
+        if ( null == this.projects )
+        {
+            this.projects = new ArrayList<Project>();
+        }
+        return projects;
+    }
+
+    /**
+     * @param projects the projects to set
+     */
+    public void setProjects( List<Project> projects )
+    {
+        this.projects = projects;
+    }
+
+    /**
+     * @return the notifiers
+     */
+    public List<ProjectNotifier> getNotifiers()
+    {
+        return notifiers;
+    }
+
+    /**
+     * @param notifiers the notifiers to set
+     */
+    public void setNotifiers( List<ProjectNotifier> notifiers )
+    {
+        this.notifiers = notifiers;
+    }
+
+    /**
+     * @return the buildDefinitions
+     */
+    public List<BuildDefinition> getBuildDefinitions()
+    {
+        return buildDefinitions;
+    }
+
+    /**
+     * @param buildDefinitions the buildDefinitions to set
+     */
+    public void setBuildDefinitions( List<BuildDefinition> buildDefinitions )
+    {
+        this.buildDefinitions = buildDefinitions;
+    }
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectNotifier.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectNotifier.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectNotifier.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/ProjectNotifier.java Thu May  1 08:19:53 2008
@@ -0,0 +1,119 @@
+package org.apache.continuum.model.project;
+
+import org.apache.continuum.model.CommonUpdatableEntity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
+import java.util.Map;
+
+/**
+ * Configures one method for notifying users/developers when a build breaks.
+ * <p/>
+ * TODO: Review this to use discriminators for different Notifier extensions.
+ *
+ * @version $Id$
+ */
+@Entity
+@Table(name = "PROJECT_NOTIFIER")
+@NamedQueries
+({
+    @NamedQuery( name = "Notifier.findAllFromProject", query = "SELECT p.notifiers from Project as p WHERE p.id = :projectId"),
+    @NamedQuery( name = "Notifier.findAllFromProjectGroup", query = "SELECT pg.notifiers from ProjectGroup as pg WHERE pg.id = :projectGroupId")
+})
+public class ProjectNotifier
+    extends CommonUpdatableEntity
+{
+    /**
+     * Field type
+     * <p/>
+     * TODO: This is a candidate for enum type.
+     */
+    @Column(name = "GROUP_ID")
+    private String type = "mail";
+
+    /**
+     * Field from
+     */
+    @Column(name = "NOTIFIER_ORIGIN", nullable = false)
+    private int from = 0;
+
+    /**
+     * Field enabled
+     */
+    @Column(name = "FLG_ENABLED", nullable = false)
+    private boolean enabled = true;
+
+    /**
+     * Field recipientType
+     */
+    @Column(name = "RECIPIENT_TYPE", nullable = false)
+    private int recipientType = 0;
+
+    /**
+     * Field sendOnSuccess
+     */
+    @Column(name = "FLG_SEND_ON_SUCCESS", nullable = false)
+    private boolean sendOnSuccess = true;
+
+    /**
+     * Field sendOnFailure
+     */
+    @Column(name = "FLG_SEND_ON_FAILURE", nullable = false)
+    private boolean sendOnFailure = true;
+
+    /**
+     * Field sendOnError
+     */
+    @Column(name = "FLG_SEND_ON_ERROR", nullable = false)
+    private boolean sendOnError = true;
+
+    /**
+     * Field sendOnWarning
+     */
+    @Column(name = "FLG_SEND_ON_WARNING", nullable = false)
+    private boolean sendOnWarning = true;
+
+    /**
+     * Field configuration.
+     * <p/>
+     * TODO: Map!
+     */
+    @Transient
+    private Map configuration;
+
+    /**
+     * TODO: Map! Enum?
+     */
+    public static final int FROM_PROJECT = 1;
+
+    /**
+     * TODO: Map! Enum?
+     */
+    public static final int FROM_USER = 2;
+
+    /**
+     * Method toString
+     */
+    public java.lang.String toString()
+    {
+        StringBuffer buf = new StringBuffer();
+        buf.append( "id = '" );
+        buf.append( getId() + "'" );
+        return buf.toString();
+    } // -- java.lang.String toString()
+
+    public boolean isFromProject()
+    {
+        return from == FROM_PROJECT;
+    }
+
+    public boolean isFromUser()
+    {
+        return from == FROM_USER;
+    }
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/Schedule.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/Schedule.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/Schedule.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/project/Schedule.java Thu May  1 08:19:53 2008
@@ -0,0 +1,158 @@
+package org.apache.continuum.model.project;
+
+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 = "BUILD_SCHEDULE")
+public class Schedule
+    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 delay
+     */
+    @Basic
+    @Column(name = "SCHEDULE_DELAY")
+    private int delay = 0;
+
+    /**
+     * Field maxJobExecutionTime
+     */
+    @Basic
+    @Column(name = "MAX_JOB_EXECUTION_TIME")
+    private int maxJobExecutionTime = 3600;
+
+    /**
+     * Field cronExpression
+     */
+    @Basic
+    @Column(name = "CRON_EXPRESSION")
+    private String cronExpression;
+
+    /**
+     * @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 delay
+     */
+    public int getDelay()
+    {
+        return delay;
+    }
+
+    /**
+     * @param delay the delay to set
+     */
+    public void setDelay( int delay )
+    {
+        this.delay = delay;
+    }
+
+    /**
+     * @return the maxJobExecutionTime
+     */
+    public int getMaxJobExecutionTime()
+    {
+        return maxJobExecutionTime;
+    }
+
+    /**
+     * @param maxJobExecutionTime the maxJobExecutionTime to set
+     */
+    public void setMaxJobExecutionTime( int maxJobExecutionTime )
+    {
+        this.maxJobExecutionTime = maxJobExecutionTime;
+    }
+
+    /**
+     * @return the cronExpression
+     */
+    public String getCronExpression()
+    {
+        return cronExpression;
+    }
+
+    /**
+     * @param cronExpression the cronExpression to set
+     */
+    public void setCronExpression( String cronExpression )
+    {
+        this.cronExpression = cronExpression;
+    }
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ChangeFile.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ChangeFile.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ChangeFile.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ChangeFile.java Thu May  1 08:19:53 2008
@@ -0,0 +1,91 @@
+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 = "CHANGE_FILE")
+public class ChangeFile
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field name
+     */
+    @Basic
+    @Column(name = "NAME")
+    private String name;
+
+    /**
+     * Field revision
+     */
+    @Basic
+    @Column(name = "REVISION")
+    private String revision;
+
+    /**
+     * Field status
+     * <p/>
+     * TODO: Enum?
+     */
+    @Basic
+    @Column(name = "STATUS")
+    private String status;
+
+    /**
+     * @return the name
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    /**
+     * @return the revision
+     */
+    public String getRevision()
+    {
+        return revision;
+    }
+
+    /**
+     * @param revision the revision to set
+     */
+    public void setRevision( String revision )
+    {
+        this.revision = revision;
+    }
+
+    /**
+     * @return the status
+     */
+    public String getStatus()
+    {
+        return status;
+    }
+
+    /**
+     * @param status the status to set
+     */
+    public void setStatus( String status )
+    {
+        this.status = status;
+    }
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ChangeSet.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ChangeSet.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ChangeSet.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ChangeSet.java Thu May  1 08:19:53 2008
@@ -0,0 +1,116 @@
+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 javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
+ * @version $Id$
+ */
+@Entity
+@Table(name = "CHANGE_SET")
+public class ChangeSet
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field author
+     */
+    @Basic
+    @Column(name = "AUTHOR")
+    private String author;
+
+    /**
+     * Field comment
+     */
+    @Basic
+    @Column(name = "COMMENT_TEXT")
+    private String comment;
+
+    /**
+     * Field date
+     */
+    @Temporal(TemporalType.TIME)
+    @Column(name = "DATE", nullable = false)
+    private Date date;
+
+    /**
+     * Field files
+     */
+    @OneToMany
+    private List<ChangeFile> files;
+
+    /**
+     * @return the author
+     */
+    public String getAuthor()
+    {
+        return author;
+    }
+
+    /**
+     * @param author the author to set
+     */
+    public void setAuthor( String author )
+    {
+        this.author = author;
+    }
+
+    /**
+     * @return the comment
+     */
+    public String getComment()
+    {
+        return comment;
+    }
+
+    /**
+     * @param comment the comment to set
+     */
+    public void setComment( String comment )
+    {
+        this.comment = comment;
+    }
+
+    /**
+     * @return the date
+     */
+    public Date getDate()
+    {
+        return date;
+    }
+
+    /**
+     * @param date the date to set
+     */
+    public void setDate( Date date )
+    {
+        this.date = date;
+    }
+
+    /**
+     * @return the files
+     */
+    public List<ChangeFile> getFiles()
+    {
+        return files;
+    }
+
+    /**
+     * @param files the files to set
+     */
+    public void setFiles( List<ChangeFile> files )
+    {
+        this.files = files;
+    }
+
+}

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

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

Added: continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ScmResult.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ScmResult.java?rev=652556&view=auto
==============================================================================
--- continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ScmResult.java (added)
+++ continuum/branches/continuum-jpa-evenisse/src/main/java/org/apache/continuum/model/scm/ScmResult.java Thu May  1 08:19:53 2008
@@ -0,0 +1,159 @@
+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 = "SCM_RESULT")
+public class ScmResult
+    extends CommonUpdatableEntity
+{
+
+    /**
+     * Field success
+     */
+    @Basic
+    @Column(name = "FLG_SUCCESS")
+    private boolean success = false;
+
+    /**
+     * Field commandLine
+     */
+    @Basic
+    @Column(name = "COMMAND_LINE")
+    private String commandLine;
+
+    /**
+     * Field providerMessage
+     */
+    @Basic
+    @Column(name = "PROVIDER_MESSAGE")
+    private String providerMessage;
+
+    /**
+     * Field commandOutput
+     */
+    @Basic
+    @Column(name = "COMMAND_OUTPUT")
+    private String commandOutput;
+
+    /**
+     * Field exception XXX: Renamed from 'EXCEPTION' to 'EXCEPTION_MSG'
+     */
+    @Basic
+    @Column(name = "EXCEPTION_MSG")
+    private String exception;
+
+    /**
+     * Field changes
+     */
+    @OneToMany
+    private List<ChangeSet> changes;
+
+    /**
+     * @return the success
+     */
+    public boolean isSuccess()
+    {
+        return success;
+    }
+
+    /**
+     * @param success the success to set
+     */
+    public void setSuccess( boolean success )
+    {
+        this.success = success;
+    }
+
+    /**
+     * @return the commandLine
+     */
+    public String getCommandLine()
+    {
+        return commandLine;
+    }
+
+    /**
+     * @param commandLine the commandLine to set
+     */
+    public void setCommandLine( String commandLine )
+    {
+        this.commandLine = commandLine;
+    }
+
+    /**
+     * @return the providerMessage
+     */
+    public String getProviderMessage()
+    {
+        return providerMessage;
+    }
+
+    /**
+     * @param providerMessage the providerMessage to set
+     */
+    public void setProviderMessage( String providerMessage )
+    {
+        this.providerMessage = providerMessage;
+    }
+
+    /**
+     * @return the commandOutput
+     */
+    public String getCommandOutput()
+    {
+        return commandOutput;
+    }
+
+    /**
+     * @param commandOutput the commandOutput to set
+     */
+    public void setCommandOutput( String commandOutput )
+    {
+        this.commandOutput = commandOutput;
+    }
+
+    /**
+     * @return the exception
+     */
+    public String getException()
+    {
+        return exception;
+    }
+
+    /**
+     * @param exception the exception to set
+     */
+    public void setException( String exception )
+    {
+        this.exception = exception;
+    }
+
+    /**
+     * @return the changes
+     */
+    public List<ChangeSet> getChanges()
+    {
+        return changes;
+    }
+
+    /**
+     * @param changes the changes to set
+     */
+    public void setChanges( List<ChangeSet> changes )
+    {
+        this.changes = changes;
+    }
+
+}

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

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



Mime
View raw message