com.atlassian.bamboo.variable
Class VariableDefinitionHibernateDao

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<VariableDefinition>
              extended by com.atlassian.bamboo.variable.VariableDefinitionHibernateDao
All Implemented Interfaces:
BambooObjectDao<VariableDefinition>, VariableDefinitionDao, org.springframework.beans.factory.InitializingBean

public class VariableDefinitionHibernateDao
extends BambooHibernateObjectDao<VariableDefinition>
implements VariableDefinitionDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
VariableDefinitionHibernateDao()
           
 
Method Summary
 java.util.Collection<? extends VariableDefinition> findAll()
          Find all variable definitions
 VariableDefinition findById(long id)
          Find variable definition of specified id
 VariableDefinition findGlobalVariableByKey(java.lang.String key)
          Find global variable by its key
 java.util.List<VariableDefinition> findGlobalVariables()
          Find global variable definitions.
 VariableDefinition findPlanVariableByKey(PlanIdentifier plan, java.lang.String key)
          Find plan variable by its key
 java.util.List<VariableDefinition> findVariablesByPlan(PlanIdentifier plan)
          Find plan variable definitions for a given plan
 
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

VariableDefinitionHibernateDao

public VariableDefinitionHibernateDao()
Method Detail

findById

public VariableDefinition findById(long id)
Description copied from interface: VariableDefinitionDao
Find variable definition of specified id

Specified by:
findById in interface VariableDefinitionDao
Parameters:
id - id of variable definition
Returns:
variable definition of specified id or null if not found

findGlobalVariables

@NotNull
public java.util.List<VariableDefinition> findGlobalVariables()
Description copied from interface: VariableDefinitionDao
Find global variable definitions.

Specified by:
findGlobalVariables in interface VariableDefinitionDao
Returns:
global variable definition collection

findVariablesByPlan

@NotNull
public java.util.List<VariableDefinition> findVariablesByPlan(@NotNull
                                                                      PlanIdentifier plan)
Description copied from interface: VariableDefinitionDao
Find plan variable definitions for a given plan

Specified by:
findVariablesByPlan in interface VariableDefinitionDao
Parameters:
plan - plan which associated variable definition should be retrieved
Returns:
variable definition matching plan or empty collection if not found

findPlanVariableByKey

public VariableDefinition findPlanVariableByKey(@NotNull
                                                PlanIdentifier plan,
                                                @NotNull
                                                java.lang.String key)
Description copied from interface: VariableDefinitionDao
Find plan variable by its key

Specified by:
findPlanVariableByKey in interface VariableDefinitionDao
Parameters:
plan - plan used to filter variables
key - key which identifies plan variable definition
Returns:
variable definition or null if not found

findGlobalVariableByKey

public VariableDefinition findGlobalVariableByKey(@NotNull
                                                  java.lang.String key)
Description copied from interface: VariableDefinitionDao
Find global variable by its key

Specified by:
findGlobalVariableByKey in interface VariableDefinitionDao
Parameters:
key - key which identifies global variable definition
Returns:
variable definition or null if not found

findAll

@NotNull
public java.util.Collection<? extends VariableDefinition> findAll()
Description copied from interface: VariableDefinitionDao
Find all variable definitions

Specified by:
findAll in interface VariableDefinitionDao
Returns:
Collection of all variable definitions


Copyright © 2012 Atlassian. All Rights Reserved.