Package com.atlassian.bamboo.project
Interface ProjectDao
-
- All Superinterfaces:
BambooObjectDao<Project>
,BambooObjectWithOidDao<Project>
- All Known Implementing Classes:
ProjectHibernateDao
public interface ProjectDao extends BambooObjectWithOidDao<Project>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Number
count()
Number
countNonDeleted()
void
delete(@NotNull Project project)
Removes the given entity from the database@NotNull Collection<? extends Project>
findAll()
@NotNull Collection<? extends Project>
findAll(int firstResult, int maxResults)
@NotNull List<Long>
findAllProjectsIds()
@Nullable Project
findById(long id)
@NotNull List<Project>
getAllProjectsMarkedForDeletion()
@NotNull List<Project>
getEmptyProjects()
@Nullable BambooEntityOid
getMaxProjectOid(int serverKey)
Returns the maxBambooEntityOid
that's currently in use ofBambooEntityType.PROJECT
type, with the given server key.@NotNull List<Project>
getNonEmptyProjects()
Project
getProjectByKey(@NotNull String key)
Project
getProjectByName(@NotNull String projectName)
boolean
isExistingProjectKey(@NotNull String projectKey)
boolean
isExistingProjectName(@NotNull String projectName)
-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, deleteAll, findAll, findById, merge, save, saveAll
-
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectWithOidDao
findByOid
-
-
-
-
Method Detail
-
findById
@Nullable @Nullable Project findById(long id)
-
findAll
@NotNull @NotNull Collection<? extends Project> findAll()
-
findAll
@NotNull @NotNull Collection<? extends Project> findAll(int firstResult, int maxResults)
-
findAllProjectsIds
@NotNull @NotNull List<Long> findAllProjectsIds()
- Returns:
- ids of all projects (not marked for deletion)
-
count
Number count()
-
countNonDeleted
Number countNonDeleted()
-
delete
void delete(@NotNull @NotNull Project project)
Description copied from interface:BambooObjectDao
Removes the given entity from the database- Specified by:
delete
in interfaceBambooObjectDao<Project>
- Parameters:
project
- entity to be removed
-
isExistingProjectName
boolean isExistingProjectName(@NotNull @NotNull String projectName)
-
isExistingProjectKey
boolean isExistingProjectKey(@NotNull @NotNull String projectKey)
-
getNonEmptyProjects
@NotNull @NotNull List<Project> getNonEmptyProjects()
- Returns:
- projects (not marked for deletion) with at least one top level plan (not marked for deletion)
-
getEmptyProjects
@NotNull @NotNull List<Project> getEmptyProjects()
- Returns:
- projects (not marked for deletion) without top level plans (not marked for deletion)
-
getAllProjectsMarkedForDeletion
@NotNull @NotNull List<Project> getAllProjectsMarkedForDeletion()
- Returns:
- all
Project
s that are marked for deletion..
-
getMaxProjectOid
@Nullable @Nullable BambooEntityOid getMaxProjectOid(int serverKey)
Returns the maxBambooEntityOid
that's currently in use ofBambooEntityType.PROJECT
type, with the given server key. Returns null if no OIDs are in use of this type with the given server key.
-
-