@Internal public interface RepositoryDefinitionDao extends BambooObjectWithOidDao<RepositoryDataEntity>
RepositoryDataEntity
Modifier and Type | Method and Description |
---|---|
long |
countAll() |
long |
countAllByParent(Long parentId) |
Long |
countAllProjectsRepositories()
Count project, non-deleted repositories.
|
long |
countTopLevelGlobalRepositories()
Count global, non-deleted repositories without any parent repository.
|
Collection<? extends RepositoryDataEntity> |
findAll() |
Collection<? extends RepositoryDataEntity> |
findAll(int firstResult,
int maxResults) |
Collection<? extends RepositoryDataEntity> |
findAllByParent(Long parentId,
int firstResult,
int maxResult) |
List<Long> |
findAllProjectsIdsUsingProjectRepositories()
Get IDs of all projects which are using project repositories.
|
Set<Long> |
findAllRepositoryIds() |
Set<Long> |
findAllTopLevelRepositoriesIds()
Get ids of all repositories that doesn't have parent repository (are either linked or are created on plan level)
|
RepositoryDataEntity |
findById(long id) |
RepositoryDataEntity |
findLinkedRepositoryByName(String name)
Find a linked repository by name;
|
RepositoryDataEntity |
findProjectRepositoryByName(String name,
Long projectId)
Find a project repository by name in project associated with given projectId.
|
List<RepositoryDataEntity> |
findRepositoriesByPluginKey(String pluginKey) |
List<RepositoryDataEntity> |
getGlobalRepositoryDefinitions() |
BambooEntityOid |
getMaxRepositoryOid(int serverKey)
Returns the max
BambooEntityOid that's currently in use of BambooEntityType.REPOSITORY type, with
the given server key. |
Collection<RepositoryDataEntity> |
getPrivateRepositoryDefinitionsByPlan(Plan plan) |
List<RepositoryDataEntity> |
getProjectRepositoryDefinitions(Long projectId)
Get all project repositories associated with given projectId.
|
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() |
findByOid
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
@Nullable RepositoryDataEntity findById(long id)
@NotNull Collection<? extends RepositoryDataEntity> findAll()
@NotNull Collection<? extends RepositoryDataEntity> findAll(int firstResult, int maxResults)
@NotNull Collection<? extends RepositoryDataEntity> findAllByParent(@Nullable Long parentId, int firstResult, int maxResult)
long countAll()
long countAllByParent(@Nullable Long parentId)
long countTopLevelGlobalRepositories()
@NotNull List<RepositoryDataEntity> getTopLevelGlobalRepositories(int firstResult, int maxResults)
@NotNull List<RepositoryDataEntity> findRepositoriesByPluginKey(@NotNull String pluginKey)
void removeRepositoryIfUnused(RepositoryDataEntity repositoryDataEntity)
void removeUnusedRepositories()
@NotNull Collection<RepositoryDataEntity> getPrivateRepositoryDefinitionsByPlan(Plan plan)
@NotNull List<RepositoryDataEntity> getGlobalRepositoryDefinitions()
@NotNull List<RepositoryDataEntity> getProjectRepositoryDefinitions(Long projectId)
projectId
- @NotNull Long countAllProjectsRepositories()
@NotNull List<Long> findAllProjectsIdsUsingProjectRepositories()
@NotNull Set<Long> findAllTopLevelRepositoriesIds()
@Nullable BambooEntityOid getMaxRepositoryOid(int serverKey)
BambooEntityOid
that's currently in use of BambooEntityType.REPOSITORY
type, with
the given server key.
Returns null if no OIDs are in use of this type with the given server key.void markForDeletionByParentId(long parentId)
parentId
- void markForDeletionByProjectId(long projectId)
projectId
- @Nullable RepositoryDataEntity findLinkedRepositoryByName(@NotNull String name)
name
- @Nullable RepositoryDataEntity findProjectRepositoryByName(@NotNull String name, @NotNull Long projectId)
name
- projectId
- Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.