org.apache.continuum.dao
Class BuildResultDaoImpl

java.lang.Object
  extended by org.apache.continuum.dao.AbstractDao
      extended by org.apache.continuum.dao.BuildResultDaoImpl
All Implemented Interfaces:
BuildResultDao

@Repository(value="buildResultDao")
public class BuildResultDaoImpl
extends AbstractDao
implements BuildResultDao

Version:
$Id: BuildResultDaoImpl.java 1372260 2012-08-13 04:29:09Z brett $
Author:
Emmanuel Venisse

Field Summary
 
Fields inherited from class org.apache.continuum.dao.AbstractDao
BUILD_RESULT_WITH_DETAILS_FETCH_GROUP, BUILD_TEMPLATE_BUILD_DEFINITIONS, PROJECT_ALL_DETAILS_FETCH_GROUP, PROJECT_BUILD_DETAILS_FETCH_GROUP, PROJECT_DEPENDENCIES_FETCH_GROUP, PROJECT_WITH_BUILDS_FETCH_GROUP, PROJECT_WITH_CHECKOUT_RESULT_FETCH_GROUP, PROJECTGROUP_PROJECTS_FETCH_GROUP
 
Constructor Summary
BuildResultDaoImpl()
           
 
Method Summary
 void addBuildResult(Project project, BuildResult build)
           
 List<BuildResult> getAllBuildsForAProjectByDate(int projectId)
           
 BuildResult getBuildResult(int buildId)
           
 List<BuildResult> getBuildResultByBuildNumber(int projectId, int buildNumber)
           
 List<BuildResult> getBuildResultsByBuildDefinition(int projectId, int buildDefinitionId)
           
 List<BuildResult> getBuildResultsByBuildDefinition(int projectId, int buildDefinitionId, long startIndex, long endIndex)
           
 List<BuildResult> getBuildResultsForProject(int projectId)
           
 List<BuildResult> getBuildResultsForProject(int projectId, long startIndex, long endIndex)
           
 List<BuildResult> getBuildResultsForProjectFromId(int projectId, long startId)
           
 List<BuildResult> getBuildResultsForProjectWithDetails(int projectId, long fromDate, int tobuildResultId)
          Returns the list of build results between the fromdate and the buildResult defined by its toBuildResultId
 List<BuildResult> getBuildResultsInRange(Date fromDate, Date toDate, int state, String triggeredBy, int projectGroupId)
           
 Map<Integer,BuildResult> getBuildResultsInSuccessByProjectGroupId(int projectGroupId)
           
 BuildResult getLatestBuildResultForBuildDefinition(int projectId, int buildDefinitionId)
           
 BuildResult getLatestBuildResultForProject(int projectId)
           
 BuildResult getLatestBuildResultForProjectWithDetails(int projectId)
           
 BuildResult getLatestBuildResultInSuccess(int projectId)
           
 Map<Integer,BuildResult> getLatestBuildResultsByProjectGroupId(int projectGroupId)
           
 long getNbBuildResultsForProject(int projectId)
           
 long getNbBuildResultsInSuccessForProject(int projectId, long fromDate)
          Returns the number of build results in success since fromDate
 BuildResult getPreviousBuildResultInSuccess(int projectId, int buildResultId)
           
 void removeBuildResult(BuildResult buildResult)
           
 void updateBuildResult(BuildResult build)
           
 
Methods inherited from class org.apache.continuum.dao.AbstractDao
addObject, attachAndDelete, getAllObjectsDetached, getAllObjectsDetached, getAllObjectsDetached, getAllObjectsDetached, getContinuumPersistenceManagerFactory, getObjectById, getObjectById, getObjectFromQuery, getPersistenceManager, makePersistent, removeObject, rollback, updateObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildResultDaoImpl

public BuildResultDaoImpl()
Method Detail

updateBuildResult

public void updateBuildResult(BuildResult build)
                       throws ContinuumStoreException
Specified by:
updateBuildResult in interface BuildResultDao
Throws:
ContinuumStoreException

addBuildResult

public void addBuildResult(Project project,
                           BuildResult build)
                    throws ContinuumStoreException
Specified by:
addBuildResult in interface BuildResultDao
Throws:
ContinuumStoreException

getLatestBuildResultForProject

public BuildResult getLatestBuildResultForProject(int projectId)
Specified by:
getLatestBuildResultForProject in interface BuildResultDao

getLatestBuildResultForProjectWithDetails

public BuildResult getLatestBuildResultForProjectWithDetails(int projectId)
Specified by:
getLatestBuildResultForProjectWithDetails in interface BuildResultDao

