com.atlassian.bamboo.resultsummary
Interface BuildResultsSummaryDao

All Superinterfaces:
BambooObjectDao<ResultsSummary>
All Known Implementing Classes:
BuildResultsSummaryHibernateDao

public interface BuildResultsSummaryDao
extends BambooObjectDao<ResultsSummary>


Field Summary
static int NUMBER_OF_DAYS_TO_FILTER
           
 
Method Summary
 int countBuildResultsSummaries(long agentId, BuildState buildState)
          Count how many build results match the agent & optional build state
 int countBuildResultsSummaries(java.lang.String planKey)
           
 int countResultsWithState(PlanKey planKey, int lowerBuildNumber, int upperBuildNumber, BuildState buildState)
          Counts results with a given state in a given build number range for plan.
<T extends BuildResultsSummary>
java.util.List<T>
findBuildResultsSummaries(BuildResultsSummaryCriteria criteria)
          Deprecated. since 2.7 use findResultsSummaries(ResultsSummaryCriteria)
 java.util.List<ResultsSummary> findBuildResultsSummariesByJiraIssues(java.util.List<java.lang.String> issueKeys)
          Get a list of results summaries associated with the list of issue keys.
 java.util.List<ResultsSummary> findBuildResultsSummariesByProjectKey(java.lang.String projectKey)
          Retrieve a list of results summaries associeted with given JIRA project key
 java.util.List<Pair<ArtifactLink,BuildResultsSummary>> findBuildResultsWithArtifacts(java.lang.String planKey)
          Find all build results which have matching artifacts.
 java.util.List<BuildResultsSummary> findBuildsForImageConfiguration(java.lang.String planKey, ElasticImageConfiguration elasticImageConfiguration, BuildState buildState, int maxResults)
          Searcher for builds of an image
 java.util.List<ChainResultsSummary> findChainResultsWithJobLabelled(ResultsSummaryCriteria criteria, java.util.List<Label> labels)
          Searches through all chains to find any that have jobs which match the given labels.
 java.lang.Integer findFirstBuildNumberAfter(java.lang.String planKey, int buildNumber)
          Returns the build number of next existing build results.
 ResultsSummary findFirstBuildResultWithBuildStateAfter(java.lang.String buildKey, int buildNumber, BuildState buildState)
          Finds the last successful BuildResultsSummary after buildNumber
 ResultsSummary findFirstBuildResultWithBuildStateBetween(java.lang.String buildKey, int lowerBuildNumber, int upperBuildNumber, BuildState buildState)
          Returns the first build that matches BuildState between the given build number range Note that this function is inclusive of the upper and lower bound
<T extends ResultsSummary>
T
findFirstResultAfter(java.lang.String planKey, int buildNumber, java.lang.Class<T> aClass)
          Finds the first successful or failed BuildResultsSummary after buildNumber
 java.lang.Integer findLastBuildNumberBefore(java.lang.String planKey, int buildNumber)
          Returns the build number of previous existing build results.
<T extends ResultsSummary>
T
findLastBuildResultBeforeWithTests(PlanResultKey planResultKey, java.lang.Class<T> aClass)
           
 ResultsSummary findLastBuildResultWithBuildStateBefore(java.lang.String buildKey, int buildNumber, BuildState buildState)
          Finds the last BuildResultsSummary before buildNumber with BuildState
<T extends ResultsSummary>
T
findLastResultBefore(java.lang.String planKey, int buildNumber, java.lang.Class<T> aClass)
          Finds the last successful or failed ResultsSummary before buildNumber
<T extends ResultsSummary>
T
findLastResultSummaryWithState(PlanKey planKey, BuildState buildState, java.lang.Class<T> aClass)
           
 java.util.List<ResultsSummary> findLatestFailedResultSummaries()
          Find the failed result summaries for all TopLevelPlans in Bamboo that have occurred in the last X days, where x is the constant NUMBER_OF_DAYS_TO_FILTER
 java.util.List<ResultsSummary> findLatestResultsSummaries()
          Find the result summaries for all TopLevelPlans in Bamboo that have occurred in the last X days, where x is the constant NUMBER_OF_DAYS_TO_FILTER
<T extends ResultsSummary>
java.util.List<T>
findResultsSummaries(ResultsSummaryCriteria criteria)
          Searches for ResultsSummary objects given a ResultsSummaryCriteria
