public class VariableDefinitionHibernateDao extends BambooHibernateObjectDao<VariableDefinition> implements VariableDefinitionDao
Constructor and Description |
---|
VariableDefinitionHibernateDao(TransactionAndHibernateTemplate transactionTemplate) |
Modifier and Type | Method and Description |
---|---|
long |
countAll() |
int |
countVariablesByEnvironmentId(long environmentId)
Count variables associated with deployment environment
|
int |
deleteByDeploymentVersion(DeletionSQLAdapter deletionAdapter)
Delete VariableDefinitions related to DeploymentVersions.
|
int |
deleteByEnvironment(DeletionSQLAdapter deletionAdapter)
Delete VariableDefinitions related to Environments.
|
Collection<? extends VariableDefinition> |
findAll()
Find all variable definitions
|
VariableDefinition |
findById(long id)
Find variable definition of specified id
|
VariableDefinition |
findGlobalVariableByKey(String key)
Find global variable by its key
|
List<VariableDefinition> |
findGlobalVariables()
Find global variable definitions.
|
VariableDefinition |
findPlanVariableByKey(PlanIdentifier plan,
String key)
Find plan variable by its key
|
Iterable<VariableDefinition> |
findVariablesByEnvironmentId(long environmentId)
Find variables associated with deployment environment
|
List<VariableDefinition> |
findVariablesByPlan(PlanIdentifier plan)
Find plan variable definitions for a given plan
|
Iterable<VariableDefinition> |
findVariablesByVersionId(long deploymentVersionId)
Find variables associated with deployment version
|
void |
save(VariableDefinition variableDefinition)
Saves the given entity.
|
countAll, countWithRestriction, delete, deleteAll, executeCountQuery, findAll, findById, merge, saveAll
getCacheAwareHibernateTemplate
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, saveAll
public VariableDefinitionHibernateDao(TransactionAndHibernateTemplate transactionTemplate)
public VariableDefinition findById(long id)
VariableDefinitionDao
findById
in interface VariableDefinitionDao
id
- id of variable definition@NotNull public List<VariableDefinition> findGlobalVariables()
VariableDefinitionDao
findGlobalVariables
in interface VariableDefinitionDao
public void save(@NotNull VariableDefinition variableDefinition)
BambooObjectDao
EntityObject
this method will:
- update EntityObject.getLastModificationDate()
- set EntityObject.getCreationDate()
if the object has not been savedsave
in interface BambooObjectDao<VariableDefinition>
save
in class BambooHibernateObjectDao<VariableDefinition>
variableDefinition
- entity to be saved@NotNull public List<VariableDefinition> findVariablesByPlan(@NotNull PlanIdentifier plan)
VariableDefinitionDao
findVariablesByPlan
in interface VariableDefinitionDao
plan
- plan which associated variable definition should be retrievedpublic int countVariablesByEnvironmentId(long environmentId)
VariableDefinitionDao
countVariablesByEnvironmentId
in interface VariableDefinitionDao
environmentId
- id of a deployment environment@NotNull public Iterable<VariableDefinition> findVariablesByEnvironmentId(long environmentId)
VariableDefinitionDao
findVariablesByEnvironmentId
in interface VariableDefinitionDao
environmentId
- id of a deployment environment@NotNull public Iterable<VariableDefinition> findVariablesByVersionId(long deploymentVersionId)
VariableDefinitionDao
findVariablesByVersionId
in interface VariableDefinitionDao
deploymentVersionId
- id of a deployment versionpublic int deleteByEnvironment(@NotNull DeletionSQLAdapter deletionAdapter)
VariableDefinitionDao
deleteByEnvironment
in interface VariableDefinitionDao
deletionAdapter
- DeletionSQLAdapter.getInClause()
public int deleteByDeploymentVersion(@NotNull DeletionSQLAdapter deletionAdapter)
VariableDefinitionDao
deleteByDeploymentVersion
in interface VariableDefinitionDao
public VariableDefinition findPlanVariableByKey(@NotNull PlanIdentifier plan, @NotNull String key)
VariableDefinitionDao
findPlanVariableByKey
in interface VariableDefinitionDao
plan
- plan used to filter variableskey
- key which identifies plan variable definitionpublic VariableDefinition findGlobalVariableByKey(@NotNull String key)
VariableDefinitionDao
findGlobalVariableByKey
in interface VariableDefinitionDao
key
- key which identifies global variable definition@NotNull public Collection<? extends VariableDefinition> findAll()
VariableDefinitionDao
findAll
in interface VariableDefinitionDao
public long countAll()
countAll
in interface VariableDefinitionDao
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.