getLatestBuildResultForBuildDefinition

public BuildResult getLatestBuildResultForBuildDefinition(int projectId,
                                                          int buildDefinitionId)
Specified by:
getLatestBuildResultForBuildDefinition in interface BuildResultDao

getLatestBuildResultsByProjectGroupId

public Map<Integer,BuildResult> getLatestBuildResultsByProjectGroupId(int projectGroupId)
Specified by:
getLatestBuildResultsByProjectGroupId in interface BuildResultDao

removeBuildResult

public void removeBuildResult(BuildResult buildResult)
Specified by:
removeBuildResult in interface BuildResultDao

getAllBuildsForAProjectByDate

public List<BuildResult> getAllBuildsForAProjectByDate(int projectId)
Specified by:
getAllBuildsForAProjectByDate in interface BuildResultDao

getBuildResult

public BuildResult getBuildResult(int buildId)
                           throws ContinuumStoreException
Specified by:
getBuildResult in interface BuildResultDao
Throws:
ContinuumStoreException

getBuildResultByBuildNumber

public List<BuildResult> getBuildResultByBuildNumber(int projectId,
                                                     int buildNumber)
Specified by:
getBuildResultByBuildNumber in interface BuildResultDao

getBuildResultsByBuildDefinition

public List<BuildResult> getBuildResultsByBuildDefinition(int projectId,
                                                          int buildDefinitionId)
Specified by:
getBuildResultsByBuildDefinition in interface BuildResultDao

getBuildResultsByBuildDefinition

public List<BuildResult> getBuildResultsByBuildDefinition(int projectId,
                                                          int buildDefinitionId,
                                                          long startIndex,
                                                          long endIndex)
Specified by:
getBuildResultsByBuildDefinition in interface BuildResultDao

getNbBuildResultsForProject

public long getNbBuildResultsForProject(int projectId)
Specified by:
getNbBuildResultsForProject in interface BuildResultDao

getNbBuildResultsInSuccessForProject

public long getNbBuildResultsInSuccessForProject(int projectId,
                                                 long fromDate)
Description copied from interface: BuildResultDao
Returns the number of build results in success since fromDate

Specified by:
getNbBuildResultsInSuccessForProject in interface BuildResultDao
Parameters:
projectId - The project id
fromDate - The from date
Returns:
the number of build results

getBuildResultsForProjectWithDetails

public List<BuildResult> getBuildResultsForProjectWithDetails(int projectId,
                                                              long fromDate,
                                                              int tobuildResultId)
Description copied from interface: BuildResultDao
Returns the list of build results between the fromdate and the buildResult defined by its toBuildResultId

Specified by:
getBuildResultsForProjectWithDetails in interface BuildResultDao
Parameters:
projectId - The project id
fromDate - the from date
tobuildResultId - the build result id
Returns:
the list of build results

getBuildResultsForProject

public List<BuildResult> getBuildResultsForProject(int projectId)
Specified by:
getBuildResultsForProject in interface BuildResultDao

getBuildResultsForProject

public List<BuildResult> getBuildResultsForProject(int projectId,
                                                   long startIndex,
                                                   long endIndex)
Specified by:
getBuildResultsForProject in interface BuildResultDao

getBuildResultsForProjectFromId

public List<BuildResult> getBuildResultsForProjectFromId(int projectId,
                                                         long startId)
                                                  throws ContinuumStoreException
Specified by:
getBuildResultsForProjectFromId in interface BuildResultDao
Returns:
the returned list will contains all BuildResult for this project after the startId
Throws:
ContinuumStoreException

getLatestBuildResultInSuccess

public BuildResult getLatestBuildResultInSuccess(int projectId)
Specified by:
getLatestBuildResultInSuccess in interface BuildResultDao

getPreviousBuildResultInSuccess

public BuildResult getPreviousBuildResultInSuccess(int projectId,
                                                   int buildResultId)
                                            throws ContinuumStoreException
Specified by:
getPreviousBuildResultInSuccess in interface BuildResultDao
Throws:
ContinuumStoreException

getBuildResultsInSuccessByProjectGroupId

public Map<Integer,BuildResult> getBuildResultsInSuccessByProjectGroupId(int projectGroupId)
Specified by:
getBuildResultsInSuccessByProjectGroupId in interface BuildResultDao

getBuildResultsInRange

public List<BuildResult> getBuildResultsInRange(Date fromDate,
                                                Date toDate,
                                                int state,
                                                String triggeredBy,
                                                int projectGroupId)
Specified by:
getBuildResultsInRange in interface BuildResultDao


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.