org.apache.continuum.dao
Class BuildDefinitionDaoImpl

java.lang.Object
  extended by org.apache.continuum.dao.AbstractDao
      extended by org.apache.continuum.dao.BuildDefinitionDaoImpl
All Implemented Interfaces:
BuildDefinitionDao

@Repository(value="buildDefinitionDao")
public class BuildDefinitionDaoImpl
extends AbstractDao
implements BuildDefinitionDao

Version:
$Id: BuildDefinitionDaoImpl.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
BuildDefinitionDaoImpl()
           
 
Method Summary
 BuildDefinition addBuildDefinition(BuildDefinition buildDefinition)
           
 List<BuildDefinition> getAllBuildDefinitions()
           
 List<BuildDefinition> getAllTemplates()
           
 BuildDefinition getBuildDefinition(int buildDefinitionId)
           
 List<BuildDefinition> getBuildDefinitionsBySchedule(int scheduleId)
           
 BuildDefinition getDefaultBuildDefinition(int projectId)
          returns the default build definition of the project, if the project doesn't have on declared the default of the project group will be returned

this should be the most common usage of the default build definition accessing methods

 BuildDefinition getDefaultBuildDefinitionForProject(int projectId)
          returns the default build definition of the project, if the project doesn't have on declared the default of the project group will be returned

this should be the most common usage of the default build definition accessing methods

 BuildDefinition getDefaultBuildDefinitionForProject(Project project)
          returns the default build definition for the project without consulting the project group
 Map<Integer,Integer> getDefaultBuildDefinitions()
          Returns the default build definition of all projects.
 List<BuildDefinition> getDefaultBuildDefinitionsForProjectGroup(int projectGroupId)
          returns the default build definitions for the project group and there should always be at least one declared.
 List<BuildDefinition> getDefaultBuildDefinitionsForProjectGroup(ProjectGroup projectGroup)
          returns the default build definitions for the project group and there should always be at least one declared.
 void removeBuildDefinition(BuildDefinition buildDefinition)
           
 BuildDefinition storeBuildDefinition(BuildDefinition buildDefinition)
           
 
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

BuildDefinitionDaoImpl

public BuildDefinitionDaoImpl()
Method Detail

getBuildDefinition

public BuildDefinition getBuildDefinition(int buildDefinitionId)
                                   throws ContinuumStoreException
Specified by:
getBuildDefinition in interface BuildDefinitionDao
Throws:
ContinuumStoreException

removeBuildDefinition

public void removeBuildDefinition(BuildDefinition buildDefinition)
                           throws ContinuumStoreException
Specified by:
removeBuildDefinition in interface BuildDefinitionDao
Throws:
ContinuumStoreException

storeBuildDefinition

public BuildDefinition storeBuildDefinition(BuildDefinition buildDefinition)
                                     throws ContinuumStoreException
Specified by:
storeBuildDefinition in interface BuildDefinitionDao
Throws:
ContinuumStoreException

addBuildDefinition

public BuildDefinition addBuildDefinition(BuildDefinition buildDefinition)
                                   throws ContinuumStoreException
Specified by:
addBuildDefinition in interface BuildDefinitionDao
Throws:
ContinuumStoreException

getAllBuildDefinitions

public List<BuildDefinition> getAllBuildDefinitions()
                                             throws ContinuumStoreException
Specified by:
getAllBuildDefinitions in interface BuildDefinitionDao
Throws:
ContinuumStoreException

getDefaultBuildDefinitions

public Map<Integer,Integer> getDefaultBuildDefinitions()
Description copied from interface: BuildDefinitionDao
Returns the default build definition of all projects. The key is the project id and the value is the build definition id.

Specified by:
getDefaultBuildDefinitions in interface BuildDefinitionDao
Returns:
a map of all default build definitions

getDefaultBuildDefinitionsForProjectGroup

public List<BuildDefinition> getDefaultBuildDefinitionsForProjectGroup(int projectGroupId)
                                                                throws ContinuumStoreException
Description copied from interface: BuildDefinitionDao
returns the default build definitions for the project group and there should always be at least one declared.

Specified by:
getDefaultBuildDefinitionsForProjectGroup in interface BuildDefinitionDao
Parameters:
projectGroupId - The project group id
Returns:
The list of default build definitions
Throws:
ContinuumStoreException - if the build definitions list can't be obtain

getDefaultBuildDefinitionsForProjectGroup

public List<BuildDefinition> getDefaultBuildDefinitionsForProjectGroup(ProjectGroup projectGroup)
                                                                throws ContinuumStoreException
Description copied from interface: BuildDefinitionDao
returns the default build definitions for the project group and there should always be at least one declared.

Specified by:
getDefaultBuildDefinitionsForProjectGroup in interface BuildDefinitionDao
Parameters:
projectGroup - The project group
Returns:
The list of default build definitions
Throws:
ContinuumStoreException - if the build definitions list can't be obtain

getDefaultBuildDefinitionForProject

public BuildDefinition getDefaultBuildDefinitionForProject(int projectId)
                                                    throws ContinuumStoreException
Description copied from interface: BuildDefinitionDao
returns the default build definition of the project, if the project doesn't have on declared the default of the project group will be returned

this should be the most common usage of the default build definition accessing methods

Specified by:
getDefaultBuildDefinitionForProject in interface BuildDefinitionDao
Returns:
Throws:
ContinuumStoreException
ContinuumObjectNotFoundException

getDefaultBuildDefinitionForProject

public BuildDefinition getDefaultBuildDefinitionForProject(Project project)
                                                    throws ContinuumStoreException
Description copied from interface: BuildDefinitionDao
returns the default build definition for the project without consulting the project group

Specified by:
getDefaultBuildDefinitionForProject in interface BuildDefinitionDao
Returns:
Throws:
ContinuumStoreException
ContinuumObjectNotFoundException

getDefaultBuildDefinition

public BuildDefinition getDefaultBuildDefinition(int projectId)
                                          throws ContinuumStoreException
Description copied from interface: BuildDefinitionDao
returns the default build definition of the project, if the project doesn't have on declared the default of the project group will be returned

this should be the most common usage of the default build definition accessing methods

Specified by:
getDefaultBuildDefinition in interface BuildDefinitionDao
Returns:
Throws:
ContinuumStoreException
ContinuumObjectNotFoundException

getAllTemplates

public List<BuildDefinition> getAllTemplates()
                                      throws ContinuumStoreException
Specified by:
getAllTemplates in interface BuildDefinitionDao
Throws:
ContinuumStoreException

getBuildDefinitionsBySchedule

public List<BuildDefinition> getBuildDefinitionsBySchedule(int scheduleId)
Specified by:
getBuildDefinitionsBySchedule in interface BuildDefinitionDao


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