continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r209657 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
Date Thu, 07 Jul 2005 22:02:16 GMT
Author: jvanzyl
Date: Thu Jul  7 15:02:13 2005
New Revision: 209657

URL: http://svn.apache.org/viewcvs?rev=209657&view=rev
Log:
o cleaning out old getLatestBuild method

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java?rev=209657&r1=209656&r2=209657&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ModelloJPoxContinuumStore.java
Thu Jul  7 15:02:13 2005
@@ -397,46 +397,6 @@
         }
     }
 
-    public ContinuumBuild getLatestBuildForProjectx( String projectId )
-        throws ContinuumStoreException
-    {
-        // TODO: Find a better way to query for the latest build.
-
-        try
-        {
-            store.begin();
-
-            PersistenceManager pm = store.getThreadState().getPersistenceManager();
-
-            Query q = pm.newQuery( ContinuumBuild.class );
-            q.declareParameters( "String projectId" );
-            q.setFilter( "this.project.id == projectId" );
-            q.setOrdering( "startTime descending" );
-            Collection builds = (Collection) q.execute( projectId );
-
-            if ( builds.size() == 0 )
-            {
-                store.commit();
-
-                return null;
-            }
-
-            ContinuumBuild build = (ContinuumBuild) builds.iterator().next();
-
-            build = (ContinuumBuild) store.getThreadState().getPersistenceManager().detachCopy(
build );
-
-            store.commit();
-
-            return build;
-        }
-        catch ( Exception e )
-        {
-            rollback( store );
-
-            throw new ContinuumStoreException( "Error while loading last build for project
id: '" + projectId + "'.", e );
-        }
-    }
-
     public Collection getBuildsForProject( String projectId, int start, int end )
         throws ContinuumStoreException
     {



Mime
View raw message