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 Numbercount()NumbercountNonDeleted()voiddelete(@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 ProjectfindById(long id)@NotNull List<Project>getAllProjectsMarkedForDeletion()@NotNull List<Project>getEmptyProjects()@Nullable BambooEntityOidgetMaxProjectOid(int serverKey)Returns the maxBambooEntityOidthat's currently in use ofBambooEntityType.PROJECTtype, with the given server key.@NotNull List<Project>getNonEmptyProjects()ProjectgetProjectByKey(@NotNull String key)ProjectgetProjectByName(@NotNull String projectName)booleanisExistingProjectKey(@NotNull String projectKey)booleanisExistingProjectName(@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:BambooObjectDaoRemoves the given entity from the database- Specified by:
deletein 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
Projects that are marked for deletion..
-
getMaxProjectOid
@Nullable @Nullable BambooEntityOid getMaxProjectOid(int serverKey)
Returns the maxBambooEntityOidthat's currently in use ofBambooEntityType.PROJECTtype, with the given server key. Returns null if no OIDs are in use of this type with the given server key.
-
-