com.atlassian.bamboo.deployments.versions.persistence.commits
Class DeploymentVersionVcsChangesetDaoImpl

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
              extended by 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
DeploymentVersionVcsChangesetDaoImpl()
           
 
Method Summary
 int delete(DeploymentVersionDeletionAdapter deletionAdapter)
          Delete - DEPLOYMENT_VERSION_CHANGESET (manual, JDBC) - DEPLOYMENT_VERSION_COMMIT (manual, JDBC)
 void delete(MutableDeploymentVersionVcsChangeset deploymentVersion)
           
 java.util.List<MutableDeploymentVersionVcsChangeset> getChangesetsForDeploymentVersion(long deploymentVersionId)
           
 java.lang.Long getRepositoryDataIdForChangeset(long changesetId)
           
 long getSkippedCommitsCountForVersion(long deploymentVersionId)
           
 void save(MutableDeploymentVersionVcsChangeset deploymentVersion)
          MutableDeploymentVersionVcsCommit members of MutableDeploymentVersionVcsChangeset.getCommits() ()} are persisted in a cascade
 void saveAll(java.util.Collection<MutableDeploymentVersionVcsChangeset> changesets)
           
 
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentVersionVcsChangesetDaoImpl

public DeploymentVersionVcsChangesetDaoImpl()
Method Detail

save

public void save(@NotNull
                 MutableDeploymentVersionVcsChangeset deploymentVersion)
MutableDeploymentVersionVcsCommit members of MutableDeploymentVersionVcsChangeset.getCommits() ()} are persisted in a cascade

Specified by:
save in interface DeploymentVersionVcsChangesetDao
Parameters:
deploymentVersion - MutableDeploymentVersion to be persisted

saveAll

public void saveAll(@NotNull
                    java.util.Collection<MutableDeploymentVersionVcsChangeset> changesets)
Specified by:
saveAll in interface DeploymentVersionVcsChangesetDao

delete

public void delete(MutableDeploymentVersionVcsChangeset deploymentVersion)
Specified by:
delete in interface DeploymentVersionVcsChangesetDao

delete

public int delete(@NotNull
                  DeploymentVersionDeletionAdapter deletionAdapter)
Delete - DEPLOYMENT_VERSION_CHANGESET (manual, JDBC) - DEPLOYMENT_VERSION_COMMIT (manual, JDBC)

Specified by:
delete in interface DeploymentVersionVcsChangesetDao
Parameters:
deletionAdapter - DeletionSQLAdapter.getInClause() should provide range of DeploymentVersions
Returns:
number of deleted records

getChangesetsForDeploymentVersion

public java.util.List<MutableDeploymentVersionVcsChangeset> getChangesetsForDeploymentVersion(long deploymentVersionId)
Specified by:
getChangesetsForDeploymentVersion in interface DeploymentVersionVcsChangesetDao
Returns:
all changesets associated with a DeploymentVersion

getRepositoryDataIdForChangeset

@Nullable
public java.lang.Long getRepositoryDataIdForChangeset(long changesetId)
Specified by:
getRepositoryDataIdForChangeset in interface DeploymentVersionVcsChangesetDao
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 interface DeploymentVersionVcsChangesetDao
Returns:
sum of skippedCommitCounts across all DeploymentVersionVcsChangeset associated with a DeploymentVersion


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.