continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From batkin...@apache.org
Subject svn commit: r1677633 - in /continuum/trunk: continuum-api/src/main/java/org/apache/continuum/dao/ continuum-api/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum-store/src/main/java/org/apache/...
Date Mon, 04 May 2015 16:45:33 GMT
Author: batkinson
Date: Mon May  4 16:45:32 2015
New Revision: 1677633

URL: http://svn.apache.org/r1677633
Log:
Removed unused (and odd) code for getting result(s?) by build number.

Modified:
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/BuildResultDao.java
    continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/BuildResultDao.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/BuildResultDao.java?rev=1677633&r1=1677632&r2=1677633&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/BuildResultDao.java
(original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/BuildResultDao.java
Mon May  4 16:45:32 2015
@@ -113,8 +113,6 @@ public interface BuildResultDao
 
     Map<Integer, BuildResult> getBuildResultsInSuccessByProjectGroupId( int projectGroupId
);
 
-    List<BuildResult> getBuildResultByBuildNumber( int projectId, int buildNumber );
-
     List<BuildResult> getBuildResultsByBuildDefinition( int projectId, int buildDefinitionId
);
 
     List<BuildResult> getBuildResultsByBuildDefinition( int projectId, int buildDefinitionId,
long startIndex,

Modified: continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=1677633&r1=1677632&r2=1677633&view=diff
==============================================================================
--- continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
(original)
+++ continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
Mon May  4 16:45:32 2015
@@ -190,9 +190,6 @@ public interface Continuum
     BuildResult getBuildResult( int buildId )
         throws ContinuumException;
 
-    BuildResult getBuildResultByBuildNumber( int projectId, int buildNumber )
-        throws ContinuumException;
-
     String getBuildOutput( int projectId, int buildId )
         throws ContinuumException;
 

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=1677633&r1=1677632&r2=1677633&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Mon May  4 16:45:32 2015
@@ -532,14 +532,6 @@ public class DefaultContinuum
         return buildResultDao.getLatestBuildResultForProject( projectId );
     }
 
-    public BuildResult getBuildResultByBuildNumber( int projectId, int buildNumber )
-        throws ContinuumException
-    {
-        List<BuildResult> builds = buildResultDao.getBuildResultByBuildNumber( projectId,
buildNumber );
-
-        return ( builds.isEmpty() ? null : builds.get( 0 ) );
-    }
-
     public List<BuildResult> getBuildResultsInRange( Collection<Integer> projectGroupIds,
Date fromDate, Date toDate,
                                                      int state, String triggeredBy, int offset,
int length )
     {

Modified: continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java?rev=1677633&r1=1677632&r2=1677633&view=diff
==============================================================================
--- continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java
(original)
+++ continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java
Mon May  4 16:45:32 2015
@@ -384,38 +384,6 @@ public class BuildResultDaoImpl
         return getObjectById( BuildResult.class, buildId, BUILD_RESULT_WITH_DETAILS_FETCH_GROUP
);
     }
 
-    public List<BuildResult> getBuildResultByBuildNumber( int projectId, int buildNumber
)
-    {
-        PersistenceManager pm = getPersistenceManager();
-
-        Transaction tx = pm.currentTransaction();
-
-        try
-        {
-            tx.begin();
-
-            Extent extent = pm.getExtent( BuildResult.class, true );
-
-            Query query = pm.newQuery( extent );
-
-            query.declareParameters( "int projectId, int buildNumber" );
-
-            query.setFilter( "this.project.id == projectId && this.buildNumber ==
buildNumber" );
-
-            List<BuildResult> result = (List<BuildResult>) query.execute( projectId,
buildNumber );
-
-            result = (List<BuildResult>) pm.detachCopyAll( result );
-
-            tx.commit();
-
-            return result;
-        }
-        finally
-        {
-            rollback( tx );
-        }
-    }
-
     public List<BuildResult> getBuildResultsByBuildDefinition( int projectId, int buildDefinitionId
)
     {
         return getBuildResultsByBuildDefinition( projectId, buildDefinitionId, -1, -1 );



Mime
View raw message