Package com.atlassian.bamboo.variable
Interface VariableDefinitionDao
- All Superinterfaces:
BambooObjectDao<VariableDefinition>
- All Known Implementing Classes:
VariableDefinitionHibernateDao
-
Method Summary
Modifier and TypeMethodDescriptionlong
countAll()
@NotNull Long
Count all project variables.int
countVariablesByEnvironmentId
(long environmentId) Count variables associated with deployment environmentint
deleteByDeploymentVersion
(@NotNull DeletionSQLAdapter deletionAdapter) Delete VariableDefinitions related to DeploymentVersions.int
deleteByEnvironment
(@NotNull DeletionSQLAdapter deletionAdapter) Delete VariableDefinitions related to Environments.int
deleteByPlan
(long planId) Delete VariableDefinitions related to a plan.int
deleteByProjectId
(long projectId) Delete VariableDefinitions related to a project.@NotNull Collection<? extends VariableDefinition>
findAll()
Find all variable definitions@Nullable VariableDefinition
findById
(long id) Find variable definition of specified id@Nullable VariableDefinition
findGlobalVariableByKey
(@NotNull String key) Find global variable by its key@NotNull List<VariableDefinition>
Find global variable definitions.@Nullable VariableDefinition
findPlanVariableByKey
(@NotNull PlanIdentifier plan, @NotNull String key) Find plan variable by its key@NotNull Iterable<VariableDefinition>
findVariablesByEnvironmentId
(long environmentId) Find variables associated with deployment environment@NotNull List<VariableDefinition>
findVariablesByPlan
(@org.jetbrains.annotations.NotNull long planId) @NotNull List<VariableDefinition>
findVariablesByPlan
(@NotNull PlanIdentifier plan) Find plan variable definitions for a given plan@NotNull List<VariableDefinition>
findVariablesByProjectId
(long projectId) Find variables associated with a project@NotNull Iterable<VariableDefinition>
findVariablesByVersionId
(long deploymentVersionId) Find variables associated with deployment versionMethods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
Method Details
-
findById
Find variable definition of specified id- Parameters:
id
- id of variable definition- Returns:
- variable definition of specified id or null if not found
-
findGlobalVariables
Find global variable definitions.- Returns:
- global variable definition collection
-
findAllProjectIdsUsingProjectVariables
- Returns:
- all project variables definitions collection
-
countAllProjectVariables
Count all project variables.- Returns:
- Long count of project variables.
-
findGlobalVariableByKey
Find global variable by its key- Parameters:
key
- key which identifies global variable definition- Returns:
- variable definition or null if not found
-
findVariablesByPlan
@NotNull @NotNull List<VariableDefinition> findVariablesByPlan(@NotNull @NotNull PlanIdentifier plan) Find plan variable definitions for a given plan- Parameters:
plan
- plan which associated variable definition should be retrieved- Returns:
- variable definition matching plan or empty collection if not found
-
findPlanVariableByKey
@Nullable @Nullable VariableDefinition findPlanVariableByKey(@NotNull @NotNull PlanIdentifier plan, @NotNull @NotNull String key) Find plan variable by its key- Parameters:
plan
- plan used to filter variableskey
- key which identifies plan variable definition- Returns:
- variable definition or null if not found
-
findAll
Find all variable definitions- Returns:
- Collection of all variable definitions
-
findVariablesByPlan
@NotNull @NotNull List<VariableDefinition> findVariablesByPlan(@NotNull @org.jetbrains.annotations.NotNull long planId) -
countVariablesByEnvironmentId
int countVariablesByEnvironmentId(long environmentId) Count variables associated with deployment environment- Parameters:
environmentId
- id of a deployment environment- Returns:
- number of variables found
- Since:
- 5.15
-
findVariablesByEnvironmentId
Find variables associated with deployment environment- Parameters:
environmentId
- id of a deployment environment- Returns:
- list of variables found
- Since:
- 5.0
-
findVariablesByVersionId
Find variables associated with deployment version- Parameters:
deploymentVersionId
- id of a deployment version- Returns:
- list of variables found
- Since:
- 5.0
-
deleteByEnvironment
Delete VariableDefinitions related to Environments.- Parameters:
deletionAdapter
-DeletionSQLAdapter.getInClause()
- Returns:
-
deleteByDeploymentVersion
Delete VariableDefinitions related to DeploymentVersions.- Parameters:
deletionAdapter
-
-
deleteByPlan
int deleteByPlan(long planId) Delete VariableDefinitions related to a plan.- Parameters:
planId
-- Returns:
- deleted rows count
- Since:
- 6.8
-
countAll
long countAll() -
findVariablesByProjectId
Find variables associated with a project- Parameters:
projectId
- id of a project- Returns:
- list of variables found
- Since:
- 7.1
-
deleteByProjectId
int deleteByProjectId(long projectId) Delete VariableDefinitions related to a project.- Parameters:
projectId
-- Returns:
- deleted rows count
- Since:
- 7.1
-