com.atlassian.bamboo.deployments.repository.persistence
Class EnvironmentRepositoryLinkHibernateDao

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.persistence3.BambooHibernateObjectDao<EnvironmentRepositoryLink>
                  extended by com.atlassian.bamboo.deployments.repository.persistence.EnvironmentRepositoryLinkHibernateDao
All Implemented Interfaces:
EnvironmentRepositoryLinkDao, BambooObjectDao<EnvironmentRepositoryLink>, org.springframework.beans.factory.InitializingBean

public class EnvironmentRepositoryLinkHibernateDao
extends BambooHibernateObjectDao<EnvironmentRepositoryLink>
implements EnvironmentRepositoryLinkDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
EnvironmentRepositoryLinkHibernateDao()
           
 
Method Summary
 void detachAllRepositoriesFromEnvironment(EnvironmentDeletionAdapter deletionAdapter)
          Remove all PlanRepositoryLink defined for the Environment.
 void detachAllRepositoriesFromEnvironment(InternalEnvironment environment)
          Remove all PlanRepositoryLink defined for the Environment.
 EnvironmentRepositoryLink getEnvironmentRepositoryLink(InternalEnvironment environment, long repositoryId)
           
 java.util.List<EnvironmentRepositoryLink> getEnvironmentRepositoryLinks(InternalEnvironment environment)
           
 java.util.List<EnvironmentRepositoryLink> getEnvironmentsUsingRepository(long repositoryId)
           
 void removeRepositoryFromEnvironment(EnvironmentRepositoryLink environmentRepositoryLink)
          Remove single PlanRepositoryLink.
 
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
delete, deleteAll, execute, executeCountQuery, executeFind, executeReturnLong, findAll, findById, save, saveAll
 
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
 
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
delete, deleteAll, executeReturnLong, findAll, findById, save, saveAll
 

Constructor Detail

EnvironmentRepositoryLinkHibernateDao

public EnvironmentRepositoryLinkHibernateDao()
Method Detail

getEnvironmentRepositoryLinks

@NotNull
public java.util.List<EnvironmentRepositoryLink> getEnvironmentRepositoryLinks(@NotNull
                                                                                       InternalEnvironment environment)
Specified by:
getEnvironmentRepositoryLinks in interface EnvironmentRepositoryLinkDao
Returns:
list of Source Repository relationships defined for the Environment sorted by EnvironmentRepositoryLink.getPosition()

getEnvironmentRepositoryLink

@Nullable
public EnvironmentRepositoryLink getEnvironmentRepositoryLink(@NotNull
                                                                       InternalEnvironment environment,
                                                                       long repositoryId)
Specified by:
getEnvironmentRepositoryLink in interface EnvironmentRepositoryLinkDao
Returns:
relationship between entity and repository if it exists, null otherwise

detachAllRepositoriesFromEnvironment

public void detachAllRepositoriesFromEnvironment(@NotNull
                                                 InternalEnvironment environment)
Description copied from interface: EnvironmentRepositoryLinkDao
Remove all PlanRepositoryLink defined for the Environment. Does not delete RepositoryDataEntity objects.

Specified by:
detachAllRepositoriesFromEnvironment in interface EnvironmentRepositoryLinkDao

detachAllRepositoriesFromEnvironment

public void detachAllRepositoriesFromEnvironment(@NotNull
                                                 EnvironmentDeletionAdapter deletionAdapter)
Description copied from interface: EnvironmentRepositoryLinkDao
Remove all PlanRepositoryLink defined for the Environment. Does not delete RepositoryDataEntity objects.

Specified by:
detachAllRepositoriesFromEnvironment in interface EnvironmentRepositoryLinkDao

removeRepositoryFromEnvironment

public void removeRepositoryFromEnvironment(@NotNull
                                            EnvironmentRepositoryLink environmentRepositoryLink)
Description copied from interface: EnvironmentRepositoryLinkDao
Remove single PlanRepositoryLink. Does not delete RepositoryDataEntity

Specified by:
removeRepositoryFromEnvironment in interface EnvironmentRepositoryLinkDao

getEnvironmentsUsingRepository

public java.util.List<EnvironmentRepositoryLink> getEnvironmentsUsingRepository(long repositoryId)
Specified by:
getEnvironmentsUsingRepository in interface EnvironmentRepositoryLinkDao
Returns:
list of Environment that reference a Source Repository


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