Package com.atlassian.bamboo.specs
Class BambooSpecsStateDaoImpl
- java.lang.Object
-
- com.atlassian.bamboo.specs.BambooSpecsStateDaoImpl
-
- All Implemented Interfaces:
BambooSpecsStateDao
public class BambooSpecsStateDaoImpl extends Object implements BambooSpecsStateDao
-
-
Constructor Summary
Constructors Constructor Description BambooSpecsStateDaoImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
countPlansLinkedToState(VcsLocationBambooSpecsState specsState)
long
countStatesByRepositoryId(long repositoryId)
void
delete(VcsLocationBambooSpecsState specsState)
Optional<VcsLocationBambooSpecsState>
findById(long specsStateId)
@NotNull List<VcsLocationBambooSpecsState>
findByVcsLocation(long repositoryId, @NotNull String branch)
Get all specs state for given repository and its branch@NotNull List<VcsLocationBambooSpecsState>
findByVcsLocationIdOrderBySpecsExecutionDate(long repositoryId, @NotNull String branch, int limit)
Get latestlimit
specs state for given repository and its branchOptional<VcsLocationBambooSpecsState>
findLatestState(long rootVcsRepositoryId, String branch)
@NotNull Collection<PlanKey>
findPlansInOtherStates(@NotNull VcsLocationBambooSpecsState specsState)
@NotNull List<String>
findSpecsBranches(long rootVcsRepositoryId)
Get all branches fromVcsLocationBambooSpecsState
for given repository@NotNull List<String>
findSpecsBranches(long rootVcsRepositoryId, @NotNull String searchTerm)
Get all branches fromVcsLocationBambooSpecsState
for given repository that match the search term@NotNull List<VcsLocationBambooSpecsState>
getUnfinishedSpecsScans()
boolean
otherSuccessfullySpecsImportExistsForRevision(long rootVcsRepositoryId, @NotNull String revision, long specsStateId)
Check if for given repository and revision specs import has ended successfully for other Specs state than one with specsStateIdvoid
saveOrUpdate(VcsLocationBambooSpecsState vcsLocationBambooSpecsState)
void
scrollVcsLocationBambooSpecsStateForExport(@NotNull Consumer<VcsLocationBambooSpecsState> consumer)
-
-
-
Method Detail
-
findById
public Optional<VcsLocationBambooSpecsState> findById(long specsStateId)
- Specified by:
findById
in interfaceBambooSpecsStateDao
-
findLatestState
public Optional<VcsLocationBambooSpecsState> findLatestState(long rootVcsRepositoryId, String branch)
- Specified by:
findLatestState
in interfaceBambooSpecsStateDao
-
saveOrUpdate
public void saveOrUpdate(VcsLocationBambooSpecsState vcsLocationBambooSpecsState)
- Specified by:
saveOrUpdate
in interfaceBambooSpecsStateDao
-
findPlansInOtherStates
@NotNull public @NotNull Collection<PlanKey> findPlansInOtherStates(@NotNull @NotNull VcsLocationBambooSpecsState specsState)
- Specified by:
findPlansInOtherStates
in interfaceBambooSpecsStateDao
-
countPlansLinkedToState
public long countPlansLinkedToState(VcsLocationBambooSpecsState specsState)
- Specified by:
countPlansLinkedToState
in interfaceBambooSpecsStateDao
-
scrollVcsLocationBambooSpecsStateForExport
public void scrollVcsLocationBambooSpecsStateForExport(@NotNull @NotNull Consumer<VcsLocationBambooSpecsState> consumer)
- Specified by:
scrollVcsLocationBambooSpecsStateForExport
in interfaceBambooSpecsStateDao
-
findByVcsLocation
@NotNull public @NotNull List<VcsLocationBambooSpecsState> findByVcsLocation(long repositoryId, @NotNull @NotNull String branch)
Description copied from interface:BambooSpecsStateDao
Get all specs state for given repository and its branch- Specified by:
findByVcsLocation
in interfaceBambooSpecsStateDao
- Parameters:
repositoryId
- id of the repositorybranch
- branch of the repository
-
findByVcsLocationIdOrderBySpecsExecutionDate
@NotNull public @NotNull List<VcsLocationBambooSpecsState> findByVcsLocationIdOrderBySpecsExecutionDate(long repositoryId, @NotNull @NotNull String branch, int limit)
Description copied from interface:BambooSpecsStateDao
Get latestlimit
specs state for given repository and its branch- Specified by:
findByVcsLocationIdOrderBySpecsExecutionDate
in interfaceBambooSpecsStateDao
- Parameters:
repositoryId
- id of the repositorybranch
- branch of the repositorylimit
- search limit
-
delete
public void delete(VcsLocationBambooSpecsState specsState)
- Specified by:
delete
in interfaceBambooSpecsStateDao
-
countStatesByRepositoryId
public long countStatesByRepositoryId(long repositoryId)
- Specified by:
countStatesByRepositoryId
in interfaceBambooSpecsStateDao
-
getUnfinishedSpecsScans
@NotNull public @NotNull List<VcsLocationBambooSpecsState> getUnfinishedSpecsScans()
- Specified by:
getUnfinishedSpecsScans
in interfaceBambooSpecsStateDao
-
findSpecsBranches
@NotNull public @NotNull List<String> findSpecsBranches(long rootVcsRepositoryId)
Description copied from interface:BambooSpecsStateDao
Get all branches fromVcsLocationBambooSpecsState
for given repository- Specified by:
findSpecsBranches
in interfaceBambooSpecsStateDao
-
findSpecsBranches
@NotNull public @NotNull List<String> findSpecsBranches(long rootVcsRepositoryId, @NotNull @NotNull String searchTerm)
Description copied from interface:BambooSpecsStateDao
Get all branches fromVcsLocationBambooSpecsState
for given repository that match the search term- Specified by:
findSpecsBranches
in interfaceBambooSpecsStateDao
-
otherSuccessfullySpecsImportExistsForRevision
public boolean otherSuccessfullySpecsImportExistsForRevision(long rootVcsRepositoryId, @NotNull @NotNull String revision, long specsStateId)
Description copied from interface:BambooSpecsStateDao
Check if for given repository and revision specs import has ended successfully for other Specs state than one with specsStateId- Specified by:
otherSuccessfullySpecsImportExistsForRevision
in interfaceBambooSpecsStateDao
specsStateId
- current specsStateId- Returns:
-
-