com.atlassian.bamboo.resultsummary
Interface BuildResultsSummaryDao

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

public interface BuildResultsSummaryDao
extends BambooObjectDao


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)
           
<T extends BuildResultsSummary>
java.util.List<T>
findBuildResultsSummaries(BuildResultsSummaryCriteria criteria)
          Searches for BuildResultsSummary objects given a BuildResultsSummaryCriteria
 java.util.List<ExtendedBuildResultsSummary> findBuildResultsSummariesByJiraIssues(java.util.List<java.lang.String> issueKeys)
           
 java.util.List<ExtendedBuildResultsSummary> findBuildResultsSummariesByProjectKey(java.lang.String projectKey)
          This seems to be the Jira project key not the Bamboo Project key
 java.util.List<Pair<ArtifactLink,BuildResultsSummary>> findBuildResultsWithArtifacts(java.lang.String planKey)
          Find all build results which have matching artifacts.
 java.util.List<ExtendedBuildResultsSummary> findBuildsForImageConfiguration(java.lang.String planKey, ElasticImageConfiguration elasticImageConfiguration, BuildState buildState, int maxResults)
          Searcher for builds of an image
 ExtendedBuildResultsSummary findFirstBuildResultWithBuildStateAfter(java.lang.String buildKey, int buildNumber, BuildState buildState)
          Finds the last successful ExtendedBuildResultsSummary after buildNumber
 ExtendedBuildResultsSummary 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
 ExtendedBuildResultsSummary findLastBuildResultBefore(java.lang.String buildKey, int buildNumber)
          Finds the last successful or failed ExtendedBuildResultsSummary before buildNumber
 ExtendedBuildResultsSummary findLastBuildResultWithBuildStateBefore(java.lang.String buildKey, int buildNumber, BuildState buildState)
          Finds the last ExtendedBuildResultsSummary before buildNumber with BuildState
 java.util.Collection<BuildResultsSummary> getAllPendingBuildResultSummaries()
          Returns all the BuildResultsSummary in a BuildState.PENDING state
 BuildResultsSummary getBreakingBuild(BuildResultsSummary summary)
           
 ExtendedBuildResultsSummary getBuildResultsSummary(PlanResultKey planResultKey)
           
 ExtendedBuildResultsSummary getBuildResultsSummaryByBuildKeyAndBuildNumber(java.lang.String buildKey, int buildNumber)
           
 BuildResultsSummary getFirstBuildSummary(Build build)
          Returns the first available BuildResultsSummary for the given Build
 BuildResultsSummary getFixingBuild(BuildResultsSummary summary)
          Returns the first successful BuildResultsSummary for given BuildResultsSummary.
 java.util.List<LinkedJiraIssue> getJiraIssuesForBuild(Build build)
          Retrieves a list of LinkedJiraIssue that are linked to the given build.
 java.util.List<LinkedJiraIssue> getJiraIssuesForBuildResults(java.util.List<BuildResultsSummary> buildResults)
          Retrieves a list of LinkedJiraIssue linked to the given build result summaries
 ExtendedBuildResultsSummary getLastBuildSummary(java.lang.String planKey)
          Returns the latest ExtendedBuildResultsSummary for the build represented by planKey
 java.util.List<ExtendedBuildResultsSummary> getNeighbouringSummaries(Build build, int currentBuildNumber)
           
 long getNumberOfResults(Build build)
          Returns the number of results available for the given Build
 void removeBuildResultsSummary(BuildResultsSummary buildResultsSummary)
          Removes the passed build result summary
 long scrollBuildResultSummariesForExport(java.lang.String buildKey, com.google.common.base.Function<ExtendedBuildResultsSummary,java.lang.Void> function)
          Scroll through and execute function for each of BuildResultsSummary Objects passed to function are not fully initialized.
 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.
 
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

getAllPendingBuildResultSummaries

