com.atlassian.bamboo.repository
Class PlanRepositoryLinkHibernateDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<PlanRepositoryLink>
              extended by com.atlassian.bamboo.repository.PlanRepositoryLinkHibernateDao
All Implemented Interfaces:
BambooObjectDao<PlanRepositoryLink>, PlanRepositoryLinkDao, org.springframework.beans.factory.InitializingBean

public class PlanRepositoryLinkHibernateDao
extends BambooHibernateObjectDao<PlanRepositoryLink>
implements PlanRepositoryLinkDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
PlanRepositoryLinkHibernateDao()
           
 
Method Summary
 void detachAllRepositoriesFromPlan(ImmutablePlan plan)
          Remove all PlanRepositoryLink defined for the .
 PlanRepositoryLink getPlanRepositoryLink(PlanIdentifier plan, long repositoryId)
           
 java.util.List<PlanRepositoryLink> getPlanRepositoryLinks(ImmutablePlan plan)
           
 java.util.List<PlanRepositoryLink> getPlansUsingRepository(long repositoryId)
           
 void removeRepositoryFromPlan(PlanRepositoryLink planRepository)
          Remove single PlanRepositoryLink.
 
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
delete, deleteAll, executeReturnLong, findAll, findById, save, saveAll
 
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

PlanRepositoryLinkHibernateDao

public PlanRepositoryLinkHibernateDao()
Method Detail

getPlanRepositoryLinks

@NotNull
public java.util.List<PlanRepositoryLink> getPlanRepositoryLinks(@NotNull
                                                                         ImmutablePlan plan)
Specified by:
getPlanRepositoryLinks in interface PlanRepositoryLinkDao
Returns:
list of Source Repository relationships defined for the Plan sorted by PlanRepositoryLink.getPosition()

getPlansUsingRepository

public java.util.List<PlanRepositoryLink> getPlansUsingRepository(long repositoryId)
Specified by:
getPlansUsingRepository in interface PlanRepositoryLinkDao
Returns:
list of Plan that reference a Source Repository

getPlanRepositoryLink

public PlanRepositoryLink getPlanRepositoryLink(@NotNull
                                                PlanIdentifier plan,
                                                long repositoryId)
Specified by:
getPlanRepositoryLink in interface PlanRepositoryLinkDao
Returns:
relationship between plan and repository if it exists, null otherwise

detachAllRepositoriesFromPlan

public void detachAllRepositoriesFromPlan(@NotNull
                                          ImmutablePlan plan)
Description copied from interface: PlanRepositoryLinkDao
Remove all PlanRepositoryLink defined for the . Does not delete RepositoryDataEntity objects.

Specified by:
detachAllRepositoriesFromPlan in interface PlanRepositoryLinkDao

removeRepositoryFromPlan

public void removeRepositoryFromPlan(@NotNull
                                     PlanRepositoryLink planRepository)
Description copied from interface: PlanRepositoryLinkDao
Remove single PlanRepositoryLink. Does not delete RepositoryDataEntity

Specified by:
removeRepositoryFromPlan in interface PlanRepositoryLinkDao


Copyright © 2012 Atlassian. All Rights Reserved.