public class DeploymentResultDaoImpl extends StatelessSessionHibernateDaoSupport implements DeploymentResultDao
| Constructor and Description |
|---|
DeploymentResultDaoImpl(TransactionAndHibernateTemplate transactionTemplate) |
| Modifier and Type | Method and Description |
|---|---|
int |
countDeploymentResultsForEnvironment(long environmentId)
Count deployment results for deployment.
|
int |
delete(@NotNull DeploymentResultDeletionAdapter deletionAdapter)
Delete
- DEPLOYMENT_RESULT_CUSTOMDATA (manual, JDBC)
- DEPLOYMENT_RESULT (manual, JDBC)
- WEBHOOK_RESPONSE (manual, JDBC)
|
int |
delete(@NotNull EnvironmentDeletionAdapter environmentDeletionAdapter)
Delete
- DEPLOYMENT_RESULT_CUSTOMDATA (manual, JDBC)
- DEPLOYMENT_RESULT (manual, JDBC)
- WEBHOOK_RESPONSE (manual, JDBC)
|
void |
delete(MutableDeploymentResult deploymentResult)
Delete Deployment Result.
|
@NotNull Set<Long> |
findEnvironmentIdsVersionWasDeployedOn(long deploymentVersionId) |
@Nullable MutableDeploymentResult |
getDeploymentResult(long deploymentResultId)
Get DeploymentResult by id
|
@NotNull List<Long> |
getDeploymentResultIdsForDeploymentVersionFinishedBefore(long deploymentVersionId,
@NotNull Date finishDate)
Get a list of result ids for a DeploymentVersion.
|
@NotNull List<MutableDeploymentResult> |
getDeploymentResults(long environmentId,
long deploymentVersionId)
Retrieve all deployment results that exist for an environment and version.
|
@NotNull List<MutableDeploymentResult> |
getDeploymentResultsByLifeCycleState(Collection<LifeCycleState> lifeCycleStates) |
@NotNull List<DeploymentResultDto> |
getDeploymentResultsDtosForEnvironment(long environmentId,
int offset,
int maxResults)
Get the latest deployment results for an Environment, limited to requested amount starting from requested start index.
|
@NotNull List<MutableDeploymentResult> |
getDeploymentResultsForDeploymentVersion(long deploymentVersionId)
Get a list of DeploymentResults for a DeploymentVersion.
|
@NotNull List<MutableDeploymentResult> |
getDeploymentResultsForDeploymentVersionFinishedBefore(long deploymentVersionId,
Date finishedDate)
Get a list of DeploymentResults for a DeploymentVersion.
|
@NotNull List<MutableDeploymentResult> |
getDeploymentResultsForEnvironment(long environmentId)
Get a list of DeploymentResults for a Environment
WARNING: This method will fetch all results, potentially creating performance problem.
|
@NotNull List<MutableDeploymentResult> |
getDeploymentResultsForEnvironment(long environmentId,
int offset,
int maxResults)
Get a list of DeploymentResults for a Environment
|
@Nullable MutableDeploymentResult |
getLastResultBefore(@NotNull DeploymentResult deploymentResult) |
@Nullable MutableDeploymentResult |
getLastResultInStatesBefore(@NotNull DeploymentResult deploymentResult,
@NotNull EnumSet<BuildState> buildStates) |
@Nullable MutableDeploymentResult |
getLatestDeploymentResult(long environmentId,
long deploymentVersionId)
Retrieve the latest deployment result that exists for a version on an environment.
|
@Nullable 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.
|
@NotNull 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.
|
Collection<DeploymentResultDto> |
getLatestDeploymentResultsForEnvironments(@NotNull List<Long> environmentIds)
Retrieve the latest deployment result for deployment environments.
|
@Nullable DeploymentResultDto |
getLatestKnownDeploymentResultDtoForEnvironment(long environmentId)
Get the latest result that *actually* ran against an environments.
|
@Nullable MutableDeploymentResult |
getLatestKnownDeploymentResultForEnvironment(long environmentId)
Get the latest result that *actually* ran against an environments.
|
@Nullable MutableDeploymentResult |
getRollbackDeploymentResultBeforeStartedDate(@NotNull DeploymentResult deploymentResult)
Find the result successfully deployed on same environment before given deployment result coming from different deployment version
|
@Nullable MutableDeploymentResult |
getRollbackDeploymentResultForEnvironment(long environmentId,
long latestVersionId)
Find the result that you are trying to replicate by doing a rollback.
|
@NotNull List<MutableDeploymentResult> |
getSuccessfulDeploymentResultsForEnvironment(long environmentId,
int offset,
int maxResults)
Get a list of DeploymentResults successfully deployed to an Environment
|
long |
iterateResultsForExport(@NotNull Consumer<MutableDeploymentResult> consumer)
Iterate through and execute function for each of MutableDeploymentResult
|
void |
save(MutableDeploymentResult deploymentResult)
Save DeploymentResult
|
int |
unlinkFromVersion(@NotNull DeploymentVersionDeletionAdapter deletionAdapter)
Unlink DeploymentResults records limited by
DeletionSQLAdapter.getInClause() from deployment version. |
void |
updateVersionName(long deploymentVersionId,
@NotNull String newVersionName)
Updates version name in all results related to a vesion
|
getCacheAwareHibernateTemplatepublic DeploymentResultDaoImpl(TransactionAndHibernateTemplate transactionTemplate)
@Nullable public @Nullable MutableDeploymentResult getDeploymentResult(long deploymentResultId)
DeploymentResultDaogetDeploymentResult in interface DeploymentResultDao@NotNull public @NotNull List<MutableDeploymentResult> getDeploymentResultsByLifeCycleState(Collection<LifeCycleState> lifeCycleStates)
getDeploymentResultsByLifeCycleState in interface DeploymentResultDaopublic void save(MutableDeploymentResult deploymentResult)
DeploymentResultDaosave in interface DeploymentResultDao@NotNull public @NotNull List<MutableDeploymentResult> getDeploymentResultsForEnvironment(long environmentId)
DeploymentResultDaogetDeploymentResultsForEnvironment in interface DeploymentResultDaoenvironmentId - id of Environment@NotNull public @NotNull List<MutableDeploymentResult> getDeploymentResultsForEnvironment(long environmentId, int offset, int maxResults)
DeploymentResultDaogetDeploymentResultsForEnvironment in interface DeploymentResultDaoenvironmentId - id of Environment@NotNull public @NotNull List<DeploymentResultDto> getDeploymentResultsDtosForEnvironment(long environmentId, int offset, int maxResults)
DeploymentResultDaogetDeploymentResultsDtosForEnvironment in interface DeploymentResultDao@NotNull public @NotNull List<MutableDeploymentResult> getSuccessfulDeploymentResultsForEnvironment(long environmentId, int offset, int maxResults)
DeploymentResultDaogetSuccessfulDeploymentResultsForEnvironment in interface DeploymentResultDaoenvironmentId - id of Environmentpublic int countDeploymentResultsForEnvironment(long environmentId)
DeploymentResultDaocountDeploymentResultsForEnvironment in interface DeploymentResultDao@NotNull public @NotNull List<MutableDeploymentResult> getLatestDeploymentResultsForEnvironment(long environmentId, int startIndex, int maxResults)
DeploymentResultDaogetLatestDeploymentResultsForEnvironment in interface DeploymentResultDaoenvironmentId - 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 public @NotNull List<MutableDeploymentResult> getDeploymentResultsForDeploymentVersion(long deploymentVersionId)
DeploymentResultDaogetDeploymentResultsForDeploymentVersion in interface DeploymentResultDaodeploymentVersionId - id of DeploymentVersion@NotNull public @NotNull List<MutableDeploymentResult> getDeploymentResultsForDeploymentVersionFinishedBefore(long deploymentVersionId, Date finishedDate)
DeploymentResultDaogetDeploymentResultsForDeploymentVersionFinishedBefore in interface DeploymentResultDaodeploymentVersionId - id of DeploymentVersionfinishedDate - only select results finished before this date@NotNull public @NotNull List<Long> getDeploymentResultIdsForDeploymentVersionFinishedBefore(long deploymentVersionId, @NotNull @NotNull Date finishDate)
DeploymentResultDaogetDeploymentResultIdsForDeploymentVersionFinishedBefore in interface DeploymentResultDaodeploymentVersionId - id of DeploymentVersionfinishDate - only select results finished before this date@NotNull public @NotNull List<MutableDeploymentResult> getDeploymentResults(long environmentId, long deploymentVersionId)
DeploymentResultDaogetDeploymentResults in interface DeploymentResultDaoenvironmentId - of the environmentdeploymentVersionId - of the version@Nullable public @Nullable MutableDeploymentResult getLatestDeploymentResult(long environmentId, long deploymentVersionId)
DeploymentResultDaogetLatestDeploymentResult in interface DeploymentResultDaoenvironmentId - of the environmentdeploymentVersionId - of the version@Nullable public @Nullable MutableDeploymentResult getLatestDeploymentResultForEnvironment(long environmentId)
DeploymentResultDaogetLatestDeploymentResultForEnvironment in interface DeploymentResultDaoenvironmentId - id of the environment@Nullable public @Nullable MutableDeploymentResult getLatestKnownDeploymentResultForEnvironment(long environmentId)
DeploymentResultDaoDeploymentResultDao.getLatestKnownDeploymentResultDtoForEnvironment(long), which scales better.getLatestKnownDeploymentResultForEnvironment in interface DeploymentResultDaoenvironmentId - id of the environment@Nullable public @Nullable DeploymentResultDto getLatestKnownDeploymentResultDtoForEnvironment(long environmentId)
DeploymentResultDaoDeploymentResultDao.getLatestKnownDeploymentResultForEnvironment(long)getLatestKnownDeploymentResultDtoForEnvironment in interface DeploymentResultDaoenvironmentId - id of the environment@Nullable public @Nullable MutableDeploymentResult getRollbackDeploymentResultForEnvironment(long environmentId, long latestVersionId)
DeploymentResultDaogetRollbackDeploymentResultForEnvironment in interface DeploymentResultDaoenvironmentId - if the environment to find rollback forlatestVersionId - id of the version currently on the environment@Nullable public @Nullable MutableDeploymentResult getRollbackDeploymentResultBeforeStartedDate(@NotNull @NotNull DeploymentResult deploymentResult)
DeploymentResultDaogetRollbackDeploymentResultBeforeStartedDate in interface DeploymentResultDaopublic void delete(MutableDeploymentResult deploymentResult)
DeploymentResultDaodelete in interface DeploymentResultDaodeploymentResult - to be deletedpublic int delete(@NotNull
@NotNull DeploymentResultDeletionAdapter deletionAdapter)
delete in interface DeploymentResultDaodeletionAdapter - DeletionSQLAdapter.getInClause() should provide range of DeploymentResultspublic int delete(@NotNull
@NotNull EnvironmentDeletionAdapter environmentDeletionAdapter)
delete in interface DeploymentResultDaoenvironmentDeletionAdapter - EnvironmentDeletionAdapter should provide range of DeploymentResultspublic int unlinkFromVersion(@NotNull
@NotNull DeploymentVersionDeletionAdapter deletionAdapter)
DeploymentResultDaoDeletionSQLAdapter.getInClause() from deployment version.
Unlinking is performed using UPDATE queriesunlinkFromVersion in interface DeploymentResultDaodeletionAdapter - DeletionSQLAdapter.getInClause() should provide range of DeploymentVersions to unlink frompublic long iterateResultsForExport(@NotNull
@NotNull Consumer<MutableDeploymentResult> consumer)
DeploymentResultDaoiterateResultsForExport in interface DeploymentResultDaoconsumer - consumer to accept each of the MutableDeploymentResult@NotNull public @NotNull Set<Long> findEnvironmentIdsVersionWasDeployedOn(long deploymentVersionId)
findEnvironmentIdsVersionWasDeployedOn in interface DeploymentResultDao@Nullable public @Nullable MutableDeploymentResult getLastResultBefore(@NotNull @NotNull DeploymentResult deploymentResult)
getLastResultBefore in interface DeploymentResultDao@Nullable public @Nullable MutableDeploymentResult getLastResultInStatesBefore(@NotNull @NotNull DeploymentResult deploymentResult, @NotNull @NotNull EnumSet<BuildState> buildStates)
getLastResultInStatesBefore in interface DeploymentResultDaopublic void updateVersionName(long deploymentVersionId,
@NotNull
@NotNull String newVersionName)
DeploymentResultDaoupdateVersionName in interface DeploymentResultDaopublic Collection<DeploymentResultDto> getLatestDeploymentResultsForAllEnvironments()
DeploymentResultDaogetLatestDeploymentResultsForAllEnvironments in interface DeploymentResultDaopublic Collection<DeploymentResultDto> getLatestDeploymentResultsForEnvironments(@NotNull @NotNull List<Long> environmentIds)
DeploymentResultDaogetLatestDeploymentResultsForEnvironments in interface DeploymentResultDaoCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.