Class DeploymentVersionVcsChangesetDaoImpl
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
com.atlassian.bamboo.deployments.versions.persistence.commits.DeploymentVersionVcsChangesetDaoImpl
- All Implemented Interfaces:
DeploymentVersionVcsChangesetDao
,org.springframework.beans.factory.InitializingBean
public class DeploymentVersionVcsChangesetDaoImpl
extends StatelessSessionHibernateDaoSupport
implements DeploymentVersionVcsChangesetDao
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
-
Constructor Summary
ConstructorDescriptionDeploymentVersionVcsChangesetDaoImpl
(TransactionAndHibernateTemplate transactionTemplate) -
Method Summary
Modifier and TypeMethodDescriptionint
delete
(@NotNull DeploymentVersionDeletionAdapter deletionAdapter) Delete - DEPLOYMENT_VERSION_CHANGESET (manual, JDBC) - DEPLOYMENT_VERSION_COMMIT (manual, JDBC)void
delete
(MutableDeploymentVersionVcsChangeset deploymentVersion) getChangesetsForDeploymentVersion
(long deploymentVersionId) @Nullable Long
getRepositoryDataIdForChangeset
(long changesetId) long
getSkippedCommitsCountForVersion
(long deploymentVersionId) void
save
(@NotNull MutableDeploymentVersionVcsChangeset deploymentVersion) MutableDeploymentVersionVcsCommit members ofMutableDeploymentVersionVcsChangeset.getCommits()
()} are persisted in a cascadevoid
saveAll
(@NotNull Collection<MutableDeploymentVersionVcsChangeset> changesets) Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
Methods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
-
Constructor Details
-
DeploymentVersionVcsChangesetDaoImpl
-
-
Method Details
-
save
MutableDeploymentVersionVcsCommit members ofMutableDeploymentVersionVcsChangeset.getCommits()
()} are persisted in a cascade- Specified by:
save
in interfaceDeploymentVersionVcsChangesetDao
- Parameters:
deploymentVersion
- MutableDeploymentVersion to be persisted
-
saveAll
- Specified by:
saveAll
in interfaceDeploymentVersionVcsChangesetDao
-
delete
- Specified by:
delete
in interfaceDeploymentVersionVcsChangesetDao
-
delete
Delete - DEPLOYMENT_VERSION_CHANGESET (manual, JDBC) - DEPLOYMENT_VERSION_COMMIT (manual, JDBC)- Specified by:
delete
in interfaceDeploymentVersionVcsChangesetDao
- Parameters:
deletionAdapter
-DeletionSQLAdapter.getInClause()
should provide range of DeploymentVersions- Returns:
- number of deleted records
-
getChangesetsForDeploymentVersion
public List<MutableDeploymentVersionVcsChangeset> getChangesetsForDeploymentVersion(long deploymentVersionId) - Specified by:
getChangesetsForDeploymentVersion
in interfaceDeploymentVersionVcsChangesetDao
- Returns:
- all changesets associated with a
DeploymentVersion
-
getRepositoryDataIdForChangeset
- Specified by:
getRepositoryDataIdForChangeset
in interfaceDeploymentVersionVcsChangesetDao
- Returns:
- id repository of
RepositoryDataEntity
associated with this changeset or null if changeset does not exist.
-
getSkippedCommitsCountForVersion
public long getSkippedCommitsCountForVersion(long deploymentVersionId) - Specified by:
getSkippedCommitsCountForVersion
in interfaceDeploymentVersionVcsChangesetDao
- Returns:
- sum of skippedCommitCounts across all
DeploymentVersionVcsChangeset
associated with aDeploymentVersion
-