com.atlassian.bamboo.repository
Class PlanRepositoryLinkHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<PlanRepositoryLink>
com.atlassian.bamboo.repository.PlanRepositoryLinkHibernateDao
- All Implemented Interfaces:
- BambooObjectDao<PlanRepositoryLink>, PlanRepositoryLinkDao, org.springframework.beans.factory.InitializingBean
public class PlanRepositoryLinkHibernateDao
- extends BambooHibernateObjectDao<PlanRepositoryLink>
- implements PlanRepositoryLinkDao
Fields inherited from class org.springframework.dao.support.DaoSupport |
logger |
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao |
countAll, countWithRestriction, delete, deleteAll, execute, executeCountQuery, executeReturnInt, executeReturnLong, findAll, findById, save, saveAll |
Methods inherited from class org.springframework.orm.hibernate3.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 |
PlanRepositoryLinkHibernateDao
public PlanRepositoryLinkHibernateDao()
getPlanRepositoryLinks
@NotNull
public 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 List<PlanRepositoryLink> getPlansUsingRepository(long repositoryId)
- Specified by:
getPlansUsingRepository
in interface PlanRepositoryLinkDao
- Returns:
- list of
Plan
that reference a Source Repository
getIdentifiersOfPlansUsingRepository
public List<PlanIdentifier> getIdentifiersOfPlansUsingRepository(long repositoryId)
- Description copied from interface:
PlanRepositoryLinkDao
- Get identifiers of Plans referencing a repository. This is faster than getPlansUsingRepository() and should
be preferred for 'view' actions.
- Specified by:
getIdentifiersOfPlansUsingRepository
in interface PlanRepositoryLinkDao
- Returns:
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 © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.