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.StatelessSessionHibernateDaoSupport
              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
 int deleteByDeploymentVersion(DeletionSQLAdapter deletionAdapter)
          Delete VariableDefinitions related to DeploymentVersions.
 int deleteByEnvironment(DeletionSQLAdapter deletionAdapter)
          Delete VariableDefinitions related to Environments.
 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.lang.Iterable<VariableDefinition> findVariablesByEnvironmentId(long environmentId)
          Find variables associated with deployment Environment
 java.util.List<VariableDefinition> findVariablesByPlan(PlanIdentifier plan)
          Find plan variable definitions for a given plan
 java.lang.Iterable<VariableDefinition> findVariablesByVersionId(long deploymentVersionId)
          Find variables associated with deployment DeploymentVersion
 
Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
delete, deleteAll, execute, executeCountQuery, executeFind, executeReturnLong, findAll, findById, save, saveAll
 
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
 
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

findVariablesByEnvironmentId

@NotNull
public java.lang.Iterable<VariableDefinition> findVariablesByEnvironmentId(long environmentId)
Description copied from interface: VariableDefinitionDao
Find variables associated with deployment Environment

Specified by:
findVariablesByEnvironmentId in interface VariableDefinitionDao
Parameters:
environmentId - id of a deployment environment
Returns:
list of variables found

findVariablesByVersionId

@NotNull
public java.lang.Iterable<VariableDefinition> findVariablesByVersionId(long deploymentVersionId)
Description copied from interface: VariableDefinitionDao
Find variables associated with deployment DeploymentVersion

Specified by:
findVariablesByVersionId in interface VariableDefinitionDao
Parameters:
deploymentVersionId - id of a deployment environment
Returns:
list of variables found

deleteByEnvironment

public int deleteByEnvironment(@NotNull
                               DeletionSQLAdapter deletionAdapter)
Description copied from interface: VariableDefinitionDao
Delete VariableDefinitions related to Environments.

Specified by:
deleteByEnvironment in interface VariableDefinitionDao
Parameters:
deletionAdapter - DeletionSQLAdapter.getInClause()
Returns:

deleteByDeploymentVersion

public int deleteByDeploymentVersion(@NotNull
                                     DeletionSQLAdapter deletionAdapter)
Description copied from interface: VariableDefinitionDao
Delete VariableDefinitions related to DeploymentVersions.

Specified by:
deleteByDeploymentVersion in interface VariableDefinitionDao

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 © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.