Interface VariableDefinitionDao

    • 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 variables
        key - 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
      • 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