Package com.atlassian.bamboo.repository
Interface RepositoryDefinitionDao
-
- All Superinterfaces:
BambooObjectDao<RepositoryDataEntity>
,BambooObjectWithOidDao<RepositoryDataEntity>
- All Known Implementing Classes:
RepositoryDefinitionHibernateDao
@Internal public interface RepositoryDefinitionDao extends BambooObjectWithOidDao<RepositoryDataEntity>
Dao forRepositoryDataEntity
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
countAll()
long
countAllByParent(@Nullable Long parentId)
@NotNull Long
countAllProjectsRepositories()
Count project, non-deleted repositories.long
countTopLevelGlobalRepositories()
Count global, non-deleted repositories without any parent repository.@NotNull Collection<? extends RepositoryDataEntity>
findAll()
@NotNull List<RepositoryDataEntity>
findAll(boolean includeMarkedForDeletion)
@NotNull Collection<? extends RepositoryDataEntity>
findAll(int firstResult, int maxResults)
@NotNull Collection<? extends RepositoryDataEntity>
findAllByParent(@Nullable Long parentId, int firstResult, int maxResult)
@NotNull List<Long>
findAllProjectsIdsUsingProjectRepositories()
Get IDs of all projects which are using project repositories.@NotNull Set<Long>
findAllRepositoryIds()
@NotNull Set<Long>
findAllRepositoryIds(boolean includeMarkedForDeletion)
@NotNull Set<Long>
findAllTopLevelRepositoriesIds()
Get ids of all repositories that doesn't have parent repository (are either linked or are created on plan level)@Nullable RepositoryDataEntity
findById(long id)
@Nullable RepositoryDataEntity
findLinkedRepositoryByName(@NotNull String name)
Find a linked repository by name;@Nullable RepositoryDataEntity
findProjectRepositoryByName(@NotNull String name, @NotNull Long projectId)
Find a project repository by name in project associated with given projectId.@NotNull List<RepositoryDataEntity>
findRepositoriesByPluginKey(@NotNull String pluginKey)
@NotNull List<RepositoryDataEntity>
getGlobalRepositoryDefinitions()
@Nullable BambooEntityOid
getMaxRepositoryOid(int serverKey)
Returns the maxBambooEntityOid
that's currently in use ofBambooEntityType.REPOSITORY
type, with the given server key.@NotNull Collection<RepositoryDataEntity>
getPrivateRepositoryDefinitionsByPlan(Plan plan)
@NotNull List<RepositoryDataEntity>
getProjectRepositoryDefinitions(Long projectId)
Get all project repositories associated with given projectId.@NotNull List<RepositoryDataEntity>
getTopLevelGlobalRepositories(int firstResult, int maxResults)
Return a list of global, non-deleted repositories without any parent repository.void
markForDeletionByParentId(long parentId)
Mark all direct children of repository with given id for deletion.void
markForDeletionByProjectId(long projectId)
Mark all project repositories with given projectId for deletion.void
removeRepositoryIfUnused(RepositoryDataEntity repositoryDataEntity)
void
removeUnusedRepositories()
-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectWithOidDao
findByOid
-
-
-
-
Method Detail
-
findById
@Nullable @Nullable RepositoryDataEntity findById(long id)
-
findAll
@NotNull @NotNull Collection<? extends RepositoryDataEntity> findAll()
-
findAll
@NotNull @NotNull Collection<? extends RepositoryDataEntity> findAll(int firstResult, int maxResults)
-
findAllByParent
@NotNull @NotNull Collection<? extends RepositoryDataEntity> findAllByParent(@Nullable @Nullable Long parentId, int firstResult, int maxResult)
-
countAll
long countAll()
-
countAllByParent
long countAllByParent(@Nullable @Nullable Long parentId)
-
countTopLevelGlobalRepositories
long countTopLevelGlobalRepositories()
Count global, non-deleted repositories without any parent repository.
-
getTopLevelGlobalRepositories
@NotNull @NotNull List<RepositoryDataEntity> getTopLevelGlobalRepositories(int firstResult, int maxResults)
Return a list of global, non-deleted repositories without any parent repository.
-
findRepositoriesByPluginKey
@NotNull @NotNull List<RepositoryDataEntity> findRepositoriesByPluginKey(@NotNull @NotNull String pluginKey)
-
removeRepositoryIfUnused
void removeRepositoryIfUnused(RepositoryDataEntity repositoryDataEntity)
-
removeUnusedRepositories
void removeUnusedRepositories()
-
getPrivateRepositoryDefinitionsByPlan
@NotNull @NotNull Collection<RepositoryDataEntity> getPrivateRepositoryDefinitionsByPlan(Plan plan)
-
getGlobalRepositoryDefinitions
@NotNull @NotNull List<RepositoryDataEntity> getGlobalRepositoryDefinitions()
-
getProjectRepositoryDefinitions
@NotNull @NotNull List<RepositoryDataEntity> getProjectRepositoryDefinitions(Long projectId)
Get all project repositories associated with given projectId.- Parameters:
projectId
-- Returns:
- List of RepositoryDataEntity which are project repositories associated with given projectId
-
countAllProjectsRepositories
@NotNull @NotNull Long countAllProjectsRepositories()
Count project, non-deleted repositories.
-
findAllProjectsIdsUsingProjectRepositories
@NotNull @NotNull List<Long> findAllProjectsIdsUsingProjectRepositories()
Get IDs of all projects which are using project repositories.- Returns:
- a list of IDs of all projects which are using project repositories.
-
findAllRepositoryIds
@NotNull @NotNull Set<Long> findAllRepositoryIds(boolean includeMarkedForDeletion)
-
findAll
@NotNull @NotNull List<RepositoryDataEntity> findAll(boolean includeMarkedForDeletion)
-
findAllTopLevelRepositoriesIds
@NotNull @NotNull Set<Long> findAllTopLevelRepositoriesIds()
Get ids of all repositories that doesn't have parent repository (are either linked or are created on plan level)- Since:
- 7.0
-
getMaxRepositoryOid
@Nullable @Nullable BambooEntityOid getMaxRepositoryOid(int serverKey)
Returns the maxBambooEntityOid
that's currently in use ofBambooEntityType.REPOSITORY
type, with the given server key. Returns null if no OIDs are in use of this type with the given server key.
-
markForDeletionByParentId
void markForDeletionByParentId(long parentId)
Mark all direct children of repository with given id for deletion.- Parameters:
parentId
-- Since:
- 6.3
-
markForDeletionByProjectId
void markForDeletionByProjectId(long projectId)
Mark all project repositories with given projectId for deletion.- Parameters:
projectId
-
-
findLinkedRepositoryByName
@Nullable @Nullable RepositoryDataEntity findLinkedRepositoryByName(@NotNull @NotNull String name)
Find a linked repository by name;- Parameters:
name
-- Returns:
- Since:
- 5.15
-
findProjectRepositoryByName
@Nullable @Nullable RepositoryDataEntity findProjectRepositoryByName(@NotNull @NotNull String name, @NotNull @NotNull Long projectId)
Find a project repository by name in project associated with given projectId.- Parameters:
name
-projectId
-- Returns:
- RepositoryDataEntity if repository exists otherwise null.
-
-