<T extends ResultsSummary>
java.util.Collection<T>
getAllActiveResultSummariesForPlan(PlanKey planKey, java.lang.Class<T> aClass)
          Returns all the ResultsSummary in a LifeCycleState.PENDING, LifeCycleState.QUEUED, LifeCycleState.IN_PROGRESS state with the given Class See also LifeCycleState.isActive(LifeCycleState) and ResultsSummary.isActive()
<T extends ResultsSummary>
java.util.Collection<T>
getAllBuildResultSummariesInBuildState(BuildState state, java.lang.Class<T> aClass)
          Returns all the BuildResultsSummary in requested state
<T extends ResultsSummary>
java.util.Collection<T>
getAllBuildResultSummariesInLifeCycleState(LifeCycleState state, java.lang.Class<T> aClass)
           
<T extends ResultsSummary>
java.util.Collection<T>
getAllBuildResultSummariesInUnknownState(java.lang.Class<T> aClass)
          Returns all the BuildResultsSummary in a BuildState.UNKNOWN state
 java.util.Collection<BuildResultsSummary> getAllInProgressBuildResultSummaries()
          Returns all the BuildResultsSummary in a LifeCycleState.IN_PROGRESS state
<T extends ResultsSummary>
java.util.Collection<T>
getAllInProgressResultSummaries(java.lang.Class<T> aClass)
          Returns all the ResultsSummary in a LifeCycleState.IN_PROGRESS state with the given Class
<T extends ResultsSummary>
java.util.Collection<T>
getAllPendingResultSummaries(java.lang.Class<T> aClass)
          Returns all the ResultsSummary in a LifeCycleState.PENDING state with the given Class
<T extends ResultsSummary>
java.util.Collection<T>
getAllQueuedResultSummaries(java.lang.Class<T> aClass)
          Returns all the ResultsSummary in a LifeCycleState.QUEUED state with the given Class
<T extends ResultsSummary>
java.util.List<T>
getAllResultSummariesForPlan(Plan plan)
          Get all the ResultsSummarys for the given Plan
 ResultsSummary getBreakingBuild(ResultsSummary summary)
           
 BuildResultsSummary getBuildResultsSummaryByBuildKeyAndBuildNumber(java.lang.String buildKey, int buildNumber)
          Deprecated. since 2.7 use ResultsSummaryManager.getResultsSummary(PlanResultKey, Class)
 ChainStageResult getChainStageResultById(long id)
          Returns a ChainStageResult by its id
<T extends ResultsSummary>
java.util.List<T>
getFinalizedResultSummariesForPlan(PlanKey planKey, java.lang.Class<T> aClass, int firstResult, int maxResults)
          Returns all the ResultsSummary in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state with the given Class.
 BuildResultsSummary getFirstBuildSummary(Plan plan)
          Returns the first available BuildResultsSummary for the given Build
 ResultsSummary getFixingBuild(ResultsSummary summary)
          Returns the first successful BuildResultsSummary for given BuildResultsSummary.
 java.util.List<LinkedJiraIssue> getJiraIssuesForBuild(Plan plan)
          Retrieves a list of LinkedJiraIssue that are linked to the given build.
 java.util.List<LinkedJiraIssue> getJiraIssuesForBuildResults(java.util.List<ResultsSummary> buildResults)
          Retrieves a list of LinkedJiraIssue linked to the given build result summaries
<T extends ResultsSummary>
T
getLastResultSummary(java.lang.String planKey, java.lang.Class<T> aClass)
          Returns the latest completed ResultsSummary for the plan represented by planKey
 java.util.List<ResultsSummary> getNeighbouringSummaries(Plan plan, int currentBuildNumber)
          Returns build results "around" given build number
 int getNumberOfConcurrentlyRunningBuilds(PlanKey planKey)
          Get the number of concurrently running builds for planKey
 long getNumberOfFinalizedResults(Plan plan)
          Get number of the ResultsSummarys in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state for the given Plan
 long getNumberOfFinishedResults(Plan build)
          Returns the number of finished results available for the given Build
 ChainResultsSummary getParentResultSummary(ResultsSummary summary)
          Get (@link ChainResultsSummary} containing given ResultsSummary
