public class ProjectHibernateDao extends BambooHibernateObjectWithOidDao<Project> implements ProjectDao
| Modifier and Type | Field and Description |
|---|---|
static Class<? extends Project> |
PERSISTENT_CLASS |
| Constructor and Description |
|---|
ProjectHibernateDao() |
| Modifier and Type | Method and Description |
|---|---|
Number |
count() |
Number |
countNonDeleted() |
void |
delete(Project project)
Removes the given entity from the database
|
Collection<? extends Project> |
findAll() |
Collection<? extends Project> |
findAll(int firstResult,
int maxResults) |
List<Long> |
findAllProjectsIds() |
Project |
findById(long id) |
List<Project> |
getAllProjectsMarkedForDeletion() |
List<Project> |
getEmptyProjects() |
BambooEntityOid |
getMaxProjectOid(int serverKey)
Returns the max
BambooEntityOid that's currently in use of BambooEntityType.PROJECT type, with
the given server key. |
List<Project> |
getNonEmptyProjects() |
Project |
getProjectByKey(String key) |
Project |
getProjectByName(String projectName) |
boolean |
isExistingProjectKey(String projectKey) |
boolean |
isExistingProjectName(String projectName) |
findByOidcountAll, countWithRestriction, deleteAll, executeCountQuery, findAll, findById, merge, save, saveAllgetCacheAwareHibernateTemplatecheckDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindByOidcountAll, countWithRestriction, deleteAll, findAll, findById, merge, save, saveAll@Nullable public Project findById(long id)
findById in interface ProjectDao@NotNull public Collection<? extends Project> findAll()
findAll in interface ProjectDao@NotNull public Collection<? extends Project> findAll(int firstResult, int maxResults)
findAll in interface ProjectDao@NotNull public List<Long> findAllProjectsIds()
findAllProjectsIds in interface ProjectDao@NotNull public Number count()
count in interface ProjectDao@NotNull public Number countNonDeleted()
countNonDeleted in interface ProjectDaopublic void delete(@NotNull
Project project)
BambooObjectDaodelete in interface BambooObjectDao<Project>delete in interface ProjectDaodelete in class BambooHibernateObjectDao<Project>project - entity to be removedpublic boolean isExistingProjectName(@NotNull
String projectName)
isExistingProjectName in interface ProjectDaopublic boolean isExistingProjectKey(@NotNull
String projectKey)
isExistingProjectKey in interface ProjectDaopublic Project getProjectByKey(@NotNull String key)
getProjectByKey in interface ProjectDaopublic Project getProjectByName(@NotNull String projectName)
getProjectByName in interface ProjectDao@NotNull public List<Project> getNonEmptyProjects()
getNonEmptyProjects in interface ProjectDao@NotNull public List<Project> getEmptyProjects()
getEmptyProjects in interface ProjectDao@NotNull public List<Project> getAllProjectsMarkedForDeletion()
getAllProjectsMarkedForDeletion in interface ProjectDaoProjects that are marked for deletion..@Nullable public BambooEntityOid getMaxProjectOid(int serverKey)
ProjectDaoBambooEntityOid that's currently in use of BambooEntityType.PROJECT type, with
the given server key.
Returns null if no OIDs are in use of this type with the given server key.getMaxProjectOid in interface ProjectDaoCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.