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(PlanIdentifier plan)
           
 java.util.Collection<PlanDependency> getChildPlanDependencies(PlanIdentifier plan)
          Retrievs all plan dependencies in which the given plan features as a parent
 java.util.Collection<PlanDependency> getParentNonEditableDependencies(PlanIdentifier plan)
           
 java.util.Collection<PlanDependency> getParentPlanDependencies(PlanIdentifier plan)
          Retrievs all plan dependencies in which the given plan features as a child
 java.lang.Class getPersistentClass()
           
 void removeDependenciesForPlan(PlanIdentifier plan)
          Deletes any existing dependency featuring the given plan.
 
Methods inherited from class com.atlassian.bamboo.persistence.BambooHibernateObjectDao
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
                                                                             PlanIdentifier 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
                                                                              PlanIdentifier 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
                                                                                     PlanIdentifier 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
                                                                                      PlanIdentifier 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
                                      PlanIdentifier 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 © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.