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 for
RepositoryDataEntity
-
Method Summary
Modifier and TypeMethodDescriptionlong
countAll()
long
countAllByParent
(@Nullable Long parentId) @NotNull Long
Count project, non-deleted repositories.long
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) Get IDs of all projects which are using project repositories.findAllRepositoryIds
(boolean includeMarkedForDeletion) 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>
@Nullable BambooEntityOid
getMaxRepositoryOid
(int serverKey) Returns the maxBambooEntityOid
that's currently in use ofBambooEntityType.REPOSITORY
type, with the given server key.@NotNull Collection<RepositoryDataEntity>
@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
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 Details
-
findById
-
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
-
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
-
removeUnusedRepositories
void removeUnusedRepositories() -
getPrivateRepositoryDefinitionsByPlan
-
getGlobalRepositoryDefinitions
-
getProjectRepositoryDefinitions
Get all project repositories associated with given projectId.- Parameters:
projectId
-- Returns:
- List of RepositoryDataEntity which are project repositories associated with given projectId
-
countAllProjectsRepositories
Count project, non-deleted repositories. -
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
-
findAllRepositoryIds
-
findAll
-
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
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
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.
-