@NotNull
java.util.Collection<BuildResultsSummary> getAllPendingBuildResultSummaries()
Returns all the BuildResultsSummary in a BuildState.PENDING state

Returns:
summaries

getBuildResultsSummaryByBuildKeyAndBuildNumber

@Nullable
ExtendedBuildResultsSummary getBuildResultsSummaryByBuildKeyAndBuildNumber(java.lang.String buildKey,
                                                                                    int buildNumber)

getBuildResultsSummary

@Nullable
ExtendedBuildResultsSummary getBuildResultsSummary(@NotNull
                                                            PlanResultKey planResultKey)

getFirstBuildSummary

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

Parameters:
build -
Returns:
buildResult

getLastBuildSummary

@Nullable
ExtendedBuildResultsSummary getLastBuildSummary(java.lang.String planKey)
Returns the latest ExtendedBuildResultsSummary for the build represented by planKey

Parameters:
planKey -
Returns:
buildResult

getNumberOfResults

long getNumberOfResults(Build build)
Returns the number of results available for the given Build

Parameters:
build -
Returns:
numberOfResults

getNeighbouringSummaries

@NotNull
java.util.List<ExtendedBuildResultsSummary> getNeighbouringSummaries(Build build,
                                                                             int currentBuildNumber)

getBreakingBuild

@Nullable
BuildResultsSummary getBreakingBuild(BuildResultsSummary summary)

getFixingBuild

@Nullable
BuildResultsSummary getFixingBuild(BuildResultsSummary 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

@NotNull
<T extends BuildResultsSummary> java.util.List<T> findBuildResultsSummaries(@NotNull
                                                                                    BuildResultsSummaryCriteria criteria)
Searches for BuildResultsSummary objects given a BuildResultsSummaryCriteria

Parameters:
criteria - @NotNull
Returns:
List of ExtendedBuildResultsSummary

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)

findBuildResultsSummariesByJiraIssues

@NotNull
java.util.List<ExtendedBuildResultsSummary> findBuildResultsSummariesByJiraIssues(@Nullable
                                                                                          java.util.List<java.lang.String> issueKeys)

removeBuildResultsSummary

void removeBuildResultsSummary(BuildResultsSummary buildResultsSummary)
Removes the passed build result summary

Parameters:
buildResultsSummary - - @NotNull

findBuildResultsSummariesByProjectKey

@NotNull
java.util.List<ExtendedBuildResultsSummary> findBuildResultsSummariesByProjectKey(@Nullable
                                                                                          java.lang.String projectKey)
This seems to be the Jira project key not the Bamboo Project key

Parameters:
projectKey -
Returns:

getJiraIssuesForBuildResults

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

Parameters:
buildResults -
Returns:

getJiraIssuesForBuild

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

Parameters:
build -
Returns:

findBuildsForImageConfiguration

@NotNull
java.util.List<ExtendedBuildResultsSummary> 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:

findLastBuildResultBefore

@Nullable
ExtendedBuildResultsSummary findLastBuildResultBefore(@NotNull
                                                               java.lang.String buildKey,
                                                               int buildNumber)
Finds the last successful or failed ExtendedBuildResultsSummary before buildNumber

Parameters:
buildKey -
buildNumber -
Returns:
buildResult

findFirstBuildResultWithBuildStateAfter

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

Parameters:
buildKey -
buildNumber -
Returns:
buildResult

findLastBuildResultWithBuildStateBefore

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

Parameters:
buildKey -
buildNumber -
buildState -
Returns:
buildResult

findFirstBuildResultWithBuildStateBetween

@Nullable
ExtendedBuildResultsSummary 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

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:

scrollBuildResultSummariesForExport

long scrollBuildResultSummariesForExport(@NotNull
                                         java.lang.String buildKey,
                                         @NotNull
                                         com.google.common.base.Function<ExtendedBuildResultsSummary,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:
function - function to be executed on each of the BuildResultSummary
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


Copyright © 2010 Atlassian. All Rights Reserved.