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(DeploymentResultDeletionAdapter deletionAdapter)
Delete
- DEPLOYMENT_RESULT_CUSTOMDATA (manual, JDBC)
- DEPLOYMENT_RESULT (manual, JDBC)
- WEBHOOK_RESPONSE (manual, JDBC)
|
int |
delete(EnvironmentDeletionAdapter environmentDeletionAdapter)
Delete
- DEPLOYMENT_RESULT_CUSTOMDATA (manual, JDBC)
- DEPLOYMENT_RESULT (manual, JDBC)
- WEBHOOK_RESPONSE (manual, JDBC)
|
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<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.
|
List<MutableDeploymentResult> |
getDeploymentResultsForDeploymentVersion(long deploymentVersionId)
Get a list of DeploymentResults for a DeploymentVersion.
|
List<MutableDeploymentResult> |
getDeploymentResultsForDeploymentVersionFinishedBefore(long deploymentVersionId,
Date finishedDate)
Get a list of DeploymentResults for a DeploymentVersion.
|
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.
|
Collection<DeploymentResultDto> |
getLatestDeploymentResultsForEnvironments(List<Long> environmentIds)
Retrieve the latest deployment result for deployment environments.
|
DeploymentResultDto |
getLatestKnownDeploymentResultDtoForEnvironment(long environmentId)
Get the latest result that *actually* ran against an environments.
|
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
|
getCacheAwareHibernateTemplatepublic DeploymentResultDaoImpl(TransactionAndHibernateTemplate transactionTemplate)
@Nullable public MutableDeploymentResult getDeploymentResult(long deploymentResultId)
DeploymentResultDaogetDeploymentResult in interface DeploymentResultDao@NotNull public List<MutableDeploymentResult> getDeploymentResultsByLifeCycleState(Collection<LifeCycleState> lifeCycleStates)
getDeploymentResultsByLifeCycleState in interface DeploymentResultDaopublic void save(MutableDeploymentResult deploymentResult)
DeploymentResultDaosave in interface DeploymentResultDao@NotNull public List<MutableDeploymentResult> getDeploymentResultsForEnvironment(long environmentId)
DeploymentResultDaogetDeploymentResultsForEnvironment in interface DeploymentResultDaoenvironmentId - id of Environment@NotNull public List<MutableDeploymentResult> getDeploymentResultsForEnvironment(long environmentId, int offset, int maxResults)
DeploymentResultDaogetDeploymentResultsForEnvironment in interface DeploymentResultDaoenvironmentId - id of Environment@NotNull public List<DeploymentResultDto> getDeploymentResultsDtosForEnvironment(long environmentId, int offset, int maxResults)
DeploymentResultDaogetDeploymentResultsDtosForEnvironment in interface DeploymentResultDao@NotNull public 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 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 List<MutableDeploymentResult> getDeploymentResultsForDeploymentVersion(long deploymentVersionId)
DeploymentResultDaogetDeploymentResultsForDeploymentVersion in interface DeploymentResultDaodeploymentVersionId - id of DeploymentVersion@NotNull public List<MutableDeploymentResult> getDeploymentResultsForDeploymentVersionFinishedBefore(long deploymentVersionId, Date finishedDate)
DeploymentResultDaogetDeploymentResultsForDeploymentVersionFinishedBefore in interface DeploymentResultDaodeploymentVersionId - id of DeploymentVersionfinishedDate - only select results finished before this date@NotNull public List<Long> getDeploymentResultIdsForDeploymentVersionFinishedBefore(long deploymentVersionId, @NotNull Date finishDate)
DeploymentResultDaogetDeploymentResultIdsForDeploymentVersionFinishedBefore in interface DeploymentResultDaodeploymentVersionId - id of DeploymentVersionfinishDate - only select results finished before this date@NotNull public List<MutableDeploymentResult> getDeploymentResults(long environmentId, long deploymentVersionId)
DeploymentResultDaogetDeploymentResults in interface DeploymentResultDaoenvironmentId - of the environmentdeploymentVersionId - of the version@Nullable public MutableDeploymentResult getLatestDeploymentResult(long environmentId, long deploymentVersionId)
DeploymentResultDaogetLatestDeploymentResult in interface DeploymentResultDaoenvironmentId - of the environmentdeploymentVersionId - of the version@Nullable public MutableDeploymentResult getLatestDeploymentResultForEnvironment(long environmentId)
DeploymentResultDaogetLatestDeploymentResultForEnvironment in interface DeploymentResultDaoenvironmentId - id of the environment@Nullable public MutableDeploymentResult getLatestKnownDeploymentResultForEnvironment(long environmentId)
DeploymentResultDaoDeploymentResultDao.getLatestKnownDeploymentResultDtoForEnvironment(long), which scales better.getLatestKnownDeploymentResultForEnvironment in interface DeploymentResultDaoenvironmentId - id of the environment@Nullable public DeploymentResultDto getLatestKnownDeploymentResultDtoForEnvironment(long environmentId)
DeploymentResultDaoDeploymentResultDao.getLatestKnownDeploymentResultForEnvironment(long)getLatestKnownDeploymentResultDtoForEnvironment in interface DeploymentResultDaoenvironmentId - id of the environment@Nullable public 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 MutableDeploymentResult getRollbackDeploymentResultBeforeStartedDate(@NotNull DeploymentResult deploymentResult)
DeploymentResultDaogetRollbackDeploymentResultBeforeStartedDate in interface DeploymentResultDaopublic void delete(MutableDeploymentResult deploymentResult)
DeploymentResultDaodelete in interface DeploymentResultDaodeploymentResult - to be deletedpublic int delete(@NotNull
DeploymentResultDeletionAdapter deletionAdapter)
delete in interface DeploymentResultDaodeletionAdapter - DeletionSQLAdapter.getInClause() should provide range of DeploymentResultspublic int delete(@NotNull
EnvironmentDeletionAdapter environmentDeletionAdapter)
delete in interface DeploymentResultDaoenvironmentDeletionAdapter - EnvironmentDeletionAdapter should provide range of DeploymentResultspublic int unlinkFromVersion(@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
Consumer<MutableDeploymentResult> consumer)
DeploymentResultDaoiterateResultsForExport in interface DeploymentResultDaoconsumer - consumer to accept each of the MutableDeploymentResult@NotNull public Set<Long> findEnvironmentIdsVersionWasDeployedOn(long deploymentVersionId)
findEnvironmentIdsVersionWasDeployedOn in interface DeploymentResultDao@Nullable public MutableDeploymentResult getLastResultBefore(@NotNull DeploymentResult deploymentResult)
getLastResultBefore in interface DeploymentResultDao@Nullable public MutableDeploymentResult getLastResultInStatesBefore(@NotNull DeploymentResult deploymentResult, @NotNull EnumSet<BuildState> buildStates)
getLastResultInStatesBefore in interface DeploymentResultDaopublic void updateVersionName(long deploymentVersionId,
@NotNull
String newVersionName)
DeploymentResultDaoupdateVersionName in interface DeploymentResultDaopublic Collection<DeploymentResultDto> getLatestDeploymentResultsForAllEnvironments()
DeploymentResultDaogetLatestDeploymentResultsForAllEnvironments in interface DeploymentResultDaopublic Collection<DeploymentResultDto> getLatestDeploymentResultsForEnvironments(@NotNull List<Long> environmentIds)
DeploymentResultDaogetLatestDeploymentResultsForEnvironments in interface DeploymentResultDaoCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.