@Internal public interface RepositoryDefinitionDao extends BambooObjectWithOidDao<RepositoryDataEntity>
RepositoryDataEntity
Modifier and Type | Method and 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 max
BambooEntityOid that's currently in use of BambooEntityType.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() |
findByOid
countAll, countWithRestriction, delete, deleteAll, findAll, findById, merge, save, saveAll
@Nullable @Nullable RepositoryDataEntity findById(long id)
@NotNull @NotNull Collection<? extends RepositoryDataEntity> findAll()
@NotNull @NotNull Collection<? extends RepositoryDataEntity> findAll(int firstResult, int maxResults)
@NotNull @NotNull Collection<? extends RepositoryDataEntity> findAllByParent(@Nullable @Nullable Long parentId, int firstResult, int maxResult)
long countAll()
long countAllByParent(@Nullable @Nullable Long parentId)
long countTopLevelGlobalRepositories()
@NotNull @NotNull List<RepositoryDataEntity> getTopLevelGlobalRepositories(int firstResult, int maxResults)
@NotNull @NotNull List<RepositoryDataEntity> findRepositoriesByPluginKey(@NotNull @NotNull String pluginKey)
void removeRepositoryIfUnused(RepositoryDataEntity repositoryDataEntity)
void removeUnusedRepositories()
@NotNull @NotNull Collection<RepositoryDataEntity> getPrivateRepositoryDefinitionsByPlan(Plan plan)
@NotNull @NotNull List<RepositoryDataEntity> getGlobalRepositoryDefinitions()
@NotNull @NotNull List<RepositoryDataEntity> getProjectRepositoryDefinitions(Long projectId)
projectId
- @NotNull @NotNull Long countAllProjectsRepositories()
@NotNull @NotNull List<Long> findAllProjectsIdsUsingProjectRepositories()
@NotNull @NotNull Set<Long> findAllRepositoryIds(boolean includeMarkedForDeletion)
@NotNull @NotNull List<RepositoryDataEntity> findAll(boolean includeMarkedForDeletion)
@NotNull @NotNull Set<Long> findAllTopLevelRepositoriesIds()
@Nullable @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 @Nullable RepositoryDataEntity findLinkedRepositoryByName(@NotNull @NotNull String name)
name
- @Nullable @Nullable RepositoryDataEntity findProjectRepositoryByName(@NotNull @NotNull String name, @NotNull @NotNull Long projectId)
name
- projectId
- Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.