com.atlassian.bamboo.repository
Interface PlanRepositoryLinkDao

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

public interface PlanRepositoryLinkDao
extends BambooObjectDao<PlanRepositoryLink>

Since:
3.4

Method Summary
 void detachAllRepositoriesFromPlan(ImmutablePlan plan)
          Remove all PlanRepositoryLink defined for the .
 java.util.List<PlanIdentifier> getIdentifiersOfPlansUsingRepository(long repositoryId)
          Get identifiers of Plans referencing a repository.
 PlanRepositoryLink getPlanRepositoryLink(PlanIdentifier plan, long repositoryId)
           
 java.util.List<PlanRepositoryLink> getPlanRepositoryLinks(ImmutablePlan plan)
           
 java.util.List<PlanRepositoryLink> getPlansUsingRepository(long repositoryId)
           
 void removeRepositoryFromPlan(PlanRepositoryLink planRepository)
          Remove single PlanRepositoryLink.
 
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
delete, deleteAll, executeReturnLong, findAll, findById, save, saveAll
 

Method Detail

getPlanRepositoryLinks

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

getPlanRepositoryLink

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

detachAllRepositoriesFromPlan

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

Parameters:
plan -

removeRepositoryFromPlan

void removeRepositoryFromPlan(@NotNull
                              PlanRepositoryLink planRepository)
Remove single PlanRepositoryLink. Does not delete RepositoryDataEntity

Parameters:
planRepository -

getPlansUsingRepository

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

getIdentifiersOfPlansUsingRepository

java.util.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


Copyright © 2014 Atlassian Software Systems Pty Ltd. All Rights Reserved.