com.atlassian.bamboo.build
Class PlanDependencyHibernateDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.hibernate.HibernateObjectDao
              extended by com.atlassian.bamboo.persistence.BambooHibernateObjectDao
                  extended by 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
PlanDependencyHibernateDao()
           
 
Method Summary
 java.util.Collection<PlanDependency> findAllDependencies()
           
 java.util.Collection<PlanDependency> getChildNonEditableDependencies(Plan plan)
           
 java.util.Collection<PlanDependency> getChildPlanDependencies(Plan plan)
          Retrievs all plan dependencies in which the given plan features as a parent
 java.util.Collection<PlanDependency> getParentNonEditableDependencies(Plan plan)
           
 java.util.Collection<PlanDependency> getParentPlanDependencies(Plan plan)
          Retrievs all plan dependencies in which the given plan features as a child
 java.lang.Class getPersistentClass()
           
 void removeDependenciesForPlan(Plan plan)
          Deletes any existing dependency featuring the given plan.
 
Methods inherited from class com.atlassian.bamboo.persistence.BambooHibernateObjectDao
executeCountQuery, executeReturnLong, findById, findById
 
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao
findAll, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex, updateModificationData
 
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.persistence.BambooObjectDao
findById
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, refresh, remove, replicate, save, saveRaw
 

Constructor Detail

PlanDependencyHibernateDao

public PlanDependencyHibernateDao()
Method Detail

getPersistentClass

public java.lang.Class getPersistentClass()
Specified by:
getPersistentClass in interface bucket.core.persistence.ObjectDao

findAllDependencies

@NotNull
public java.util.Collection<PlanDependency> findAllDependencies()
Specified by:
findAllDependencies in interface PlanDependencyDao
Returns:
all dependencies

getChildPlanDependencies

@NotNull
public java.util.Collection<PlanDependency> getChildPlanDependencies(@NotNull
                                                                             Plan plan)
Description copied from interface: PlanDependencyDao
Retrievs all plan dependencies in which the given plan features as a parent

Specified by:
getChildPlanDependencies in interface PlanDependencyDao
Parameters:
plan - - the parent
Returns:
set of all children of the given plan

getParentPlanDependencies

@NotNull
public java.util.Collection<PlanDependency> getParentPlanDependencies(@NotNull
                                                                              Plan plan)
Description copied from interface: PlanDependencyDao
Retrievs all plan dependencies in which the given plan features as a child

Specified by:
getParentPlanDependencies in interface PlanDependencyDao
Parameters:
plan - - the child
Returns:
set of all parents to the given plan

getChildNonEditableDependencies

@Nullable
public java.util.Collection<PlanDependency> getChildNonEditableDependencies(@NotNull
                                                                                     Plan plan)
Specified by:
getChildNonEditableDependencies in interface PlanDependencyDao
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 java.util.Collection<PlanDependency> getParentNonEditableDependencies(@NotNull
                                                                                      Plan plan)
Specified by:
getParentNonEditableDependencies in interface PlanDependencyDao
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

public void removeDependenciesForPlan(@NotNull
                                      Plan plan)
Description copied from interface: PlanDependencyDao
Deletes any existing dependency featuring the given plan. Used when deleting a plan.

Specified by:
removeDependenciesForPlan in interface PlanDependencyDao
Parameters:
plan - to be removed


Copyright © 2010 Atlassian. All Rights Reserved.