|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BuildResultsSummaryDao
| 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. |
|
|
findBuildResultsSummaries(BuildResultsSummaryCriteria criteria)
Deprecated. use findResultsSummaries |
|
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 |
|
|
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. |
|
ResultsSummary |
findLastBuildResultBefore(java.lang.String buildKey,
int buildNumber)
Deprecated. use findLastResultBefore(String, int, Class) |
|
ResultsSummary |
findLastBuildResultWithBuildStateBefore(java.lang.String buildKey,
int buildNumber,
BuildState buildState)
Finds the last BuildResultsSummary before buildNumber with BuildState |
|
|
findLastResultBefore(java.lang.String planKey,
int buildNumber,
java.lang.Class<T> aClass)
Finds the last successful or failed ResultsSummary before buildNumber |
|
|
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 |
|
|
findResultsSummaries(ResultsSummaryCriteria criteria)
Searches for ResultsSummary objects given a ResultsSummaryCriteria |
|
|
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() |
|
|
getAllBuildResultSummariesInBuildState(BuildState state,
java.lang.Class<T> aClass)
Returns all the BuildResultsSummary in requested state |
|
|
getAllBuildResultSummariesInLifeCycleState(LifeCycleState state,
java.lang.Class<T> aClass)
|
|
|
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 |
|
|
getAllInProgressResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.IN_PROGRESS state with the given Class |
|
|
getAllPendingResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.PENDING state with the given Class |
|
|
getAllQueuedResultSummaries(java.lang.Class<T> aClass)
Returns all the ResultsSummary in a LifeCycleState.QUEUED state with the given Class |
|
|
getAllResultSummariesForPlan(Plan plan)
Get all the ResultsSummarys for the given Plan |
|
ResultsSummary |
getBreakingBuild(ResultsSummary summary)
|
|
BuildResultsSummary |
getBuildResultsSummaryByBuildKeyAndBuildNumber(java.lang.String buildKey,
int buildNumber)
Deprecated. use ResultsSummaryManager.getResultsSummary(PlanResultKey, Class) |
|
ChainStageResult |
getChainStageResultById(long id)
Returns a ChainStageResult by its id |
|
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 |
|
|
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 |
getNumberOfFinishedResults(Plan build)
Returns the number of finished results available for the given Build |
|
ChainResultsSummary |
getParentResultSummary(ResultsSummary summary)
Get (@link ChainResultsSummary} containing given ResultsSummary |
|
|
getResultsSummary(PlanResultKey planResultKey,
java.lang.Class<T> aClass)
Lookup ResultsSummary by PlanResultKey and expected type |
|
|
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 |
|
|
getResultSummariesForPlan(Plan plan,
int firstResult,
int maxResults)
Get the ResultsSummarys for the given Plan. |
|
|
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 |
|
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,
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. |
|
| Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao |
|---|
delete, executeReturnLong, findAll, findById, save |
| Field Detail |
|---|
static final int NUMBER_OF_DAYS_TO_FILTER
| Method Detail |
|---|
@NotNull <T extends ResultsSummary> java.util.Collection<T> getAllBuildResultSummariesInUnknownState(java.lang.Class<T> aClass)
BuildResultsSummary in a BuildState.UNKNOWN
state
@NotNull <T extends ResultsSummary> java.util.Collection<T> getAllPendingResultSummaries(java.lang.Class<T> aClass)
ResultsSummary in a LifeCycleState.PENDING state with the given Class
@NotNull <T extends ResultsSummary> java.util.Collection<T> getAllQueuedResultSummaries(java.lang.Class<T> aClass)
ResultsSummary in a LifeCycleState.QUEUED state with the given Class
@NotNull <T extends ResultsSummary> java.util.Collection<T> getAllInProgressResultSummaries(java.lang.Class<T> aClass)
ResultsSummary in a LifeCycleState.IN_PROGRESS state with the given Class
@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllActiveResultSummariesForPlan(PlanKey planKey,
java.lang.Class<T> aClass)
ResultsSummary in a LifeCycleState.PENDING, LifeCycleState.QUEUED, LifeCycleState.IN_PROGRESS state with the given Class
See also LifeCycleState.isActive(LifeCycleState) and ResultsSummary.isActive()
int getNumberOfConcurrentlyRunningBuilds(PlanKey planKey)
planKey -
@Nullable
<T extends ResultsSummary> T getResultsSummary(@NotNull
PlanResultKey planResultKey,
@NotNull
java.lang.Class<T> aClass)
ResultsSummary by PlanResultKey and expected type
T - planResultKey - aClass -
@Nullable
<T extends ResultsSummary> T getResultsSummary(@NotNull
PlanResultKey planResultKey,
@NotNull
java.lang.Class<T> aClass,
ResultDataRead dataRead)
ResultsSummary by PlanResultKey and expected type, all lazy initialized collections can be eagerly read
T - planResultKey - aClass - dataRead -
@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllBuildResultSummariesInBuildState(@NotNull
BuildState state,
java.lang.Class<T> aClass)
BuildResultsSummary in requested state
state -
@NotNull
<T extends ResultsSummary> java.util.Collection<T> getAllBuildResultSummariesInLifeCycleState(@NotNull
LifeCycleState state,
java.lang.Class<T> aClass)
@NotNull java.util.Collection<BuildResultsSummary> getAllInProgressBuildResultSummaries()
BuildResultsSummary in a LifeCycleState.IN_PROGRESS state
@Nullable
BuildResultsSummary getBuildResultsSummaryByBuildKeyAndBuildNumber(java.lang.String buildKey,
int buildNumber)
ResultsSummaryManager.getResultsSummary(PlanResultKey, Class)
BuildResultsSummary by buildKey and buildNumber
buildKey - buildNumber -
@Nullable BuildResultsSummary getFirstBuildSummary(Plan plan)
BuildResultsSummary for the given Build
plan -
<T extends ResultsSummary> T getLastResultSummary(java.lang.String planKey,
java.lang.Class<T> aClass)
ResultsSummary for the plan represented by planKey
planKey -
long getNumberOfFinishedResults(Plan build)
Build
build -
@NotNull
java.util.List<ResultsSummary> getNeighbouringSummaries(Plan plan,
int currentBuildNumber)
plan - currentBuildNumber - @return@Nullable ResultsSummary getBreakingBuild(ResultsSummary summary)
@Nullable ResultsSummary getFixingBuild(ResultsSummary summary)
BuildResultsSummary for given BuildResultsSummary.
The input build is returned if it is successful.
summary -
@Deprecated
@NotNull
<T extends BuildResultsSummary> java.util.List<T> findBuildResultsSummaries(@NotNull
BuildResultsSummaryCriteria criteria)
BuildResultsSummary objects given a BuildResultsSummaryCriteria
criteria - @NotNull
List of BuildResultsSummary
@NotNull
<T extends ResultsSummary> java.util.List<T> findResultsSummaries(@NotNull
ResultsSummaryCriteria criteria)
ResultsSummary objects given a ResultsSummaryCriteria
criteria - @NotNull
List of BuildResultsSummary
int removeResultsSummariesForPlan(@NotNull
PlanKey planKey)
ResultsSummary objects to be deleted
in such case #scheduleResultsSummariesForDelayedDeletion(PlanKey) should be considered.
planKey - identifier of plan to remove results for.
ResultsSummary objectsint removeAllOrphanedResultSummaries()
ResultsSummary objects in the database that do not have a matching Plan
ResultsSummarys removed
int countBuildResultsSummaries(long agentId,
@Nullable
BuildState buildState)
agentId - buildState - - can be null.
int countBuildResultsSummaries(@Nullable
java.lang.String planKey)
@Deprecated void removeBuildResultsSummary(BuildResultsSummary buildResultsSummary)
buildResultsSummary - - @NotNull
void removeResultsSummary(@NotNull
ResultsSummary buildResultsSummary)
buildResultsSummary - - @NotNull
@NotNull
java.util.List<ResultsSummary> findBuildResultsSummariesByJiraIssues(@Nullable
java.util.List<java.lang.String> issueKeys)
issueKeys -
@NotNull
java.util.List<ResultsSummary> findBuildResultsSummariesByProjectKey(@Nullable
java.lang.String projectKey)
projectKey - - Jira project key (prefix of the jira issues e.g. 'BAM')
@NotNull
java.util.List<LinkedJiraIssue> getJiraIssuesForBuildResults(@NotNull
java.util.List<ResultsSummary> buildResults)
LinkedJiraIssue linked to the given build result summaries
buildResults -
@NotNull
java.util.List<LinkedJiraIssue> getJiraIssuesForBuild(@NotNull
Plan plan)
LinkedJiraIssue that are linked to the given build.
plan -
@NotNull
java.util.List<BuildResultsSummary> findBuildsForImageConfiguration(java.lang.String planKey,
ElasticImageConfiguration elasticImageConfiguration,
@Nullable
BuildState buildState,
int maxResults)
planKey - elasticImageConfiguration - buildState - @NullablemaxResults -
@Deprecated
@Nullable
ResultsSummary findLastBuildResultBefore(@NotNull
java.lang.String buildKey,
int buildNumber)
findLastResultBefore(String, int, Class)
BuildResultsSummary before buildNumber
buildKey - buildNumber -
@Nullable
<T extends ResultsSummary> T findLastResultBefore(@NotNull
java.lang.String planKey,
int buildNumber,
java.lang.Class<T> aClass)
ResultsSummary before buildNumber
planKey - buildNumber -
@Nullable
<T extends ResultsSummary> T findFirstResultAfter(@NotNull
java.lang.String planKey,
int buildNumber,
java.lang.Class<T> aClass)
BuildResultsSummary after buildNumber
planKey - buildNumber -
@Nullable
ResultsSummary findFirstBuildResultWithBuildStateAfter(@NotNull
java.lang.String buildKey,
int buildNumber,
@NotNull
BuildState buildState)
BuildResultsSummary after buildNumber
buildKey - buildNumber -
ResultsSummary findLastBuildResultWithBuildStateBefore(@NotNull
java.lang.String buildKey,
int buildNumber,
@NotNull
BuildState buildState)
BuildResultsSummary before buildNumber with BuildState
buildKey - buildNumber - buildState -
@Nullable
ResultsSummary findFirstBuildResultWithBuildStateBetween(@NotNull
java.lang.String buildKey,
int lowerBuildNumber,
int upperBuildNumber,
@NotNull
BuildState buildState)
BuildState between the given build number range
Note that this function is inclusive of the upper and lower bound
buildKey - lowerBuildNumber - upperBuildNumber - buildState -
@Nullable
java.lang.Integer findFirstBuildNumberAfter(@NotNull
java.lang.String planKey,
int buildNumber)
buildKey - buildNumber -
@Nullable
java.lang.Integer findLastBuildNumberBefore(@NotNull
java.lang.String planKey,
int buildNumber)
buildKey - buildNumber -
java.util.List<Pair<ArtifactLink,BuildResultsSummary>> findBuildResultsWithArtifacts(java.lang.String planKey)
planKey -
long scrollResultSummaries(@NotNull
java.lang.String buildKey,
@NotNull
com.google.common.base.Function<ResultsSummary,java.lang.Void> function)
buildKey - of the plan you want to scroll the result summaries forfunction - function to be executed on each of the BuildResultSummary
long scrollJiraIssuesForExport(@NotNull
com.google.common.base.Function<LinkedJiraIssue,java.lang.Void> function)
function - function to be executed on each of the LinkedJiraIssue
@Nullable ChainStageResult getChainStageResultById(long id)
ChainStageResult by its id
<T extends ResultsSummary> java.util.List<T> getAllResultSummariesForPlan(@NotNull
Plan plan)
ResultsSummarys for the given Plan
T - plan -
@NotNull
<T extends ResultsSummary> java.util.List<T> getResultSummariesForPlan(@NotNull
Plan plan,
int firstResult,
int maxResults)
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.
T - 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.
@NotNull
<T extends ResultsSummary> java.util.List<T> getResultSummariesForPlanByLifeCycleState(@NotNull
Plan plan,
@NotNull
LifeCycleState lifeCycleState,
int firstResult,
int maxResults)
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.
T - 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.
@Nullable ChainResultsSummary getParentResultSummary(ResultsSummary summary)
ResultsSummary
summary -
@Nullable ChainStageResult getStageForResult(ResultsSummary resultsSummary)
ResultsSummary
resultsSummary -
java.util.List<ResultsSummary> findLatestResultsSummaries()
java.util.List<ResultsSummary> findLatestFailedResultSummaries()
java.util.List<ChainResultsSummary> findChainResultsWithJobLabelled(ResultsSummaryCriteria criteria,
java.util.List<Label> labels)
criteria - containing the restrictions for the chains to be returnedlabels - that the jobs can be associated with
@Nullable
<T extends ResultsSummary> T findLastResultSummaryWithState(@NotNull
PlanKey planKey,
@NotNull
BuildState buildState,
@NotNull
java.lang.Class<T> aClass)
T - planKey - buildState - aClass -
ResultsSummary with the provided BuildState
int countResultsWithState(@NotNull
PlanKey planKey,
int lowerBuildNumber,
int upperBuildNumber,
@NotNull
BuildState buildState)
planKey - the key of plan to analyselowerBuildNumber - the build number to start the count withupperBuildNumber - the build number to end the count withbuildState - the state that will be counted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||