com.atlassian.bamboo.chains
Interface ChainResultDao

All Superinterfaces:
BambooObjectDao, bucket.core.persistence.ObjectDao
All Known Implementing Classes:
ChainResultHibernateDao

public interface ChainResultDao
extends BambooObjectDao

DAO for ChainResult


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
 boolean hasResults(Chain chain)
          Test if chain has any results
 void save(ChainResult chainResult)
          Save a ChainResult
 
Methods inherited from interface com.atlassian.bamboo.persistence.BambooObjectDao
findById
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
 

Method Detail

getAllResults

@NotNull
java.util.List<ChainResult> getAllResults()
Returns all ChainResult

Returns:
chainResults

save

void save(@NotNull
          ChainResult chainResult)
Save a ChainResult

Parameters:
chainResult - ChainResult to be saved

getChainResult

@Nullable
ChainResult getChainResult(@NotNull
                                    Chain chain,
                                    int chainNumber)
Load a saved ChainResult

Parameters:
chain - Chain and chain number
chainNumber - Chain and chain number
Returns:
ChainResult to be loaded

getChainResult

@Nullable
ChainResult getChainResult(@NotNull
                                    PlanResultKey planResultKey)
Get the result by its PlanResultKey

Parameters:
planResultKey -
Returns:
result

getAllChainResults

@NotNull
java.util.List<ChainResult> getAllChainResults(@NotNull
                                                       Chain chain)
Load a saved ChainResult

Parameters:
chain - Chain of which results shall be retrieved
Returns:
chainResult

getNChainResults

@NotNull
java.util.List<ChainResult> getNChainResults(@NotNull
                                                     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

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

boolean hasResults(@NotNull
                   Chain chain)
Test if chain has any results

Parameters:
chain - Chain which has to be tested
Returns:
true if chain has any results, false otherwise

countChainResults

int countChainResults(@NotNull
                      Chain chain)
Count number of chain results

Parameters:
chain - Chain of which results has to be counted
Returns:
number of chain results

getAllPendingChainResults

@NotNull
java.util.Collection<ChainResult> getAllPendingChainResults()
Returns all the ChainResults in a BuildState.PENDING state

Returns:
chainResults

getChainStageResultById

@Nullable
ChainStageResult getChainStageResultById(@NotNull
                                                  long id)
Returns a ChainStageResult by its id

Returns:
chainStageResult


Copyright © 2010 Atlassian. All Rights Reserved.