Package com.atlassian.bamboo.variable
Interface VariableDefinitionDao
-
- All Superinterfaces:
BambooObjectDao<VariableDefinition>
- All Known Implementing Classes:
VariableDefinitionHibernateDao
public interface VariableDefinitionDao extends BambooObjectDao<VariableDefinition>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
countAll()
@NotNull Long
countAllProjectVariables()
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@NotNull List<Long>
findAllProjectIdsUsingProjectVariables()
@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>
findGlobalVariables()
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 version-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
-
-
-
Method Detail
-
findById
@Nullable @Nullable VariableDefinition findById(long id)
Find variable definition of specified id- Parameters:
id
- id of variable definition- Returns:
- variable definition of specified id or null if not found
-
findGlobalVariables
@NotNull @NotNull List<VariableDefinition> findGlobalVariables()
Find global variable definitions.- Returns:
- global variable definition collection
-
findAllProjectIdsUsingProjectVariables
@NotNull @NotNull List<Long> findAllProjectIdsUsingProjectVariables()
- Returns:
- all project variables definitions collection
-
countAllProjectVariables
@NotNull @NotNull Long countAllProjectVariables()
Count all project variables.- Returns:
- Long count of project variables.
-
findGlobalVariableByKey
@Nullable @Nullable VariableDefinition findGlobalVariableByKey(@NotNull @NotNull String key)
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
@NotNull @NotNull Collection<? extends VariableDefinition> 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
@NotNull @NotNull Iterable<VariableDefinition> findVariablesByEnvironmentId(long environmentId)
Find variables associated with deployment environment- Parameters:
environmentId
- id of a deployment environment- Returns:
- list of variables found
- Since:
- 5.0
-
findVariablesByVersionId
@NotNull @NotNull Iterable<VariableDefinition> findVariablesByVersionId(long deploymentVersionId)
Find variables associated with deployment version- Parameters:
deploymentVersionId
- id of a deployment version- Returns:
- list of variables found
- Since:
- 5.0
-
deleteByEnvironment
int deleteByEnvironment(@NotNull @NotNull DeletionSQLAdapter deletionAdapter)
Delete VariableDefinitions related to Environments.- Parameters:
deletionAdapter
-DeletionSQLAdapter.getInClause()
- Returns:
-
deleteByDeploymentVersion
int deleteByDeploymentVersion(@NotNull @NotNull DeletionSQLAdapter deletionAdapter)
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
@NotNull @NotNull List<VariableDefinition> findVariablesByProjectId(long projectId)
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
-
-