Class BuildResultsSummaryHibernateDao
- All Implemented Interfaces:
BambooObjectDao<ResultsSummary>,BuildResultsSummaryDao,org.springframework.beans.factory.InitializingBean
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringstatic final intprotected static final StringFields inherited from class org.springframework.dao.support.DaoSupport
loggerFields inherited from interface com.atlassian.bamboo.resultsummary.BuildResultsSummaryDao
NUMBER_OF_DAYS_TO_FILTER -
Constructor Summary
ConstructorsConstructorDescriptionBuildResultsSummaryHibernateDao(BambooTransactionHibernateTemplate bambooTransactionHibernateTemplate) -
Method Summary
Modifier and TypeMethodDescription@Nullable LongcalculateQueueDuration(@NotNull ChainResultsSummary resultsSummary) Calculates queueDuration value for a chain result as a maximum value of (vcsUpdateTime - queueTime) for all related job results.@Nullable LongcalculateVcsUpdateDuration(@NotNull ChainResultsSummary resultsSummary) Calculates vcsUpdateDuration value for a chain result as a maximum value of (buildDate - vcsUpdateTime) for all related job results.intCount all result summaries records.intcountBuildResultsSummaries(@NotNull String planKey) <T extends ResultsSummary>
LongcountByJiraCriteria(@NotNull ByJiraIssueResultSearchCriteria jiraCriteria, @NotNull ResultSummarySearchCriteria criteria, @NotNull Class<T> resultClass) CountsResultsSummaryobjects given aByJiraIssueResultSearchCriteriaandResultSummarySearchCriteria.longcountResultSummaries(@NotNull ResultsSummaryCriteria criteria) Count the number ofResultsSummaryobjects given aResultsSummaryCriteria.intcountResultsWithState(@NotNull PlanKey planKey, int lowerBuildNumber, int upperBuildNumber, @NotNull BuildState buildState) Counts results with a given state in a given build number range for plan.findAllBuildResultsNumbers(PlanKey planKey) <T extends ResultsSummary>
TfindAnyResultSummary(@NotNull ResultsSummaryCriteria criteria, ResultDataRead dataRead) Searches for anyResultsSummaryobject given aResultsSummaryCriteria.findBuildResultsNumberRange(PlanKey planKey) Finds minimum and maximum build number for a plan.@NotNull List<ResultsSummary> findBuildResultsSummariesByJiraIssues(@Nullable List<String> issueKeys) Get a list of results summaries associated with the list of issue keys.@NotNull List<ResultsSummary> findBuildResultsSummariesByProjectKey(@Nullable String jiraProjectKey) Retrieve a list of results summaries associated with given JIRA project key This will not return records marked for deletion.findBuildResultsWithArtifacts(String planKey) Find all build results which have matching artifacts.@NotNull List<BuildResultsSummary> findBuildsForImageConfiguration(String planKey, ElasticImageConfiguration elasticImage, @Nullable BuildState buildState, int maxResults) Searcher for builds of an image<T extends ResultsSummary>
List<T> findByAuthors(Collection<ExtendedAuthor> authors, Class<T> resultClass, int maxResults) <T extends ResultsSummary>
@NotNull List<T> findByCriteria(@NotNull ResultSummarySearchCriteria criteria, @NotNull Class<T> resultClass, @NotNull ResultDataRead dataRead) Searches for anyResultsSummaryobject given aResultSummarySearchCriteria.<E extends ResultsSummary>
EFind an entity by its id<T extends ResultsSummary>
@NotNull List<T> findByJiraCriteria(@NotNull ByJiraIssueResultSearchCriteria jiraCriteria, @NotNull ResultSummarySearchCriteria criteria, @NotNull Class<T> resultClass, @NotNull ResultDataRead dataRead) Searches for anyResultsSummaryobject given aByJiraIssueResultSearchCriteriaandResultSummarySearchCriteria.@NotNull List<PlanResultKey> findChainResultsWithFormatVersionLessThan(int formatVersion, int maxResults) findChainResultsWithJobLabelled(ResultsSummaryCriteria queryCriteria, List<Label> labels) Searches through all chains to find any that have jobs which match the given labels.findFirstBuildNumberAfter(@NotNull String planKey, int buildNumber) Returns the build number of next existing build results.findFirstBuildResultAfter(@NotNull String planKey, int buildNumber) Finds the firstBuildResultsSummaryafter the specified build number for the given plan key.findFirstBuildResultWithBuildStateAfter(@NotNull String planKey, int buildNumber, @NotNull BuildState buildState) Finds the last successfulBuildResultsSummaryafter buildNumber@Nullable ResultsSummaryfindFirstBuildResultWithBuildStateBetween(@NotNull String planKey, int lowerBuildNumber, int upperBuildNumber, @NotNull BuildState buildState) Returns the first build that matchesBuildStatebetween the given build number range Note that this function is inclusive of the upper and lower bound<T extends ResultsSummary>
TfindFirstResultAfter(@NotNull String planKey, int buildNumber, Class<T> aClass) Finds the first successful or failedBuildResultsSummaryafter buildNumberfindJobKeysFromExistingChainResults(@NotNull PlanKey chainKey) Find keys of jobs for which results associated with given plan exist.findLastBuildNumberBefore(@NotNull String planKey, int buildNumber) Returns the build number of previous existing build results.findLastBuildResultBefore(@NotNull String planKey, int buildNumber, boolean includeOnceOffBuilds) Finds the lastBuildResultsSummarybefore the specified build number for the given plan key and build state.<T extends ResultsSummary>
TfindLastBuildResultBeforeWithTests(@NotNull PlanResultKey planResultKey, @NotNull Class<T> aClass, boolean includeOnceOffBuilds) findLastBuildResultWithBuildStateBefore(@NotNull String planKey, int buildNumber, @NotNull BuildState buildState, boolean includeOnceOffBuilds) Finds the lastBuildResultsSummarybefore buildNumber withBuildState<T extends ResultsSummary>
TfindLastResultBefore(@NotNull String planKey, int buildNumber, Class<T> aClass, boolean includeOnceOffBuilds) Finds the last successful or failedResultsSummarybefore buildNumber<T extends ResultsSummary>
TfindLastResultSummaryWithState(@NotNull PlanKey planKey, @NotNull BuildState buildState, @NotNull Class<T> aClass) <T extends ResultsSummary>
TfindLastResultSummaryWithState(@NotNull PlanKey planKey, @NotNull BuildState buildState, @NotNull Class<T> aClass, boolean ignoreSpecsResults) 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_FILTERFind 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_FILTERintfindMinimumBuildNumberForNLatest(@NotNull PlanKey planKey, int n) Find a build number for which exist n non-specs results with a build number greater or equal.Scans database for all theChainResultsSummaryobjects in the database that do not have a matchingChain<T extends ResultsSummary>
@NotNull List<T> findResultsSummaries(@NotNull ResultsSummaryCriteria criteria) Searches forResultsSummaryobjects given aResultsSummaryCriteria.<T extends ResultsSummary>
@NotNull List<T> findResultSummariesForExpiry(@NotNull ExpiryCriteria expiryCriteria) Searches forResultsSummaryobjects given aExpiryCriteria.Finds all specs states ids that are referenced by any build result summary@NotNull List<ResultsSummary> getAfterSummaries(@NotNull ImmutablePlan plan, int buildNumber, int maxCount) Returns build results strictly after given build number.<T extends ResultsSummary>
@NotNull Collection<T> getAllActiveResultSummariesForPlan(PlanKey planKey, Class<T> aClass) Returns all theResultsSummaryin aLifeCycleState.PENDING,LifeCycleState.QUEUED,LifeCycleState.IN_PROGRESSstate with the givenClassSee alsoLifeCycleState.isActive(LifeCycleState)andImmutableResultsSummary.isActive()<T extends ResultsSummary>
@NotNull Collection<T> getAllBuildResultSummariesInBuildState(@NotNull BuildState state, @NotNull Class<T> aClass) Returns all theBuildResultsSummaryin requested build state.<T extends ResultsSummary>
@NotNull Collection<T> getAllBuildResultSummariesInLifeCycleState(@NotNull LifeCycleState state, @NotNull Class<T> aClass) Returns all theBuildResultsSummaryin requested lifecycle state.<T extends ResultsSummary>
@NotNull Collection<T> getAllBuildResultSummariesInUnknownState(Class<T> aClass) Returns all theBuildResultsSummaryin aBuildState.UNKNOWNstate This will not return records marked for deletion.@NotNull Collection<BuildResultsSummary> Returns all theBuildResultsSummaryin aLifeCycleState.IN_PROGRESSstate This will not return records marked for deletion.<T extends ResultsSummary>
@NotNull Collection<T> getAllInProgressResultSummaries(Class<T> aClass) Returns all theResultsSummaryin aLifeCycleState.IN_PROGRESSstate with the givenClassThis will not return records marked for deletion.<T extends ResultsSummary>
@NotNull Collection<T> getAllPendingResultSummaries(Class<T> aClass) Returns all theResultsSummaryin aLifeCycleState.PENDINGstate with the givenClassThis will not return records marked for deletion.<T extends ResultsSummary>
@NotNull Collection<T> getAllQueuedResultSummaries(Class<T> aClass) Returns all theResultsSummaryin aLifeCycleState.QUEUEDstate with the givenClassThis will not return records marked for deletion.getAllResultSummariesForPlan(@NotNull Plan plan) Get all theResultsSummarys for the givenPlan@NotNull List<ResultsSummary> getBeforeSummaries(@NotNull ImmutablePlan plan, int buildNumber, int maxCount) Returns build results strictly before given build number.@Nullable ResultsSummarygetBreakingBuild(ResultsSummary summary) getChainStageResultById(long id) Returns aChainStageResultby its id<T extends ResultsSummary>
@NotNull List<T> getFinalizedResultSummariesForPlan(PlanKey planKey, Class<T> aClass, int firstResult, int maxResults) Returns all theResultsSummaryin aLifeCycleState.FINISHEDorLifeCycleState.NOT_BUILTstate with the givenClass.getFirstBuildSummary(@NotNull PlanKey planKey) Returns the first availableBuildResultsSummaryfor the givenPlanKey@Nullable ResultsSummarygetFixingBuild(ResultsSummary summary) Returns the first successfulBuildResultsSummaryfor givenBuildResultsSummary.@NotNull List<LinkedJiraIssue> getJiraIssuesForBuildResults(@NotNull List<ResultsSummary> buildResults) Retrieves a list ofLinkedJiraIssuelinked to the given build result summaries@NotNull List<LinkedJiraIssue> getJiraIssuesForPlanKey(@NotNull PlanKey planKey) Retrieves a list ofLinkedJiraIssuethat are linked to the given build.<T extends ResultsSummary>
TgetLastResultSummary(String planKey, Class<T> aClass) Returns the latest completedResultsSummaryandClassfor the plan represented by planKey<T extends ResultsSummary>
TgetLastResultSummary(String planKey, Class<T> aClass, boolean ignoreSpecsResults) Returns the latest completedResultsSummaryandClassfor the plan represented by planKey with possible skip of specs results.@NotNull List<ResultsSummary> getNeighbouringSummaries(@NotNull ImmutablePlan plan, int buildNumber, int maxCount) Returns build results "around" given build number.@NotNull List<ResultsSummary> getNeighbouringSummaries(Plan plan, int currentBuildNumber) Returns build results "around" given build numberintGet the number of concurrently running builds for planKeylonggetNumberOfFinalizedResults(@NotNull PlanKey planKey) Get number of theResultsSummarys in aLifeCycleState.FINISHEDorLifeCycleState.NOT_BUILTstate for the givenPlanlonggetNumberOfFinalizedResults(@NotNull ImmutablePlan plan) longReturns the number of finished results available for the givenPlan@Nullable ChainResultsSummarygetParentResultSummary(ResultsSummary summary) Get (@link ChainResultsSummary} containing givenResultsSummary<T extends ResultsSummary>
TgetResultsSummary(@NotNull PlanResultKey planResultKey, @NotNull Class<T> aClass) LookupResultsSummarybyPlanResultKeyand expected type<T extends ResultsSummary>
TgetResultsSummary(@NotNull PlanResultKey planResultKey, @NotNull Class<T> aClass, ResultDataRead dataRead) LookupResultsSummarybyPlanResultKeyand expected type, all lazy initialized collections can be eagerly readgetResultsSummaryId(@NotNull PlanResultKey planResultKey) ReturnResultsSummary's database id.<T extends ResultsSummary>
List<T> getResultSummariesByChangeSetId(@NotNull String changeSetId, @NotNull Class<T> discriminator) Get a list of all build results containing a commit with the given changeset ID.<T extends ResultsSummary>
List<T> getResultSummariesByChangeSetIdAndRepository(long repositoryId, @NotNull String changeSetId, @NotNull Class<T> discriminator) Get a list of all build results containing a commit with the given changeset ID that are in the given repository.<T extends ResultsSummary>
List<T> getResultSummariesByChangeSetIds(@NotNull List<String> changeSetIds, @NotNull Class<T> discriminator) Get a list of all build results containing a commit with any of the given changeset IDs.<T extends ResultsSummary>
List<T> getResultSummariesByCheckoutChangesetId(@NotNull String changesetId, @NotNull Class<T> discriminator) Get a list of all build results containing repositories checked out with the given changeset ID.@NotNull List<ResultsSummary> getResultSummariesForPlan(@NotNull ImmutablePlan plan, int firstResult, int maxResults) Get theResultsSummarys for the givenPlan.@NotNull List<ResultsSummary> getResultSummariesForPlanByLifeCycleState(@NotNull Plan plan, @NotNull LifeCycleState lifeCycleState, int firstResult, int maxResults) Get theResultsSummarys for the givenPlanin giveLifeCycleStatethat are Results are sorted by build number (descending).@Nullable ChainStageResultgetStageForResult(ResultsSummary summary) Get (@link ChainStageResult} containing givenResultsSummaryintmarkResultSummariesForDeletion(@NotNull PlanKey planKey) Mass update of allResultsSummaryrecords in the database related to a Plan identified by planKey.intmoveResultSummaries(@NotNull PlanKey oldPlanKey, @NotNull PlanKey newPlanKey) Reassigns plan key ResultsSummaries associated with selected plan key.intremoveResultsSummariesForPlan(@NotNull PlanKey planKey) Remove all resultSummary objects for the given plan.intremoveResultsSummariesForPlan(@NotNull PlanKey planKey, @NotNull List<PlanKey> affectedJobKeys) Remove all resultSummary objects for the given plan.voidremoveResultsSummary(@NotNull ResultsSummary resultsSummary) Removes the passed result summarylongscrollResultSummaries(@NotNull String buildKey, @NotNull ResultDataRead dataRead, @NotNull Consumer<ResultsSummary> consumer) Scroll through and execute function for each of ResultsSummary (Build and Chain) Objects passed to function are not fully initialized.longscrollVariableSubstitutionForExport(@NotNull Consumer<VariableSubstitution> consumer) Scroll through and execute function for each of VariableSubstitution Objects passed to function are not fully initialized.voidsetPlanDiscriminatorRegistry(PlanDiscriminatorRegistry planDiscriminatorRegistry) voidsetResultsSummaryDiscriminatorRegistry(ResultsSummaryDiscriminatorRegistry resultsSummaryDiscriminatorRegistry) Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
convertSearchTermToLikeExpression, countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findAll, merge, save, saveAllMethods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactoryMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDaoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findAll, merge, save, saveAll
-
Field Details
-
CREATION_DATE
- See Also:
-
BUILD_COMPLETED_DATE
- See Also:
-
BUILD_AGENT_ID
- See Also:
-
BUILD_NUMBER
- See Also:
-
PLAN_KEY
- See Also:
-
BUILD_STATE
- See Also:
-
LIFE_CYCLE_STATE
- See Also:
-
DELTA_STATE
- See Also:
-
CONTINUABLE
- See Also:
-
NEIGHBOURING_SUMMARIES_MAX_COUNT
public static final int NEIGHBOURING_SUMMARIES_MAX_COUNT- See Also:
-
-
Constructor Details
-
BuildResultsSummaryHibernateDao
public BuildResultsSummaryHibernateDao(BambooTransactionHibernateTemplate bambooTransactionHibernateTemplate)
-
-
Method Details
-
getResultsSummaryId
Description copied from interface:BuildResultsSummaryDaoReturnResultsSummary's database id. This method is intended for internal use (currently in importer)- Specified by:
getResultsSummaryIdin interfaceBuildResultsSummaryDao- Parameters:
planResultKey- plan result key ofResultsSummaryto be found- Returns:
- id of
ResultsSummaryor null if not found
-
getResultsSummary
@Nullable public <T extends ResultsSummary> T getResultsSummary(@NotNull @NotNull PlanResultKey planResultKey, @NotNull @NotNull Class<T> aClass) Description copied from interface:BuildResultsSummaryDaoLookupResultsSummarybyPlanResultKeyand expected type- Specified by:
getResultsSummaryin interfaceBuildResultsSummaryDao- Type Parameters:
T-- Parameters:
planResultKey-aClass-- Returns:
- resultSummary
-
getResultsSummary
@Nullable public <T extends ResultsSummary> T getResultsSummary(@NotNull @NotNull PlanResultKey planResultKey, @NotNull @NotNull Class<T> aClass, ResultDataRead dataRead) Description copied from interface:BuildResultsSummaryDaoLookupResultsSummarybyPlanResultKeyand expected type, all lazy initialized collections can be eagerly read- Specified by:
getResultsSummaryin interfaceBuildResultsSummaryDao- Type Parameters:
T-- Parameters:
planResultKey-aClass-dataRead-- Returns:
- resultSummary
-
findById
Description copied from interface:BambooObjectDaoFind an entity by its id- Specified by:
findByIdin interfaceBambooObjectDao<ResultsSummary>- Overrides:
findByIdin classBambooHibernateObjectDao<ResultsSummary>- Parameters:
id- id of entityaClass- class of entity- Returns:
- entity
-
getAllBuildResultSummariesInBuildState
@NotNull public <T extends ResultsSummary> @NotNull Collection<T> getAllBuildResultSummariesInBuildState(@NotNull @NotNull BuildState state, @NotNull @NotNull Class<T> aClass) Description copied from interface:BuildResultsSummaryDaoReturns all theBuildResultsSummaryin requested build state. This will not return records marked for deletion.- Specified by:
getAllBuildResultSummariesInBuildStatein interfaceBuildResultsSummaryDao- Parameters:
state-aClass-- Returns:
- summaries
-
getAllBuildResultSummariesInLifeCycleState
@NotNull public <T extends ResultsSummary> @NotNull Collection<T> getAllBuildResultSummariesInLifeCycleState(@NotNull @NotNull LifeCycleState state, @NotNull @NotNull Class<T> aClass) Description copied from interface:BuildResultsSummaryDaoReturns all theBuildResultsSummaryin requested lifecycle state. This will not return records marked for deletion.- Specified by:
getAllBuildResultSummariesInLifeCycleStatein interfaceBuildResultsSummaryDao
-
getAllBuildResultSummariesInUnknownState
@NotNull public <T extends ResultsSummary> @NotNull Collection<T> getAllBuildResultSummariesInUnknownState(Class<T> aClass) Description copied from interface:BuildResultsSummaryDaoReturns all theBuildResultsSummaryin aBuildState.UNKNOWNstate This will not return records marked for deletion.- Specified by:
getAllBuildResultSummariesInUnknownStatein interfaceBuildResultsSummaryDao- Returns:
- summaries
-
getAllPendingResultSummaries
@NotNull public <T extends ResultsSummary> @NotNull Collection<T> getAllPendingResultSummaries(Class<T> aClass) Description copied from interface:BuildResultsSummaryDaoReturns all theResultsSummaryin aLifeCycleState.PENDINGstate with the givenClassThis will not return records marked for deletion.- Specified by:
getAllPendingResultSummariesin interfaceBuildResultsSummaryDao- Returns:
- summaries
-
getAllQueuedResultSummaries
@NotNull public <T extends ResultsSummary> @NotNull Collection<T> getAllQueuedResultSummaries(Class<T> aClass) Description copied from interface:BuildResultsSummaryDaoReturns all theResultsSummaryin aLifeCycleState.QUEUEDstate with the givenClassThis will not return records marked for deletion.- Specified by:
getAllQueuedResultSummariesin interfaceBuildResultsSummaryDao- Returns:
- summaries
-
getAllInProgressResultSummaries
@NotNull public <T extends ResultsSummary> @NotNull Collection<T> getAllInProgressResultSummaries(Class<T> aClass) Description copied from interface:BuildResultsSummaryDaoReturns all theResultsSummaryin aLifeCycleState.IN_PROGRESSstate with the givenClassThis will not return records marked for deletion.- Specified by:
getAllInProgressResultSummariesin interfaceBuildResultsSummaryDao- Returns:
- summaries
-
getAllActiveResultSummariesForPlan
@NotNull public <T extends ResultsSummary> @NotNull Collection<T> getAllActiveResultSummariesForPlan(PlanKey planKey, Class<T> aClass) Description copied from interface:BuildResultsSummaryDaoReturns all theResultsSummaryin aLifeCycleState.PENDING,LifeCycleState.QUEUED,LifeCycleState.IN_PROGRESSstate with the givenClassSee alsoLifeCycleState.isActive(LifeCycleState)andImmutableResultsSummary.isActive()- Specified by:
getAllActiveResultSummariesForPlanin interfaceBuildResultsSummaryDao- Returns:
- summaries
-
getFinalizedResultSummariesForPlan
@NotNull public <T extends ResultsSummary> @NotNull List<T> getFinalizedResultSummariesForPlan(PlanKey planKey, Class<T> aClass, int firstResult, int maxResults) Description copied from interface:BuildResultsSummaryDaoReturns all theResultsSummaryin aLifeCycleState.FINISHEDorLifeCycleState.NOT_BUILTstate with the givenClass. Result are sorted descending by build number.- Specified by:
getFinalizedResultSummariesForPlanin interfaceBuildResultsSummaryDao- 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
Description copied from interface:BuildResultsSummaryDaoGet the number of concurrently running builds for planKey- Specified by:
getNumberOfConcurrentlyRunningBuildsin interfaceBuildResultsSummaryDao- Parameters:
planKey-- Returns:
-
getAllInProgressBuildResultSummaries
Description copied from interface:BuildResultsSummaryDaoReturns all theBuildResultsSummaryin aLifeCycleState.IN_PROGRESSstate This will not return records marked for deletion.- Specified by:
getAllInProgressBuildResultSummariesin interfaceBuildResultsSummaryDao- Returns:
- summaries
-
findAnyResultSummary
@Nullable public <T extends ResultsSummary> T findAnyResultSummary(@NotNull @NotNull ResultsSummaryCriteria criteria, ResultDataRead dataRead) Description copied from interface:BuildResultsSummaryDaoSearches for anyResultsSummaryobject given aResultsSummaryCriteria. Note that if criteria does not specify order then result of this method might be non-deterministic.- Specified by:
findAnyResultSummaryin interfaceBuildResultsSummaryDao- Parameters:
criteria-- Returns:
ListofBuildResultsSummary
-
findByJiraCriteria
@NotNull public <T extends ResultsSummary> @NotNull List<T> findByJiraCriteria(@NotNull @NotNull ByJiraIssueResultSearchCriteria jiraCriteria, @NotNull @NotNull ResultSummarySearchCriteria criteria, @NotNull @NotNull Class<T> resultClass, @NotNull @NotNull ResultDataRead dataRead) Description copied from interface:BuildResultsSummaryDaoSearches for anyResultsSummaryobject given aByJiraIssueResultSearchCriteriaandResultSummarySearchCriteria.- Specified by:
findByJiraCriteriain interfaceBuildResultsSummaryDao
-
countByJiraCriteria
public <T extends ResultsSummary> Long countByJiraCriteria(@NotNull @NotNull ByJiraIssueResultSearchCriteria jiraCriteria, @NotNull @NotNull ResultSummarySearchCriteria criteria, @NotNull @NotNull Class<T> resultClass) Description copied from interface:BuildResultsSummaryDaoCountsResultsSummaryobjects given aByJiraIssueResultSearchCriteriaandResultSummarySearchCriteria.- Specified by:
countByJiraCriteriain interfaceBuildResultsSummaryDao
-
findByCriteria
@NotNull public <T extends ResultsSummary> @NotNull List<T> findByCriteria(@NotNull @NotNull ResultSummarySearchCriteria criteria, @NotNull @NotNull Class<T> resultClass, @NotNull @NotNull ResultDataRead dataRead) Description copied from interface:BuildResultsSummaryDaoSearches for anyResultsSummaryobject given aResultSummarySearchCriteria.- Specified by:
findByCriteriain interfaceBuildResultsSummaryDao
-
findResultsSummaries
@NotNull public <T extends ResultsSummary> @NotNull List<T> findResultsSummaries(@NotNull @NotNull ResultsSummaryCriteria criteria) Description copied from interface:BuildResultsSummaryDaoSearches forResultsSummaryobjects given aResultsSummaryCriteria. Note that if criteria does not specify maxResults property, a hard cap of 10000 results is applied to search operation.- Specified by:
findResultsSummariesin interfaceBuildResultsSummaryDao- Parameters:
criteria-- Returns:
ListofBuildResultsSummary
-
findByAuthors
public <T extends ResultsSummary> List<T> findByAuthors(Collection<ExtendedAuthor> authors, Class<T> resultClass, int maxResults) - Specified by:
findByAuthorsin interfaceBuildResultsSummaryDao
-
moveResultSummaries
public int moveResultSummaries(@NotNull @NotNull PlanKey oldPlanKey, @NotNull @NotNull PlanKey newPlanKey) Description copied from interface:BuildResultsSummaryDaoReassigns plan key ResultsSummaries associated with selected plan key.- Specified by:
moveResultSummariesin interfaceBuildResultsSummaryDao- Parameters:
oldPlanKey- the plan key to move fromnewPlanKey- the plan key to move to- Returns:
- the number of result summaries updated
-
countResultSummaries
Description copied from interface:BuildResultsSummaryDaoCount the number ofResultsSummaryobjects given aResultsSummaryCriteria.- Specified by:
countResultSummariesin interfaceBuildResultsSummaryDao- Parameters:
criteria-- Returns:
- long representing the count of
ResultsSummarythat match the criteria.
-
findResultSummariesForExpiry
@NotNull public <T extends ResultsSummary> @NotNull List<T> findResultSummariesForExpiry(@NotNull @NotNull ExpiryCriteria expiryCriteria) Description copied from interface:BuildResultsSummaryDaoSearches forResultsSummaryobjects given aExpiryCriteria.- Specified by:
findResultSummariesForExpiryin interfaceBuildResultsSummaryDao- Type Parameters:
T- type of result objects (determined according to given criteria)- Parameters:
expiryCriteria- search constraints- Returns:
ListofResultsSummary
-
findJobKeysFromExistingChainResults
@NotNull public @NotNull List<PlanKey> findJobKeysFromExistingChainResults(@NotNull @NotNull PlanKey chainKey) Description copied from interface:BuildResultsSummaryDaoFind keys of jobs for which results associated with given plan exist. The jobs themselves might no longer exist.- Specified by:
findJobKeysFromExistingChainResultsin interfaceBuildResultsSummaryDao
-
removeResultsSummariesForPlan
public int removeResultsSummariesForPlan(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull List<PlanKey> affectedJobKeys) Description copied from interface:BuildResultsSummaryDaoRemove all resultSummary objects for the given plan. Time-cost of this method might be significant if there are thousands ofResultsSummaryobjects to be deleted- Specified by:
removeResultsSummariesForPlanin interfaceBuildResultsSummaryDao- Parameters:
planKey- identifier of plan to remove results for.affectedJobKeys- identifiers of jobs related to the plan you want to remove results for.- Returns:
- number of deleted
ResultsSummaryobjects
-
removeResultsSummariesForPlan
Description copied from interface:BuildResultsSummaryDaoRemove all resultSummary objects for the given plan. Time-cost of this method might be significant if there are thousands ofResultsSummaryobjects to be deleted- Specified by:
removeResultsSummariesForPlanin interfaceBuildResultsSummaryDao- Parameters:
planKey- identifier of plan to remove results for.- Returns:
- number of deleted
ResultsSummaryobjects
-
findPlanKeysFromAllOrphanedResultSummaries
Description copied from interface:BuildResultsSummaryDaoScans database for all theChainResultsSummaryobjects in the database that do not have a matchingChain- Specified by:
findPlanKeysFromAllOrphanedResultSummariesin interfaceBuildResultsSummaryDao- Returns:
- list of distinct
PlanKeys they reference
-
countBuildResultsSummaries
- Specified by:
countBuildResultsSummariesin interfaceBuildResultsSummaryDao
-
countBuildResultsSummaries
public int countBuildResultsSummaries()Description copied from interface:BuildResultsSummaryDaoCount all result summaries records. This will not count records marked for deletion.- Specified by:
countBuildResultsSummariesin interfaceBuildResultsSummaryDao- Returns:
-
findBuildsForImageConfiguration
@NotNull public @NotNull List<BuildResultsSummary> findBuildsForImageConfiguration(String planKey, ElasticImageConfiguration elasticImage, @Nullable @Nullable BuildState buildState, int maxResults) Description copied from interface:BuildResultsSummaryDaoSearcher for builds of an image- Specified by:
findBuildsForImageConfigurationin interfaceBuildResultsSummaryDao- Parameters:
planKey-elasticImage-buildState-maxResults-- Returns:
-
findBuildResultsWithArtifacts
Description copied from interface:BuildResultsSummaryDaoFind all build results which have matching artifacts. Sorted by buildNumber, ascending- Specified by:
findBuildResultsWithArtifactsin interfaceBuildResultsSummaryDao- Parameters:
planKey-- Returns:
-
getResultSummariesByChangeSetId
public <T extends ResultsSummary> List<T> getResultSummariesByChangeSetId(@NotNull @NotNull String changeSetId, @NotNull @NotNull Class<T> discriminator) Description copied from interface:BuildResultsSummaryDaoGet a list of all build results containing a commit with the given changeset ID.
Please note that a build result summary contains list of commits which were added in a given build (compared to a previous one). It means that a list of commits may be empty if there were no repository changes. A list of commits is also empty in case of a first build in a plan or a first build of a plan's branch. A build results summary may also contain no commits if no version control system was used.
This will not return records marked for deletion.
In case you need to find build results based on commit which was checked out into a build workspace, see the
BuildResultsSummaryDao.getResultSummariesByCheckoutChangesetId(String, Class).- Specified by:
getResultSummariesByChangeSetIdin interfaceBuildResultsSummaryDao- Parameters:
changeSetId- of the commitdiscriminator- class of the ResultSummary interface required- Returns:
- List of ResultsSummary (ResultSummary as determined by discriminator) containing a commit with the given changeSetId
-
getResultSummariesByCheckoutChangesetId
public <T extends ResultsSummary> List<T> getResultSummariesByCheckoutChangesetId(@NotNull @NotNull String changesetId, @NotNull @NotNull Class<T> discriminator) Description copied from interface:BuildResultsSummaryDaoGet a list of all build results containing repositories checked out with the given changeset ID.
A build may use one or more repositories, each checked out with a certain changeset. This method returns build results having exact changeset ID checked out (note that it does not search for intermediate commits between two changeset IDs).
This will not return records marked for deletion.
In case you need to find build results based on commits which were added in certain build (compared to a previous one), see the
BuildResultsSummaryDao.getResultSummariesByChangeSetId(String, Class).- Specified by:
getResultSummariesByCheckoutChangesetIdin interfaceBuildResultsSummaryDao- Parameters:
changesetId- of the commitdiscriminator- class of the ResultSummary interface required- Returns:
- List of ResultsSummary (ResultSummary as determined by discriminator) containing a repository which
was checked out with a
changesetIdcommit
-
getResultSummariesByChangeSetIdAndRepository
public <T extends ResultsSummary> List<T> getResultSummariesByChangeSetIdAndRepository(long repositoryId, @NotNull @NotNull String changeSetId, @NotNull @NotNull Class<T> discriminator) Description copied from interface:BuildResultsSummaryDaoGet a list of all build results containing a commit with the given changeset ID that are in the given repository. This will not return records marked for deletion.- Specified by:
getResultSummariesByChangeSetIdAndRepositoryin interfaceBuildResultsSummaryDao- Type Parameters:
T- extends ResultSummary- Parameters:
repositoryId- of the repositorychangeSetId- of the commitdiscriminator- class of the ResultSummary interface required- Returns:
- List of ResultsSummary (ResultSummary as determined by discriminator) containing a commit with the given changeSetId
-
getResultSummariesByChangeSetIds
public <T extends ResultsSummary> List<T> getResultSummariesByChangeSetIds(@NotNull @NotNull List<String> changeSetIds, @NotNull @NotNull Class<T> discriminator) Description copied from interface:BuildResultsSummaryDaoGet a list of all build results containing a commit with any of the given changeset IDs. This will not return records marked for deletion.- Specified by:
getResultSummariesByChangeSetIdsin interfaceBuildResultsSummaryDao- Parameters:
changeSetIds- of the commitsdiscriminator- class of the ResultSummary interface required- Returns:
- List of ResultsSummary (ResultSummary as determined by discriminator) containing a commit with the any of the given changeSetIds
-
findBuildResultsSummariesByJiraIssues
@NotNull public @NotNull List<ResultsSummary> findBuildResultsSummariesByJiraIssues(@Nullable @Nullable List<String> issueKeys) Description copied from interface:BuildResultsSummaryDaoGet a list of results summaries associated with the list of issue keys. This will not return records marked for deletion.- Specified by:
findBuildResultsSummariesByJiraIssuesin interfaceBuildResultsSummaryDao- Parameters:
issueKeys-- Returns:
- list of result summaries
-
findBuildResultsSummariesByProjectKey
@NotNull public @NotNull List<ResultsSummary> findBuildResultsSummariesByProjectKey(@Nullable @Nullable String jiraProjectKey) Description copied from interface:BuildResultsSummaryDaoRetrieve a list of results summaries associated with given JIRA project key This will not return records marked for deletion.- Specified by:
findBuildResultsSummariesByProjectKeyin interfaceBuildResultsSummaryDao- Parameters:
jiraProjectKey- - JIRA project key (prefix of the jira issues e.g. 'BAM')- Returns:
- a list of results summaries associated with given JIRA project key
-
removeResultsSummary
Description copied from interface:BuildResultsSummaryDaoRemoves the passed result summary- Specified by:
removeResultsSummaryin interfaceBuildResultsSummaryDao- Parameters:
resultsSummary- -
-
getFirstBuildSummary
Description copied from interface:BuildResultsSummaryDaoReturns the first availableBuildResultsSummaryfor the givenPlanKey- Specified by:
getFirstBuildSummaryin interfaceBuildResultsSummaryDao- Parameters:
planKey-- Returns:
- buildResult
-
getLastResultSummary
Description copied from interface:BuildResultsSummaryDaoReturns the latest completedResultsSummaryandClassfor the plan represented by planKey- Specified by:
getLastResultSummaryin interfaceBuildResultsSummaryDao- Parameters:
planKey-aClass-- Returns:
- buildResult
-
getLastResultSummary
public <T extends ResultsSummary> T getLastResultSummary(String planKey, Class<T> aClass, boolean ignoreSpecsResults) Description copied from interface:BuildResultsSummaryDaoReturns the latest completedResultsSummaryandClassfor the plan represented by planKey with possible skip of specs results.- Specified by:
getLastResultSummaryin interfaceBuildResultsSummaryDao- Parameters:
planKey-aClass-ignoreSpecsResults-- Returns:
- buildResult
-
findFirstBuildNumberAfter
Description copied from interface:BuildResultsSummaryDaoReturns the build number of next existing build results.- Specified by:
findFirstBuildNumberAfterin interfaceBuildResultsSummaryDao- Parameters:
planKey-buildNumber-- Returns:
- null if no build result summary with higher number exists
-
findLastBuildNumberBefore
Description copied from interface:BuildResultsSummaryDaoReturns the build number of previous existing build results.- Specified by:
findLastBuildNumberBeforein interfaceBuildResultsSummaryDao- Parameters:
planKey-buildNumber-- Returns:
- null if no build result summary with lower number exists
-
getNumberOfFinishedResults
Description copied from interface:BuildResultsSummaryDaoReturns the number of finished results available for the givenPlan- Specified by:
getNumberOfFinishedResultsin interfaceBuildResultsSummaryDao- Parameters:
plan-- Returns:
- numberOfResults
-
getNumberOfFinalizedResults
- Specified by:
getNumberOfFinalizedResultsin interfaceBuildResultsSummaryDao- Parameters:
plan-- Returns:
- number of summaries
-
getNumberOfFinalizedResults
Description copied from interface:BuildResultsSummaryDaoGet number of theResultsSummarys in aLifeCycleState.FINISHEDorLifeCycleState.NOT_BUILTstate for the givenPlan- Specified by:
getNumberOfFinalizedResultsin interfaceBuildResultsSummaryDao- Parameters:
planKey-- Returns:
- number of summaries
-
getNeighbouringSummaries
@NotNull public @NotNull List<ResultsSummary> getNeighbouringSummaries(Plan plan, int currentBuildNumber) Description copied from interface:BuildResultsSummaryDaoReturns build results "around" given build number- Specified by:
getNeighbouringSummariesin interfaceBuildResultsSummaryDao- Parameters:
plan-currentBuildNumber-- Returns:
-
getNeighbouringSummaries
@NotNull public @NotNull List<ResultsSummary> getNeighbouringSummaries(@NotNull @NotNull ImmutablePlan plan, int buildNumber, int maxCount) Description copied from interface:BuildResultsSummaryDaoReturns build results "around" given build number.- Specified by:
getNeighbouringSummariesin interfaceBuildResultsSummaryDao- Parameters:
plan- the plan to return results forbuildNumber- the build number to search aroundmaxCount- the maximum number of builds to return- Returns:
- the results in ascending order. At most there will be
maxCountitems in the list, inclusive of the result forbuildNumber(if present).
-
getBeforeSummaries
@NotNull public @NotNull List<ResultsSummary> getBeforeSummaries(@NotNull @NotNull ImmutablePlan plan, int buildNumber, int maxCount) Description copied from interface:BuildResultsSummaryDaoReturns build results strictly before given build number.- Specified by:
getBeforeSummariesin interfaceBuildResultsSummaryDao- Parameters:
plan- the plan to return results forbuildNumber- the build number to search beforemaxCount- the maximum number of builds to return- Returns:
- the results in ascending order. At most there will be
maxCountitems in the list, exclusive of the result forbuildNumber(if present).
-
getAfterSummaries
@NotNull public @NotNull List<ResultsSummary> getAfterSummaries(@NotNull @NotNull ImmutablePlan plan, int buildNumber, int maxCount) Description copied from interface:BuildResultsSummaryDaoReturns build results strictly after given build number.- Specified by:
getAfterSummariesin interfaceBuildResultsSummaryDao- Parameters:
plan- the plan to return results forbuildNumber- the build number to search aftermaxCount- the maximum number of builds to return- Returns:
- the results in ascending order. At most there will be
maxCountitems in the list, exclusive of the result forbuildNumber(if present).
-
getBreakingBuild
- Specified by:
getBreakingBuildin interfaceBuildResultsSummaryDao
-
getFixingBuild
Description copied from interface:BuildResultsSummaryDaoReturns the first successfulBuildResultsSummaryfor givenBuildResultsSummary. The input build is returned if it is successful.- Specified by:
getFixingBuildin interfaceBuildResultsSummaryDao- Parameters:
summary-- Returns:
- null if there is no fixing build.
-
getJiraIssuesForBuildResults
@NotNull public @NotNull List<LinkedJiraIssue> getJiraIssuesForBuildResults(@NotNull @NotNull List<ResultsSummary> buildResults) Description copied from interface:BuildResultsSummaryDaoRetrieves a list ofLinkedJiraIssuelinked to the given build result summaries- Specified by:
getJiraIssuesForBuildResultsin interfaceBuildResultsSummaryDao- Parameters:
buildResults-- Returns:
-
getJiraIssuesForPlanKey
@NotNull public @NotNull List<LinkedJiraIssue> getJiraIssuesForPlanKey(@NotNull @NotNull PlanKey planKey) Description copied from interface:BuildResultsSummaryDaoRetrieves a list ofLinkedJiraIssuethat are linked to the given build.- Specified by:
getJiraIssuesForPlanKeyin interfaceBuildResultsSummaryDao- Parameters:
planKey-- Returns:
-
scrollVariableSubstitutionForExport
public long scrollVariableSubstitutionForExport(@NotNull @NotNull Consumer<VariableSubstitution> consumer) Description copied from interface:BuildResultsSummaryDaoScroll 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.- Specified by:
scrollVariableSubstitutionForExportin interfaceBuildResultsSummaryDao- Parameters:
consumer- consumer to accept each of the VariableSubstitution- Returns:
- number of traversed rows
-
findFirstResultAfter
@Nullable public <T extends ResultsSummary> T findFirstResultAfter(@NotNull @NotNull String planKey, int buildNumber, Class<T> aClass) Description copied from interface:BuildResultsSummaryDaoFinds the first successful or failedBuildResultsSummaryafter buildNumber- Specified by:
findFirstResultAfterin interfaceBuildResultsSummaryDao- Parameters:
planKey-buildNumber-aClass-- Returns:
- buildResult
-
findLastResultBefore
@Nullable public <T extends ResultsSummary> T findLastResultBefore(@NotNull @NotNull String planKey, int buildNumber, Class<T> aClass, boolean includeOnceOffBuilds) Description copied from interface:BuildResultsSummaryDaoFinds the last successful or failedResultsSummarybefore buildNumber- Specified by:
findLastResultBeforein interfaceBuildResultsSummaryDao- Parameters:
planKey-buildNumber-includeOnceOffBuilds- tells whether we also consider 'once-off' builds (the ones with custom revision) or should we skip them in our calculations- Returns:
- buildResult
-
findLastBuildResultBeforeWithTests
public <T extends ResultsSummary> T findLastBuildResultBeforeWithTests(@NotNull @NotNull PlanResultKey planResultKey, @NotNull @NotNull Class<T> aClass, boolean includeOnceOffBuilds) - Specified by:
findLastBuildResultBeforeWithTestsin interfaceBuildResultsSummaryDao- Type Parameters:
T- of result- Parameters:
planResultKey- of the resultaClass- ofincludeOnceOffBuilds- tells whether we also consider 'once-off' builds (the ones with custom revision) or should we skip them in our calculations- Returns:
- resultsSummary
-
findFirstBuildResultAfter
Description copied from interface:BuildResultsSummaryDaoFinds the firstBuildResultsSummaryafter the specified build number for the given plan key. The result will have a build number greater than the provided value. This will not return records marked for deletion nor specs scans.- Specified by:
findFirstBuildResultAfterin interfaceBuildResultsSummaryDao- Parameters:
planKey- the key of the plan to search results forbuildNumber- the build number to search after (exclusive)- Returns:
- the first
BuildResultsSummaryafter the given build number, or null if none exists
-
findLastBuildResultBefore
public ResultsSummary findLastBuildResultBefore(@NotNull @NotNull String planKey, int buildNumber, boolean includeOnceOffBuilds) Description copied from interface:BuildResultsSummaryDaoFinds the lastBuildResultsSummarybefore the specified build number for the given plan key and build state. The result will have a build number less than the provided value and match the givenBuildState. This will not return records marked for deletion not specs scans.- Specified by:
findLastBuildResultBeforein interfaceBuildResultsSummaryDao- Parameters:
planKey- the key of the plan to search results forbuildNumber- the build number to search before (exclusive)includeOnceOffBuilds- whether to include 'once-off' builds (e.g. custom revision) in the search- Returns:
- the last
BuildResultsSummarybefore the given build number with the specified state, or null if none exists
-
findFirstBuildResultWithBuildStateAfter
public ResultsSummary findFirstBuildResultWithBuildStateAfter(@NotNull @NotNull String planKey, int buildNumber, @NotNull @NotNull BuildState buildState) Description copied from interface:BuildResultsSummaryDaoFinds the last successfulBuildResultsSummaryafter buildNumber- Specified by:
findFirstBuildResultWithBuildStateAfterin interfaceBuildResultsSummaryDao- Parameters:
planKey-buildNumber-buildState-- Returns:
- buildResult
-
findLastBuildResultWithBuildStateBefore
public ResultsSummary findLastBuildResultWithBuildStateBefore(@NotNull @NotNull String planKey, int buildNumber, @NotNull @NotNull BuildState buildState, boolean includeOnceOffBuilds) Description copied from interface:BuildResultsSummaryDaoFinds the lastBuildResultsSummarybefore buildNumber withBuildState- Specified by:
findLastBuildResultWithBuildStateBeforein interfaceBuildResultsSummaryDao- Parameters:
planKey-buildNumber-buildState-includeOnceOffBuilds-- Returns:
- buildResult
-
findFirstBuildResultWithBuildStateBetween
@Nullable public @Nullable ResultsSummary findFirstBuildResultWithBuildStateBetween(@NotNull @NotNull String planKey, int lowerBuildNumber, int upperBuildNumber, @NotNull @NotNull BuildState buildState) Description copied from interface:BuildResultsSummaryDaoReturns the first build that matchesBuildStatebetween the given build number range Note that this function is inclusive of the upper and lower bound- Specified by:
findFirstBuildResultWithBuildStateBetweenin interfaceBuildResultsSummaryDao- Parameters:
planKey-lowerBuildNumber-upperBuildNumber-buildState-- Returns:
- buildResult
-
scrollResultSummaries
public long scrollResultSummaries(@NotNull @NotNull String buildKey, @NotNull @NotNull ResultDataRead dataRead, @NotNull @NotNull Consumer<ResultsSummary> consumer) Description copied from interface:BuildResultsSummaryDaoScroll through and execute function for each of ResultsSummary (Build and Chain) Objects passed to function are not fully initialized. Collections are empty and related objects have only id set.- Specified by:
scrollResultSummariesin interfaceBuildResultsSummaryDao- Parameters:
buildKey- of the plan you want to scroll the result summaries fordataRead- if the data should be loaded lazy or eagerlyconsumer- consumer to accept each of the BuildResultSummaries- Returns:
- number of traversed rows
-
getChainStageResultById
Description copied from interface:BuildResultsSummaryDaoReturns aChainStageResultby its id- Specified by:
getChainStageResultByIdin interfaceBuildResultsSummaryDao- Returns:
- chainStageResult
-
getAllResultSummariesForPlan
Description copied from interface:BuildResultsSummaryDaoGet all theResultsSummarys for the givenPlan- Specified by:
getAllResultSummariesForPlanin interfaceBuildResultsSummaryDao- Parameters:
plan-- Returns:
- summaries
-
getResultSummariesForPlan
@NotNull public @NotNull List<ResultsSummary> getResultSummariesForPlan(@NotNull @NotNull ImmutablePlan plan, int firstResult, int maxResults) Description copied from interface:BuildResultsSummaryDaoGet theResultsSummarys for the givenPlan. 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.- Specified by:
getResultSummariesForPlanin interfaceBuildResultsSummaryDao- 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 public @NotNull List<ResultsSummary> getResultSummariesForPlanByLifeCycleState(@NotNull @NotNull Plan plan, @NotNull @NotNull LifeCycleState lifeCycleState, int firstResult, int maxResults) Description copied from interface:BuildResultsSummaryDaoGet theResultsSummarys for the givenPlanin giveLifeCycleStatethat are Results are sorted by build number (descending). User can skip first n result and request maximum number of results.- Specified by:
getResultSummariesForPlanByLifeCycleStatein interfaceBuildResultsSummaryDao- 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
Description copied from interface:BuildResultsSummaryDaoGet (@link ChainResultsSummary} containing givenResultsSummary- Specified by:
getParentResultSummaryin interfaceBuildResultsSummaryDao- Parameters:
summary-- Returns:
-
getStageForResult
Description copied from interface:BuildResultsSummaryDaoGet (@link ChainStageResult} containing givenResultsSummary- Specified by:
getStageForResultin interfaceBuildResultsSummaryDao- Parameters:
summary-- Returns:
-
findLatestResultsSummaries
Description copied from interface:BuildResultsSummaryDaoFind 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- Specified by:
findLatestResultsSummariesin interfaceBuildResultsSummaryDao- Returns:
- list of latest results summaries
-
findLatestFailedResultSummaries
Description copied from interface:BuildResultsSummaryDaoFind 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- Specified by:
findLatestFailedResultSummariesin interfaceBuildResultsSummaryDao- Returns:
- list of latest results summaries
-
findChainResultsWithJobLabelled
public List<ChainResultsSummary> findChainResultsWithJobLabelled(ResultsSummaryCriteria queryCriteria, List<Label> labels) Description copied from interface:BuildResultsSummaryDaoSearches 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
- Specified by:
findChainResultsWithJobLabelledin interfaceBuildResultsSummaryDao- Parameters:
queryCriteria- containing the restrictions for the chains to be returnedlabels- 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
public <T extends ResultsSummary> T findLastResultSummaryWithState(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull BuildState buildState, @NotNull @NotNull Class<T> aClass) - Specified by:
findLastResultSummaryWithStatein interfaceBuildResultsSummaryDao- Type Parameters:
T-- Parameters:
planKey-buildState-aClass-- Returns:
- the last
ResultsSummarywith the providedBuildState
-
findLastResultSummaryWithState
@Nullable public <T extends ResultsSummary> T findLastResultSummaryWithState(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull BuildState buildState, @NotNull @NotNull Class<T> aClass, boolean ignoreSpecsResults) - Specified by:
findLastResultSummaryWithStatein interfaceBuildResultsSummaryDao- Type Parameters:
T-- Parameters:
planKey-buildState-aClass-ignoreSpecsResults-- Returns:
- the last
ResultsSummarywith the providedBuildState
-
countResultsWithState
public int countResultsWithState(@NotNull @NotNull PlanKey planKey, int lowerBuildNumber, int upperBuildNumber, @NotNull @NotNull BuildState buildState) Description copied from interface:BuildResultsSummaryDaoCounts results with a given state in a given build number range for plan.- Specified by:
countResultsWithStatein interfaceBuildResultsSummaryDao- Parameters:
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- Returns:
- the count
-
markResultSummariesForDeletion
Description copied from interface:BuildResultsSummaryDaoMass update of allResultsSummaryrecords in the database related to a Plan identified by planKey.- Specified by:
markResultSummariesForDeletionin interfaceBuildResultsSummaryDao- Parameters:
planKey- key of a plan- Returns:
- number of updated records
-
getPlanKeysSortedByNumberOfFinalizedResultSummaries
- Specified by:
getPlanKeysSortedByNumberOfFinalizedResultSummariesin interfaceBuildResultsSummaryDao
-
calculateQueueDuration
@Nullable public @Nullable Long calculateQueueDuration(@NotNull @NotNull ChainResultsSummary resultsSummary) Description copied from interface:BuildResultsSummaryDaoCalculates queueDuration value for a chain result as a maximum value of (vcsUpdateTime - queueTime) for all related job results.- Specified by:
calculateQueueDurationin interfaceBuildResultsSummaryDao- Parameters:
resultsSummary-ChainResultsSummaryfor which calculation has to be made- Returns:
- queueDuration value or null if there are no related
BuildResultsSummaryrecords
-
calculateVcsUpdateDuration
@Nullable public @Nullable Long calculateVcsUpdateDuration(@NotNull @NotNull ChainResultsSummary resultsSummary) Description copied from interface:BuildResultsSummaryDaoCalculates vcsUpdateDuration value for a chain result as a maximum value of (buildDate - vcsUpdateTime) for all related job results.- Specified by:
calculateVcsUpdateDurationin interfaceBuildResultsSummaryDao- Parameters:
resultsSummary-ChainResultsSummaryfor which calculation has to be made- Returns:
- vcsUpdateDuration value or null if there are no related
BuildResultsSummaryrecords
-
setResultsSummaryDiscriminatorRegistry
public void setResultsSummaryDiscriminatorRegistry(ResultsSummaryDiscriminatorRegistry resultsSummaryDiscriminatorRegistry) -
setPlanDiscriminatorRegistry
-
findAllBuildResultsNumbers
- Specified by:
findAllBuildResultsNumbersin interfaceBuildResultsSummaryDao
-
findBuildResultsNumberRange
Description copied from interface:BuildResultsSummaryDaoFinds minimum and maximum build number for a plan. Works for both chains and jobs.- Specified by:
findBuildResultsNumberRangein interfaceBuildResultsSummaryDao- Parameters:
planKey-- Returns:
- (min, max) pair or (0,0) if there are no results.
-
findChainResultsWithFormatVersionLessThan
@NotNull public @NotNull List<PlanResultKey> findChainResultsWithFormatVersionLessThan(int formatVersion, int maxResults) - Specified by:
findChainResultsWithFormatVersionLessThanin interfaceBuildResultsSummaryDao
-
findSpecsStatesIdsReferencedByBuildResultSummaries
Description copied from interface:BuildResultsSummaryDaoFinds all specs states ids that are referenced by any build result summary- Specified by:
findSpecsStatesIdsReferencedByBuildResultSummariesin interfaceBuildResultsSummaryDao
-
findMinimumBuildNumberForNLatest
Description copied from interface:BuildResultsSummaryDaoFind a build number for which exist n non-specs results with a build number greater or equal. If the build has less that n such results, the lowest build number is returned.- Specified by:
findMinimumBuildNumberForNLatestin interfaceBuildResultsSummaryDao
-