Interface RepositoryDefinitionDao

    • Method Detail

      • 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.
      • removeRepositoryIfUnused

        void removeRepositoryIfUnused​(RepositoryDataEntity repositoryDataEntity)
      • removeUnusedRepositories

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