<T extends ResultsSummary>
T
getResultsSummary(PlanResultKey planResultKey, java.lang.Class<T> aClass)
          Lookup ResultsSummary by PlanResultKey and expected type
<T extends ResultsSummary>
T
getResultsSummary(PlanResultKey planResultKey, java.lang.Class<T> aClass, ResultDataRead dataRead)
          Lookup ResultsSummary by PlanResultKey and expected type, all lazy initialized collections can be eagerly read
<T extends ResultsSummary>
java.util.List<T>
getResultSummariesForPlan(Plan plan, int firstResult, int maxResults)
          Get the ResultsSummarys for the given Plan.
<T extends ResultsSummary>
java.util.List<T>
getResultSummariesForPlanByLifeCycleState(Plan plan, LifeCycleState lifeCycleState, int firstResult, int maxResults)
          Get the ResultsSummarys for the given Plan in give LifeCycleState that are Results are sorted by build number (descending).
 ChainStageResult getStageForResult(ResultsSummary resultsSummary)
          Get (@link ChainStageResult} containing given ResultsSummary
 int removeAllOrphanedResultSummaries()
          Removes all the ResultsSummary objects in the database that do not have a matching Plan
 void removeBuildResultsSummary(BuildResultsSummary buildResultsSummary)
          Deprecated. since 2.7 - use removeResultsSummary(ResultsSummary)
 int removeResultsSummariesForPlan(PlanKey planKey)
          Remove all resultSummary objects for the given plan.
 void removeResultsSummary(ResultsSummary buildResultsSummary)
          Removes the passed result summary
 long scrollJiraIssuesForExport(com.google.common.base.Function<LinkedJiraIssue,java.lang.Void> function)
          Scroll through and execute function for each of LinkedJiraIssue Objects passed to function are not fully initialized.
 long scrollResultSummaries(java.lang.String buildKey, ResultDataRead resultDataRead, com.google.common.base.Function<ResultsSummary,java.lang.Void> function)
          Scroll through and execute function for each of BuildResultsSummary Objects passed to function are not fully initialized.
 long scrollVariableSubstitutionForExport(com.google.common.base.Function<VariableSubstitution,java.lang.Void> function)
          Scroll through and execute function for each of VariableSubstitution Objects passed to function are not fully initialized.
 
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
delete, deleteAll, executeReturnLong, findAll, findById, save, saveAll
 

Field Detail

NUMBER_OF_DAYS_TO_FILTER

static final int NUMBER_OF_DAYS_TO_FILTER
See Also:
Constant Field Values
Method Detail

getAllBuildResultSummariesInUnknownState

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllBuildResultSummariesInUnknownState(java.lang.Class<T> aClass)
Returns all the BuildResultsSummary in a BuildState.UNKNOWN state

Returns:
summaries

getAllPendingResultSummaries

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllPendingResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.PENDING state with the given Class

Returns:
summaries

getAllQueuedResultSummaries

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllQueuedResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.QUEUED state with the given Class

Returns:
summaries

getAllInProgressResultSummaries

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllInProgressResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.IN_PROGRESS state with the given Class

Returns:
summaries

