com.atlassian.bamboo.build
Class BuildHibernateDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.hibernate.HibernateObjectDao
              extended by com.atlassian.bamboo.persistence.BambooHibernateObjectDao
                  extended by com.atlassian.bamboo.build.BuildHibernateDao
All Implemented Interfaces:
bucket.core.persistence.ObjectDao, BuildDao, BambooObjectDao, org.springframework.beans.factory.InitializingBean

public class BuildHibernateDao
extends BambooHibernateObjectDao
implements BuildDao


Field Summary
 
Fields inherited from class com.atlassian.hibernate.HibernateObjectDao
log
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
BuildHibernateDao()
           
 
Method Summary
 void addChildBuild(Build build, java.lang.String childBuildKey)
           
 java.util.Collection getAllBuilds()
          Returns all builds in the system
 Build getBuildByKey(java.lang.String key)
          Returns a Build object that matches the key.
 Build getBuildByName(java.lang.String buildName)
           
 Build getBuildByProjectAndName(java.lang.String projectKey, java.lang.String buildName)
           
 java.util.Collection getBuildsByProject(Project project)
           
 java.util.Collection getBuildsForDeletion()
          Returns all builds marked for deletion.
 java.lang.Class getPersistentClass()
           
 boolean isExistingBuildKey(java.lang.String projectKey, java.lang.String buildKey)
           
 boolean isExistingBuildName(java.lang.String projectKey, java.lang.String buildName)
           
 int retrieveNextBuildNumber(java.lang.String planKey)
           
 void saveBuild(Build build)
           
 void saveBuildAndDefinition(Build build)
           
 void updateBuild(Build build)
           
 
Methods inherited from class com.atlassian.bamboo.persistence.BambooHibernateObjectDao
findById
 
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao
findAll, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex, updateModificationData
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.persistence.BambooObjectDao
findById
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, refresh, remove, replicate, save, saveRaw
 

Constructor Detail

BuildHibernateDao

public BuildHibernateDao()
Method Detail

getPersistentClass

public java.lang.Class getPersistentClass()
Specified by:
getPersistentClass in interface bucket.core.persistence.ObjectDao

getBuildByKey

public Build getBuildByKey(java.lang.String key)
Description copied from interface: BuildDao
Returns a Build object that matches the key.

Specified by:
getBuildByKey in interface BuildDao
Parameters:
key - - must not be null
Returns:
the Build. Null if not founf

getAllBuilds

public java.util.Collection getAllBuilds()
Description copied from interface: BuildDao
Returns all builds in the system

Specified by:
getAllBuilds in interface BuildDao
Returns:
Collections.EMPTY_LIST

getBuildsForDeletion

public java.util.Collection getBuildsForDeletion()
Description copied from interface: BuildDao
Returns all builds marked for deletion.

Specified by:
getBuildsForDeletion in interface BuildDao
Returns:
List of Build. If no results Collections.EMPTY_LIST

updateBuild

public void updateBuild(Build build)
Specified by:
updateBuild in interface BuildDao

getBuildByName

public Build getBuildByName(java.lang.String buildName)
Specified by:
getBuildByName in interface BuildDao

getBuildsByProject

public java.util.Collection getBuildsByProject(Project project)
Specified by:
getBuildsByProject in interface BuildDao

saveBuildAndDefinition

public void saveBuildAndDefinition(Build build)
Specified by:
saveBuildAndDefinition in interface BuildDao

saveBuild

public void saveBuild(Build build)
Specified by:
saveBuild in interface BuildDao

retrieveNextBuildNumber

public int retrieveNextBuildNumber(java.lang.String planKey)
Specified by:
retrieveNextBuildNumber in interface BuildDao

isExistingBuildName

public boolean isExistingBuildName(java.lang.String projectKey,
                                   java.lang.String buildName)
Specified by:
isExistingBuildName in interface BuildDao

getBuildByProjectAndName

public Build getBuildByProjectAndName(java.lang.String projectKey,
                                      java.lang.String buildName)
Specified by:
getBuildByProjectAndName in interface BuildDao

isExistingBuildKey

public boolean isExistingBuildKey(java.lang.String projectKey,
                                  java.lang.String buildKey)
Specified by:
isExistingBuildKey in interface BuildDao

addChildBuild

public void addChildBuild(Build build,
                          java.lang.String childBuildKey)
Specified by:
addChildBuild in interface BuildDao


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.