Package com.atlassian.bamboo.build
Class PlanDependencyHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
com.atlassian.bamboo.persistence.BambooHibernateObjectDao
com.atlassian.bamboo.build.PlanDependencyHibernateDao
- All Implemented Interfaces:
bucket.core.persistence.ObjectDao
,PlanDependencyDao
,BambooObjectDao
,org.springframework.beans.factory.InitializingBean
public class PlanDependencyHibernateDao
extends BambooHibernateObjectDao
implements PlanDependencyDao
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull Collection<PlanDependency>
@Nullable Collection<PlanDependency>
getChildNonEditableDependencies
(@NotNull PlanIdentifier plan) @NotNull Collection<PlanDependency>
getChildPlanDependencies
(@NotNull PlanIdentifier plan) Retrievs all plan dependencies in which the given plan features as a parent@Nullable Collection<PlanDependency>
getParentNonEditableDependencies
(@NotNull PlanIdentifier plan) @NotNull Collection<PlanDependency>
getParentPlanDependencies
(@NotNull PlanIdentifier plan) Retrievs all plan dependencies in which the given plan features as a childvoid
removeDependenciesForPlan
(@NotNull PlanIdentifier plan) Deletes any existing dependency featuring the given plan.Methods inherited from class com.atlassian.bamboo.persistence.BambooHibernateObjectDao
findAll, findAllSorted, findById, findById, refresh, remove, replicate, save, saveRaw, updateModificationData
Methods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, 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.persistence.BambooObjectDao
findById
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, refresh, remove, replicate, save, saveRaw
-
Constructor Details
-
PlanDependencyHibernateDao
public PlanDependencyHibernateDao()
-
-
Method Details
-
getPersistentClass
- Specified by:
getPersistentClass
in interfacebucket.core.persistence.ObjectDao
-
findAllDependencies
- Specified by:
findAllDependencies
in interfacePlanDependencyDao
- Returns:
- all dependencies
-
getChildPlanDependencies
@NotNull public @NotNull Collection<PlanDependency> getChildPlanDependencies(@NotNull @NotNull PlanIdentifier plan) Description copied from interface:PlanDependencyDao
Retrievs all plan dependencies in which the given plan features as a parent- Specified by:
getChildPlanDependencies
in interfacePlanDependencyDao
- Parameters:
plan
- - the parent- Returns:
- set of all children of the given plan
-
getParentPlanDependencies
@NotNull public @NotNull Collection<PlanDependency> getParentPlanDependencies(@NotNull @NotNull PlanIdentifier plan) Description copied from interface:PlanDependencyDao
Retrievs all plan dependencies in which the given plan features as a child- Specified by:
getParentPlanDependencies
in interfacePlanDependencyDao
- Parameters:
plan
- - the child- Returns:
- set of all parents to the given plan
-
getChildNonEditableDependencies
@Nullable public @Nullable Collection<PlanDependency> getChildNonEditableDependencies(@NotNull @NotNull PlanIdentifier plan) - Specified by:
getChildNonEditableDependencies
in interfacePlanDependencyDao
- Parameters:
plan
- to find children of- Returns:
- of dependencies in which the given plan features as a parent AND isEditable is false()
-
getParentNonEditableDependencies
@Nullable public @Nullable Collection<PlanDependency> getParentNonEditableDependencies(@NotNull @NotNull PlanIdentifier plan) - Specified by:
getParentNonEditableDependencies
in interfacePlanDependencyDao
- Parameters:
plan
- to find parents of- Returns:
- a list of dependencies in which the given plan features as a parent AND isEditable is false()
-
removeDependenciesForPlan
Description copied from interface:PlanDependencyDao
Deletes any existing dependency featuring the given plan. Used when deleting a plan.- Specified by:
removeDependenciesForPlan
in interfacePlanDependencyDao
- Parameters:
plan
- to be removed
-