com.atlassian.bamboo.chains
Class ChainResultHibernateDao

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.chains.ChainResultHibernateDao
All Implemented Interfaces:
bucket.core.persistence.ObjectDao, ChainResultDao, BambooObjectDao, org.springframework.beans.factory.InitializingBean

public class ChainResultHibernateDao
extends BambooHibernateObjectDao
implements ChainResultDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
ChainResultHibernateDao()
           
 
Method Summary
 int countChainResults(Chain chain)
          Count number of chain results
 java.util.List<ChainResult> getAllChainResults(Chain chain)
          Load a saved ChainResult
 java.util.Collection<ChainResult> getAllPendingChainResults()
          Returns all the ChainResults in a BuildState.PENDING state
 java.util.List<ChainResult> getAllResults()
          Returns all ChainResult
 ChainResult getChainResult(Chain chain, int chainNumber)
          Load a saved ChainResult
 ChainResult getChainResult(PlanResultKey planResultKey)
          Get the result by its PlanResultKey
 ChainStageResult getChainStageResultById(long id)
          Returns a ChainStageResult by its id
 java.util.List<ChainResult> getNChainResults(Chain chain, int firstResult, int maxResults)
          Load list of results related to chain, list is ordered descending by chain number ChainResults in PENDING state are left out of the results
 java.lang.Class getPersistentClass()
           
 boolean hasResults(Chain chain)
          Test if chain has any results
 void save(ChainResult chainResult)
          Save a ChainResult
 
Methods inherited from class com.atlassian.bamboo.persistence.BambooHibernateObjectDao
executeCountQuery, executeReturnLong, findById, 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

ChainResultHibernateDao

public ChainResultHibernateDao()
Method Detail

getPersistentClass

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

getChainResult

@Nullable
public ChainResult getChainResult(@NotNull
                                           Chain chain,
                                           int chainNumber)
Description copied from interface: ChainResultDao
Load a saved ChainResult

Specified by:
getChainResult in interface ChainResultDao
Parameters:
chain - Chain and chain number
chainNumber - Chain and chain number
Returns:
ChainResult to be loaded

getChainResult

public ChainResult getChainResult(@NotNull
                                  PlanResultKey planResultKey)
Description copied from interface: ChainResultDao
Get the result by its PlanResultKey

Specified by:
getChainResult in interface ChainResultDao
Returns:
result

getAllChainResults

@NotNull
public java.util.List<ChainResult> getAllChainResults(@NotNull
                                                              Chain chain)
Description copied from interface: ChainResultDao
Load a saved ChainResult

Specified by:
getAllChainResults in interface ChainResultDao
Parameters:
chain - Chain of which results shall be retrieved
Returns:
chainResult

getAllResults

@NotNull
public java.util.List<ChainResult> getAllResults()
Description copied from interface: ChainResultDao
Returns all ChainResult

Specified by:
getAllResults in interface ChainResultDao
Returns:
chainResults

save

public void save(@NotNull
                 ChainResult chainResult)
Description copied from interface: ChainResultDao
Save a ChainResult

Specified by:
save in interface ChainResultDao
Parameters:
chainResult - ChainResult to be saved

getNChainResults

@NotNull
public java.util.List<ChainResult> getNChainResults(@NotNull
                                                            Chain chain,
                                                            int firstResult,
                                                            int maxResults)
Description copied from interface: ChainResultDao
Load list of results related to chain, list is ordered descending by chain number ChainResults in PENDING state are left out of the results

Specified by:
getNChainResults in interface ChainResultDao
Parameters:
chain - Chain of which chainNumber result has to be retrieved
firstResult - number of results to skip
maxResults - number of results to retrieve
Returns:
chainResult

hasResults

public boolean hasResults(@NotNull
                          Chain chain)
Description copied from interface: ChainResultDao
Test if chain has any results

Specified by:
hasResults in interface ChainResultDao
Parameters:
chain - Chain which has to be tested
Returns:
true if chain has any results, false otherwise

countChainResults

public int countChainResults(@NotNull
                             Chain chain)
Description copied from interface: ChainResultDao
Count number of chain results

Specified by:
countChainResults in interface ChainResultDao
Parameters:
chain - Chain of which results has to be counted
Returns:
number of chain results

getAllPendingChainResults

@NotNull
public java.util.Collection<ChainResult> getAllPendingChainResults()
Description copied from interface: ChainResultDao
Returns all the ChainResults in a BuildState.PENDING state

Specified by:
getAllPendingChainResults in interface ChainResultDao
Returns:
chainResults

getChainStageResultById

public ChainStageResult getChainStageResultById(long id)
Description copied from interface: ChainResultDao
Returns a ChainStageResult by its id

Specified by:
getChainStageResultById in interface ChainResultDao
Returns:
chainStageResult


Copyright © 2010 Atlassian. All Rights Reserved.