Interface PlanRepositoryLinkDao

All Superinterfaces:
BambooObjectDao<PlanRepositoryLink>
All Known Implementing Classes:
PlanRepositoryLinkHibernateDao

public interface PlanRepositoryLinkDao extends BambooObjectDao<PlanRepositoryLink>
Since:
3.4
  • Method Details

    • getPlanRepositoryLinks

      @NotNull @NotNull List<PlanRepositoryLink> getPlanRepositoryLinks(@NotNull @NotNull ImmutablePlan plan)
      Parameters:
      plan -
      Returns:
      list of Source Repository relationships defined for the Plan sorted by PlanRepositoryLink.getPosition()
    • getPlanRepositoryLinks

      @NotNull @NotNull List<PlanRepositoryLink> getPlanRepositoryLinks(@NotNull @NotNull PlanIdentifier plan)
      Parameters:
      plan -
      Returns:
      list of Source Repository relationships defined for the Plan sorted by PlanRepositoryLink.getPosition()
      Since:
      5.14
    • getPlanRepositoryLinkDtos

      @NotNull @NotNull List<PlanRepositoryLinkDto> getPlanRepositoryLinkDtos(@NotNull @NotNull PlanIdentifier plan)
      Parameters:
      plan -
      Returns:
      list of Source Repository relationships defined for the Plan sorted by PlanRepositoryLink.getPosition()
      Since:
      9.3
    • getPlanRepositoryLink

      @Nullable @Nullable PlanRepositoryLink getPlanRepositoryLink(@NotNull @NotNull PlanIdentifier plan, long repositoryId)
      Parameters:
      plan -
      repositoryId -
      Returns:
      relationship between plan and repository if it exists, null otherwise
    • getPlanRepositoryLinkByName

      @Nullable @Nullable PlanRepositoryLink getPlanRepositoryLinkByName(@NotNull @NotNull PlanIdentifier plan, @NotNull @NotNull String repositoryName)
      Parameters:
      plan -
      repositoryName -
      Returns:
      relationship between plan and repository if it exists, null otherwise
    • detachAllRepositoriesFromPlan

      void detachAllRepositoriesFromPlan(@NotNull @NotNull ImmutablePlan plan)
      Remove all PlanRepositoryLink defined for the . Does not delete RepositoryDataEntity objects.
      Parameters:
      plan -
    • removeRepositoryFromPlan

      void removeRepositoryFromPlan(@NotNull @NotNull PlanRepositoryLink planRepository)
      Remove single PlanRepositoryLink. Does not delete RepositoryDataEntity
      Parameters:
      planRepository -
    • getPlansUsingRepository

      List<PlanRepositoryLink> getPlansUsingRepository(long repositoryId)
      Parameters:
      repositoryId -
      Returns:
      list of Plan that reference a Source Repository
    • getIdentifiersOfPlansUsingRepository

      List<PlanIdentifier> getIdentifiersOfPlansUsingRepository(long repositoryId)
      Get identifiers of Plans referencing a repository. This is faster than getPlansUsingRepository() and should be preferred for 'view' actions.
      Parameters:
      repositoryId -
      Returns:
      Since:
      4.2
    • getIdentifiersOfPlansUsingRepositoryOrItsDirectChildren

      List<PlanIdentifier> getIdentifiersOfPlansUsingRepositoryOrItsDirectChildren(long repositoryId)
      Get identifiers of Plans referencing a repository, either directly or through inheritance (only direct parent-child relationship is checked)
      Parameters:
      repositoryId -
      Returns:
      Since:
      5.14
    • isRepositoryOrItsDirectChildrenUsedInPlans

      boolean isRepositoryOrItsDirectChildrenUsedInPlans(long repositoryId)
      Check if repository is used in plans
      Parameters:
      repositoryId -
      Returns:
      true if the given repository is used in any plan
      Since:
      8.2
    • removeLinksByParentRepositoryId

      void removeLinksByParentRepositoryId(long parentId)
      Removes all link objects where repository is direct child of a repository with given id.
      Parameters:
      parentId -
      Since:
      6.3
    • findAllDtos

      @NotNull @NotNull List<PlanRepositoryLinkDto> findAllDtos()
      Find all in DTO form
      Since:
      9.3