getAllActiveResultSummariesForPlan

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllActiveResultSummariesForPlan(PlanKey planKey,
                                                                                              java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.PENDING, LifeCycleState.QUEUED, LifeCycleState.IN_PROGRESS state with the given Class See also LifeCycleState.isActive(LifeCycleState) and ResultsSummary.isActive()

Returns:
summaries

getFinalizedResultSummariesForPlan

@NotNull
<T extends ResultsSummary> java.util.List<T> getFinalizedResultSummariesForPlan(PlanKey planKey,
                                                                                        java.lang.Class<T> aClass,
                                                                                        int firstResult,
                                                                                        int maxResults)
Returns all the ResultsSummary in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state with the given Class. Result are sorted descending by build number.

Type Parameters:
T -
Parameters:
planKey -
aClass -
firstResult - - specifies the first result to be included in the list.
maxResults - - specifies the length of the result; 0 for all results;
Returns:

getNumberOfConcurrentlyRunningBuilds

int getNumberOfConcurrentlyRunningBuilds(PlanKey planKey)
Get the number of concurrently running builds for planKey

Parameters:
planKey -
Returns:

getResultsSummary

@Nullable
<T extends ResultsSummary> T getResultsSummary(@NotNull
                                                        PlanResultKey planResultKey,
                                                        @NotNull
                                                        java.lang.Class<T> aClass)
Lookup ResultsSummary by PlanResultKey and expected type

Type Parameters:
T -
Parameters:
planResultKey -
aClass -
Returns:
resultSummary

getResultsSummary

@Nullable
<T extends ResultsSummary> T getResultsSummary(@NotNull
                                                        PlanResultKey planResultKey,
                                                        @NotNull
                                                        java.lang.Class<T> aClass,
                                                        ResultDataRead dataRead)
Lookup ResultsSummary by PlanResultKey and expected type, all lazy initialized collections can be eagerly read

Type Parameters:
T -
Parameters:
planResultKey -
aClass -
dataRead -
Returns:
resultSummary

getAllBuildResultSummariesInBuildState

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllBuildResultSummariesInBuildState(@NotNull
                                                                                                  BuildState state,
                                                                                                  java.lang.Class<T> aClass)
Returns all the BuildResultsSummary in requested state

Parameters:
state -
Returns:
summaries

getAllBuildResultSummariesInLifeCycleState

@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllBuildResultSummariesInLifeCycleState(@NotNull
                                                                                                      LifeCycleState state,
                                                                                                      java.lang.Class<T> aClass)

getAllInProgressBuildResultSummaries

@NotNull
java.util.Collection<BuildResultsSummary> getAllInProgressBuildResultSummaries()
Returns all the BuildResultsSummary in a LifeCycleState.IN_PROGRESS state

Returns:
summaries

getBuildResultsSummaryByBuildKeyAndBuildNumber

@Deprecated
@Nullable
BuildResultsSummary getBuildResultsSummaryByBuildKeyAndBuildNumber(java.lang.String buildKey,
                                                                                       int buildNumber)
Deprecated. since 2.7 use ResultsSummaryManager.getResultsSummary(PlanResultKey, Class)

Lookup BuildResultsSummary by buildKey and buildNumber

Parameters:
buildKey -
buildNumber -
Returns:
summary

getFirstBuildSummary

@Nullable
BuildResultsSummary getFirstBuildSummary(Plan plan)
Returns the first available BuildResultsSummary for the given Build

Parameters:
plan -
Returns:
buildResult

getLastResultSummary

<T extends ResultsSummary> T getLastResultSummary(java.lang.String planKey,
                                                  java.lang.Class<T> aClass)
Returns the latest completed ResultsSummary for the plan represented by planKey

Parameters:
planKey -
Returns:
buildResult

getNumberOfFinishedResults

long getNumberOfFinishedResults(Plan build)
Returns the number of finished results available for the given Build

Parameters:
build -
Returns:
numberOfResults

getNumberOfFinalizedResults

long getNumberOfFinalizedResults(@NotNull
                                 Plan plan)
Get number of the ResultsSummarys in a LifeCycleState.FINISHED or LifeCycleState.NOT_BUILT state for the given Plan

Parameters:
plan -
Returns:
number of summaries

getNeighbouringSummaries

@NotNull
java.util.List<ResultsSummary> getNeighbouringSummaries(Plan plan,
                                                                int currentBuildNumber)
Returns build results "around" given build number

Parameters:
plan -
currentBuildNumber - @return

getBreakingBuild

@Nullable
ResultsSummary getBreakingBuild(ResultsSummary summary)

getFixingBuild

@Nullable
ResultsSummary getFixingBuild(ResultsSummary summary)
Returns the first successful BuildResultsSummary for given BuildResultsSummary. The input build is returned if it is successful.

Parameters:
summary -
Returns:
null if there is no fixing build.

findBuildResultsSummaries

@Deprecated
@NotNull
<T extends BuildResultsSummary> java.util.List<T> findBuildResultsSummaries(@NotNull
                                                                                               BuildResultsSummaryCriteria criteria)
Deprecated. since 2.7 use findResultsSummaries(ResultsSummaryCriteria)

Searches for BuildResultsSummary objects given a BuildResultsSummaryCriteria

Parameters:
criteria - @NotNull
Returns:
List of BuildResultsSummary

findResultsSummaries

@NotNull
<T extends ResultsSummary> java.util.List<T> findResultsSummaries(@NotNull
                                                                          ResultsSummaryCriteria criteria)
Searches for ResultsSummary objects given a ResultsSummaryCriteria

Parameters:
criteria - @NotNull
Returns:
List of BuildResultsSummary

removeResultsSummariesForPlan

int removeResultsSummariesForPlan(@NotNull
                                  PlanKey planKey)
Remove all resultSummary objects for the given plan. Time-cost of this method might be significant if there are thousands of ResultsSummary objects to be deleted in such case #scheduleResultsSummariesForDelayedDeletion(PlanKey) should be considered.

Parameters:
planKey - identifier of plan to remove results for.
Returns:
number of deleted ResultsSummary objects

removeAllOrphanedResultSummaries

int removeAllOrphanedResultSummaries()
Removes all the ResultsSummary objects in the database that do not have a matching Plan

Returns:
number of ResultsSummarys removed

countBuildResultsSummaries

int countBuildResultsSummaries(long agentId,
                               @Nullable
                               BuildState buildState)
Count how many build results match the agent & optional build state

Parameters:
agentId -
buildState - - can be null.
Returns:
count

countBuildResultsSummaries

int countBuildResultsSummaries(@Nullable
                               java.lang.String planKey)

removeBuildResultsSummary

@Deprecated
void removeBuildResultsSummary(BuildResultsSummary buildResultsSummary)
Deprecated. since 2.7 - use removeResultsSummary(ResultsSummary)

Removes the passed build result summary

Parameters:
buildResultsSummary - - @NotNull

removeResultsSummary

void removeResultsSummary(@NotNull
                          ResultsSummary buildResultsSummary)
Removes the passed result summary

Parameters:
buildResultsSummary - - @NotNull

findBuildResultsSummariesByJiraIssues

@NotNull
java.util.List<ResultsSummary> findBuildResultsSummariesByJiraIssues(@Nullable
                                                                             java.util.List<java.lang.String> issueKeys)
Get a list of results summaries associated with the list of issue keys.

Parameters:
issueKeys -
Returns:
list of result summaries

findBuildResultsSummariesByProjectKey

@NotNull
java.util.List<ResultsSummary> findBuildResultsSummariesByProjectKey(@Nullable
                                                                             java.lang.String projectKey)
Retrieve a list of results summaries associeted with given JIRA project key

Parameters:
projectKey - - JIRA project key (prefix of the jira issues e.g. 'BAM')
Returns:
a list of results summaries associeted with given JIRA project key

getJiraIssuesForBuildResults

@NotNull
java.util.List<LinkedJiraIssue> getJiraIssuesForBuildResults(@NotNull
                                                                     java.util.List<ResultsSummary> buildResults)
Retrieves a list of LinkedJiraIssue linked to the given build result summaries

Parameters:
buildResults -
Returns:

getJiraIssuesForBuild

@NotNull
java.util.List<LinkedJiraIssue> getJiraIssuesForBuild(@NotNull
                                                              Plan plan)
Retrieves a list of LinkedJiraIssue that are linked to the given build.

Parameters:
plan -
Returns:

findBuildsForImageConfiguration

@NotNull
java.util.List<BuildResultsSummary> findBuildsForImageConfiguration(java.lang.String planKey,
                                                                            ElasticImageConfiguration elasticImageConfiguration,
                                                                            @Nullable
                                                                            BuildState buildState,
                                                                            int maxResults)
Searcher for builds of an image

Parameters:
planKey -
elasticImageConfiguration -
buildState - @Nullable
maxResults -
Returns:

findLastBuildResultBeforeWithTests

@Nullable
<T extends ResultsSummary> T findLastBuildResultBeforeWithTests(@NotNull
                                                                         PlanResultKey planResultKey,
                                                                         @NotNull
                                                                         java.lang.Class<T> aClass)
Type Parameters:
T - of result
Parameters:
planResultKey - of the result
aClass - of
Returns:
resultsSummary

findLastResultBefore

@Nullable
<T extends ResultsSummary> T findLastResultBefore(@NotNull
                                                           java.lang.String planKey,
                                                           int buildNumber,
                                                           java.lang.Class<T> aClass)
Finds the last successful or failed ResultsSummary before buildNumber

Parameters:
planKey -
buildNumber -
Returns:
buildResult

findFirstResultAfter

@Nullable
<T extends ResultsSummary> T findFirstResultAfter(@NotNull
                                                           java.lang.String planKey,
                                                           int buildNumber,
                                                           java.lang.Class<T> aClass)
Finds the first successful or failed BuildResultsSummary after buildNumber

Parameters:
planKey -
buildNumber -
Returns:
buildResult

findFirstBuildResultWithBuildStateAfter

@Nullable
ResultsSummary findFirstBuildResultWithBuildStateAfter(@NotNull
                                                                java.lang.String buildKey,
                                                                int buildNumber,
                                                                @NotNull
                                                                BuildState buildState)
Finds the last successful BuildResultsSummary after buildNumber

Parameters:
buildKey -
buildNumber -
Returns:
buildResult

findLastBuildResultWithBuildStateBefore

ResultsSummary findLastBuildResultWithBuildStateBefore(@NotNull
                                                       java.lang.String buildKey,
                                                       int buildNumber,
                                                       @NotNull
                                                       BuildState buildState)
Finds the last BuildResultsSummary before buildNumber with BuildState

Parameters:
buildKey -
buildNumber -
buildState -
Returns:
buildResult

findFirstBuildResultWithBuildStateBetween

@Nullable
ResultsSummary findFirstBuildResultWithBuildStateBetween(@NotNull
                                                                  java.lang.String buildKey,
                                                                  int lowerBuildNumber,
                                                                  int upperBuildNumber,
                                                                  @NotNull
                                                                  BuildState buildState)
Returns the first build that matches BuildState between the given build number range Note that this function is inclusive of the upper and lower bound

Parameters:
buildKey -
lowerBuildNumber -
upperBuildNumber -
buildState -
Returns:
buildResult

findFirstBuildNumberAfter

@Nullable
java.lang.Integer findFirstBuildNumberAfter(@NotNull
                                                     java.lang.String planKey,
                                                     int buildNumber)
Returns the build number of next existing build results.

Parameters:
buildKey -
buildNumber -
Returns:
null if no build result summary with higher number exists

findLastBuildNumberBefore

@Nullable
java.lang.Integer findLastBuildNumberBefore(@NotNull
                                                     java.lang.String planKey,
                                                     int buildNumber)
Returns the build number of previous existing build results.

Parameters:
buildKey -
buildNumber -
Returns:
null if no build result summary with lower number exists

findBuildResultsWithArtifacts

java.util.List<Pair<ArtifactLink,BuildResultsSummary>> findBuildResultsWithArtifacts(java.lang.String planKey)
Find all build results which have matching artifacts. Sorted by buildNumber, ascending

Parameters:
planKey -
Returns:

scrollResultSummaries

long scrollResultSummaries(@NotNull
                           java.lang.String buildKey,
                           @NotNull
                           ResultDataRead resultDataRead,
                           @NotNull
                           com.google.common.base.Function<ResultsSummary,java.lang.Void> function)
Scroll through and execute function for each of BuildResultsSummary Objects passed to function are not fully initialized. Collections are empty and related objects have only id set.

Parameters:
buildKey - of the plan you want to scroll the result summaries for
function - function to be executed on each of the BuildResultSummary
resultDataRead - if the data should be loaded lazy or eagerly
Returns:
number of traversed rows

scrollJiraIssuesForExport

long scrollJiraIssuesForExport(@NotNull
                               com.google.common.base.Function<LinkedJiraIssue,java.lang.Void> function)
Scroll through and execute function for each of LinkedJiraIssue Objects passed to function are not fully initialized. Collections are empty and related objects have only id set.

Parameters:
function - function to be executed on each of the LinkedJiraIssue
Returns:
number of traversed rows

getChainStageResultById

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

Returns:
chainStageResult

getAllResultSummariesForPlan

<T extends ResultsSummary> java.util.List<T> getAllResultSummariesForPlan(@NotNull
                                                                          Plan plan)
Get all the ResultsSummarys for the given Plan

Type Parameters:
T -
Parameters:
plan -
Returns:
summaries

getResultSummariesForPlan

@NotNull
<T extends ResultsSummary> java.util.List<T> getResultSummariesForPlan(@NotNull
                                                                               Plan plan,
                                                                               int firstResult,
                                                                               int maxResults)
Get the ResultsSummarys for the given Plan. Results are sorted by build number (descending). User can skip first n result and request maximum number of results. Note: fetching huge amount of data in single call should be avoided.

Type Parameters:
T -
Parameters:
plan -
firstResult - specifies the first item to be return (0 base index). Negative values treated as 0.
maxResults - specifies amount of the results to be returned. Value <= 0 returns everything.
Returns:
summaries

getResultSummariesForPlanByLifeCycleState

@NotNull
<T extends ResultsSummary> java.util.List<T> getResultSummariesForPlanByLifeCycleState(@NotNull
                                                                                               Plan plan,
                                                                                               @NotNull
                                                                                               LifeCycleState lifeCycleState,
                                                                                               int firstResult,
                                                                                               int maxResults)
Get the ResultsSummarys for the given Plan in give LifeCycleState that are Results are sorted by build number (descending). User can skip first n result and request maximum number of results.

Type Parameters:
T -
Parameters:
plan -
lifeCycleState -
firstResult - specifies the first item to be return (0 base index). Negative values treated as 0.
maxResults - specifies amount of the results to be returned. Value <= 0 returns everything.
Returns:
summaries

getParentResultSummary

@Nullable
ChainResultsSummary getParentResultSummary(ResultsSummary summary)
Get (@link ChainResultsSummary} containing given ResultsSummary

Parameters:
summary -
Returns:

getStageForResult

@Nullable
ChainStageResult getStageForResult(ResultsSummary resultsSummary)
Get (@link ChainStageResult} containing given ResultsSummary

Parameters:
resultsSummary -
Returns:

findLatestResultsSummaries

java.util.List<ResultsSummary> findLatestResultsSummaries()
Find the result summaries for all TopLevelPlans in Bamboo that have occurred in the last X days, where x is the constant NUMBER_OF_DAYS_TO_FILTER

Returns:
list of latest results summaries

findLatestFailedResultSummaries

java.util.List<ResultsSummary> findLatestFailedResultSummaries()
Find the failed result summaries for all TopLevelPlans in Bamboo that have occurred in the last X days, where x is the constant NUMBER_OF_DAYS_TO_FILTER

Returns:
list of latest results summaries

findChainResultsWithJobLabelled

java.util.List<ChainResultsSummary> findChainResultsWithJobLabelled(ResultsSummaryCriteria criteria,
                                                                    java.util.List<Label> labels)
Searches through all chains to find any that have jobs which match the given labels. The list of chains is then filtered if required, using other criteria elements. Currently the only used criteria are:
  • buildKey
  • toBuildDate
  • toBuildNumber
  • This is to ensure performance is consistent and reduce the possibility of conflicts.

    Parameters:
    criteria - containing the restrictions for the chains to be returned
    labels - that the jobs can be associated with
    Returns:
    list of ChainResultSummary that match the criteria and have jobs with any of the given labels

    findLastResultSummaryWithState

    @Nullable
    <T extends ResultsSummary> T findLastResultSummaryWithState(@NotNull
                                                                         PlanKey planKey,
                                                                         @NotNull
                                                                         BuildState buildState,
                                                                         @NotNull
                                                                         java.lang.Class<T> aClass)
    Type Parameters:
    T -
    Parameters:
    planKey -
    buildState -
    aClass -
    Returns:
    the last ResultsSummary with the provided BuildState

    countResultsWithState

    int countResultsWithState(@NotNull
                              PlanKey planKey,
                              int lowerBuildNumber,
                              int upperBuildNumber,
                              @NotNull
                              BuildState buildState)
    Counts results with a given state in a given build number range for plan.

    Parameters:
    planKey - the key of plan to analyse
    lowerBuildNumber - the build number to start the count with
    upperBuildNumber - the build number to end the count with
    buildState - the state that will be counted
    Returns:
    the count

    scrollVariableSubstitutionForExport

    long scrollVariableSubstitutionForExport(@NotNull
                                             com.google.common.base.Function<VariableSubstitution,java.lang.Void> function)
    Scroll through and execute function for each of VariableSubstitution Objects passed to function are not fully initialized. Collections are empty and related objects have only id set.

    Parameters:
    function - function to be executed on each of the VariableSubstitution
    Returns:
    number of traversed rows


    Copyright © 2011 Atlassian. All Rights Reserved.