Interface RepositoryDefinitionDao

All Superinterfaces:
BambooObjectDao<RepositoryDataEntity>, BambooObjectWithOidDao<RepositoryDataEntity>
All Known Implementing Classes:
RepositoryDefinitionHibernateDao

@Internal public interface RepositoryDefinitionDao extends BambooObjectWithOidDao<RepositoryDataEntity>
  • Method Details

    • 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()
    • 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 max 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.
    • 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.