public interface DeploymentResultDao
Modifier and Type | Method and Description |
---|---|
int |
countDeploymentResultsForEnvironment(long environmentId)
Count deployment results for deployment.
|
int |
delete(DeploymentResultDeletionAdapter deletionAdapter)
Delete DeploymentResults records limited by
DeletionSQLAdapter.getInClause() . |
int |
delete(EnvironmentDeletionAdapter environmentDeletionAdapter)
Delete DeploymentResults records limited by
EnvironmentDeletionAdapter . |
void |
delete(MutableDeploymentResult deploymentResult)
Delete Deployment Result.
|
Set<Long> |
findEnvironmentIdsVersionWasDeployedOn(long deploymentVersionId) |
MutableDeploymentResult |
getDeploymentResult(long deploymentResultId)
Get DeploymentResult by id
|
List<Long> |
getDeploymentResultIdsForDeploymentVersionFinishedBefore(long deploymentVersionId,
Date finishDate)
Get a list of result ids for a DeploymentVersion.
|
List<MutableDeploymentResult> |
getDeploymentResults(long environmentId,
long deploymentVersionId)
Retrieve all deployment results that exist for an environment and version.
|
List<MutableDeploymentResult> |
getDeploymentResultsByLifeCycleState(Collection<LifeCycleState> lifeCycleStates) |
List<MutableDeploymentResult> |
getDeploymentResultsForDeploymentVersion(long deploymentVersionId)
Get a list of DeploymentResults for a DeploymentVersion.
|
List<MutableDeploymentResult> |
getDeploymentResultsForDeploymentVersionFinishedBefore(long deploymentVersionId,
Date finishDate)
Deprecated.
since 5.10 avoid due to performance
|
List<MutableDeploymentResult> |
getDeploymentResultsForEnvironment(long environmentId)
Get a list of DeploymentResults for a Environment
WARNING: This method will fetch all results, potentially creating performance problem.
|
List<MutableDeploymentResult> |
getDeploymentResultsForEnvironment(long environmentId,
int offset,
int maxResults)
Get a list of DeploymentResults for a Environment
|
MutableDeploymentResult |
getLastResultBefore(DeploymentResult deploymentResult) |
MutableDeploymentResult |
getLastResultInStatesBefore(DeploymentResult deploymentResult,
EnumSet<BuildState> buildStates) |
MutableDeploymentResult |
getLatestDeploymentResult(long environmentId,
long deploymentVersionId)
Retrieve the latest deployment result that exists for a version on an environment.
|
MutableDeploymentResult |
getLatestDeploymentResultForEnvironment(long environmentId)
Get the latest result that ran against an environment
|
Collection<DeploymentResultDto> |
getLatestDeploymentResultsForAllEnvironments()
Retrieve the latest deployment result for every deployment environment.
|
List<MutableDeploymentResult> |
getLatestDeploymentResultsForEnvironment(long environmentId,
int startIndex,
int maxResults)
Get the latest deployment results for an Environment, limited to requested amount starting from requested start index.
|
MutableDeploymentResult |
getLatestKnownDeploymentResultForEnvironment(long environmentId)
Get the latest result that *actually* ran against an environments.
|
MutableDeploymentResult |
getRollbackDeploymentResultBeforeStartedDate(DeploymentResult deploymentResult)
Find the result successfully deployed on same environment before given deployment result coming from different deployment version
|
MutableDeploymentResult |
getRollbackDeploymentResultForEnvironment(long environmentId,
long latestVersionId)
Find the result that you are trying to replicate by doing a rollback.
|
List<MutableDeploymentResult> |
getSuccessfulDeploymentResultsForEnvironment(long environmentId,
int offset,
int maxResults)
Get a list of DeploymentResults successfully deployed to an Environment
|
long |
iterateResultsForExport(Consumer<MutableDeploymentResult> consumer)
Iterate through and execute function for each of MutableDeploymentResult
|
void |
save(MutableDeploymentResult deploymentResult)
Save DeploymentResult
|
int |
unlinkFromVersion(DeploymentVersionDeletionAdapter deletionAdapter)
Unlink DeploymentResults records limited by
DeletionSQLAdapter.getInClause() from deployment version. |
void |
updateVersionName(long deploymentVersionId,
String newVersionName)
Updates version name in all results related to a vesion
|
@Nullable MutableDeploymentResult getDeploymentResult(long deploymentResultId)
@NotNull List<MutableDeploymentResult> getDeploymentResultsByLifeCycleState(Collection<LifeCycleState> lifeCycleStates)
void save(MutableDeploymentResult deploymentResult)
@NotNull List<MutableDeploymentResult> getDeploymentResultsForEnvironment(long environmentId)
environmentId
- id of Environment@NotNull List<MutableDeploymentResult> getDeploymentResultsForEnvironment(long environmentId, int offset, int maxResults)
environmentId
- id of Environmentoffset
- maxResults
- @NotNull List<MutableDeploymentResult> getSuccessfulDeploymentResultsForEnvironment(long environmentId, int offset, int maxResults)
environmentId
- id of Environmentoffset
- maxResults
- int countDeploymentResultsForEnvironment(long environmentId)
environmentId
- @NotNull List<MutableDeploymentResult> getLatestDeploymentResultsForEnvironment(long environmentId, int startIndex, int maxResults)
environmentId
- of the environmentstartIndex
- the index to which start. Latest deployment is at index 0; (ignored if below zero)maxResults
- how many results to retrieve, (ignored if equal to or below zero)@NotNull List<MutableDeploymentResult> getDeploymentResultsForDeploymentVersion(long deploymentVersionId)
deploymentVersionId
- id of DeploymentVersion@NotNull @Deprecated List<MutableDeploymentResult> getDeploymentResultsForDeploymentVersionFinishedBefore(long deploymentVersionId, Date finishDate)
deploymentVersionId
- id of DeploymentVersionfinishDate
- only select results finished before this date@NotNull List<Long> getDeploymentResultIdsForDeploymentVersionFinishedBefore(long deploymentVersionId, @NotNull Date finishDate)
getDeploymentResultIdsForDeploymentVersionFinishedBefore(long, Date)
instead.deploymentVersionId
- id of DeploymentVersionfinishDate
- only select results finished before this date@NotNull List<MutableDeploymentResult> getDeploymentResults(long environmentId, long deploymentVersionId)
environmentId
- of the environmentdeploymentVersionId
- of the version@Nullable MutableDeploymentResult getLatestDeploymentResult(long environmentId, long deploymentVersionId)
environmentId
- of the environmentdeploymentVersionId
- of the version@Nullable MutableDeploymentResult getLatestDeploymentResultForEnvironment(long environmentId)
environmentId
- id of the environmentMutableDeploymentResult getLatestKnownDeploymentResultForEnvironment(long environmentId)
environmentId
- id of the environmentvoid delete(MutableDeploymentResult deploymentResult)
deploymentResult
- to be deletedint delete(@NotNull DeploymentResultDeletionAdapter deletionAdapter)
DeletionSQLAdapter.getInClause()
.
This will only attempt to remove DeploymentResults and data that is normally cascaded by Hibernate. For complete DeploymentResult
deletion please see DeploymentResultDeletionService.delete(long)
.
Deletion is performed using DELETE queries.deletionAdapter
- DeletionSQLAdapter.getInClause()
should provide range of DeploymentResultsint delete(@NotNull EnvironmentDeletionAdapter environmentDeletionAdapter)
EnvironmentDeletionAdapter
.
This will only attempt to remove DeploymentResults and data that is normally cascaded by Hibernate. For complete DeploymentResult
deletion please see DeploymentResultDeletionService.delete(long)
.
Deletion is performed using DELETE queries.environmentDeletionAdapter
- EnvironmentDeletionAdapter
should provide range of DeploymentResultsint unlinkFromVersion(@NotNull DeploymentVersionDeletionAdapter deletionAdapter)
DeletionSQLAdapter.getInClause()
from deployment version.
Unlinking is performed using UPDATE queriesdeletionAdapter
- DeletionSQLAdapter.getInClause()
should provide range of DeploymentVersions to unlink fromlong iterateResultsForExport(@NotNull Consumer<MutableDeploymentResult> consumer)
consumer
- consumer to accept each of the MutableDeploymentResult@Nullable MutableDeploymentResult getRollbackDeploymentResultForEnvironment(long environmentId, long latestVersionId)
environmentId
- if the environment to find rollback forlatestVersionId
- id of the version currently on the environment@Nullable MutableDeploymentResult getRollbackDeploymentResultBeforeStartedDate(@NotNull DeploymentResult deploymentResult)
deploymentResult
- @NotNull Set<Long> findEnvironmentIdsVersionWasDeployedOn(long deploymentVersionId)
deploymentVersionId
- @Nullable MutableDeploymentResult getLastResultBefore(@NotNull DeploymentResult deploymentResult)
@Nullable MutableDeploymentResult getLastResultInStatesBefore(@NotNull DeploymentResult deploymentResult, @NotNull EnumSet<BuildState> buildStates)
void updateVersionName(long deploymentVersionId, @NotNull String newVersionName)
deploymentVersionId
- newVersionName
- Collection<DeploymentResultDto> getLatestDeploymentResultsForAllEnvironments()
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.