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
-
-
Constructor Summary
Constructors Constructor Description DeploymentVersionVcsChangesetDaoImpl(TransactionAndHibernateTemplate transactionTemplate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
delete(@NotNull DeploymentVersionDeletionAdapter deletionAdapter)
Delete - DEPLOYMENT_VERSION_CHANGESET (manual, JDBC) - DEPLOYMENT_VERSION_COMMIT (manual, JDBC)void
delete(MutableDeploymentVersionVcsChangeset deploymentVersion)
List<MutableDeploymentVersionVcsChangeset>
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
-
-
-
-
Constructor Detail
-
DeploymentVersionVcsChangesetDaoImpl
public DeploymentVersionVcsChangesetDaoImpl(TransactionAndHibernateTemplate transactionTemplate)
-
-
Method Detail
-
save
public void save(@NotNull @NotNull MutableDeploymentVersionVcsChangeset deploymentVersion)
MutableDeploymentVersionVcsCommit members ofMutableDeploymentVersionVcsChangeset.getCommits()
()} are persisted in a cascade- Specified by:
save
in interfaceDeploymentVersionVcsChangesetDao
- Parameters:
deploymentVersion
- MutableDeploymentVersion to be persisted
-
saveAll
public void saveAll(@NotNull @NotNull Collection<MutableDeploymentVersionVcsChangeset> changesets)
- Specified by:
saveAll
in interfaceDeploymentVersionVcsChangesetDao
-
delete
public void delete(MutableDeploymentVersionVcsChangeset deploymentVersion)
- Specified by:
delete
in interfaceDeploymentVersionVcsChangesetDao
-
delete
public int delete(@NotNull @NotNull DeploymentVersionDeletionAdapter deletionAdapter)
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
@Nullable public @Nullable Long getRepositoryDataIdForChangeset(long changesetId)
- 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
-
-