Package com.atlassian.bamboo.repository
Interface PlanRepositoryLinkDao
- All Superinterfaces:
BambooObjectDao<PlanRepositoryLink>
- All Known Implementing Classes:
PlanRepositoryLinkHibernateDao
- Since:
- 3.4
-
Method Summary
Modifier and TypeMethodDescriptionvoid
detachAllRepositoriesFromPlan
(@NotNull ImmutablePlan plan) Remove allPlanRepositoryLink
defined for the .@NotNull List<PlanRepositoryLinkDto>
Find all in DTO formgetIdentifiersOfPlansUsingRepository
(long repositoryId) Get identifiers of Plans referencing a repository.getIdentifiersOfPlansUsingRepositoryOrItsDirectChildren
(long repositoryId) Get identifiers of Plans referencing a repository, either directly or through inheritance (only direct parent-child relationship is checked)@Nullable PlanRepositoryLink
getPlanRepositoryLink
(@NotNull PlanIdentifier plan, long repositoryId) @Nullable PlanRepositoryLink
getPlanRepositoryLinkByName
(@NotNull PlanIdentifier plan, @NotNull String repositoryName) @NotNull List<PlanRepositoryLinkDto>
getPlanRepositoryLinkDtos
(@NotNull PlanIdentifier plan) @NotNull List<PlanRepositoryLink>
getPlanRepositoryLinks
(@NotNull ImmutablePlan plan) @NotNull List<PlanRepositoryLink>
getPlanRepositoryLinks
(@NotNull PlanIdentifier plan) getPlansUsingRepository
(long repositoryId) boolean
isRepositoryOrItsDirectChildrenUsedInPlans
(long repositoryId) Check if repository is used in plansvoid
removeLinksByParentRepositoryId
(long parentId) Removes all link objects where repository is direct child of a repository with given id.void
removeRepositoryFromPlan
(@NotNull PlanRepositoryLink planRepository) Remove singlePlanRepositoryLink
.Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
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 byPlanRepositoryLink.getPosition()
-
getPlanRepositoryLinks
@NotNull @NotNull List<PlanRepositoryLink> getPlanRepositoryLinks(@NotNull @NotNull PlanIdentifier plan) - Parameters:
plan
-- Returns:
- list of Source Repository relationships defined for the
Plan
sorted byPlanRepositoryLink.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 byPlanRepositoryLink.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
Remove allPlanRepositoryLink
defined for the . Does not deleteRepositoryDataEntity
objects.- Parameters:
plan
-
-
removeRepositoryFromPlan
Remove singlePlanRepositoryLink
. Does not deleteRepositoryDataEntity
- Parameters:
planRepository
-
-
getPlansUsingRepository
- Parameters:
repositoryId
-- Returns:
- list of
Plan
that reference a Source Repository
-
getIdentifiersOfPlansUsingRepository
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
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
Find all in DTO form- Since:
- 9.3
-