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 |
---|---|
@NotNull Number |
count() |
@NotNull 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 max
BambooEntityOid that's currently in use of BambooEntityType.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) |
findByOid
countAll, countWithRestriction, deleteAll, executeCountQuery, findAll, findById, merge, save, saveAll
getCacheAwareHibernateTemplate
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findByOid
countAll, countWithRestriction, deleteAll, findAll, findById, merge, save, saveAll
@Nullable public @Nullable Project findById(long id)
findById
in interface ProjectDao
@NotNull public @NotNull Collection<? extends Project> findAll()
findAll
in interface ProjectDao
@NotNull public @NotNull Collection<? extends Project> findAll(int firstResult, int maxResults)
findAll
in interface ProjectDao
@NotNull public @NotNull List<Long> findAllProjectsIds()
findAllProjectsIds
in interface ProjectDao
@NotNull public @NotNull Number count()
count
in interface ProjectDao
@NotNull public @NotNull Number countNonDeleted()
countNonDeleted
in interface ProjectDao
public void delete(@NotNull @NotNull Project project)
BambooObjectDao
delete
in interface BambooObjectDao<Project>
delete
in interface ProjectDao
delete
in class BambooHibernateObjectDao<Project>
project
- entity to be removedpublic boolean isExistingProjectName(@NotNull @NotNull String projectName)
isExistingProjectName
in interface ProjectDao
public boolean isExistingProjectKey(@NotNull @NotNull String projectKey)
isExistingProjectKey
in interface ProjectDao
public Project getProjectByKey(@NotNull @NotNull String key)
getProjectByKey
in interface ProjectDao
public Project getProjectByName(@NotNull @NotNull String projectName)
getProjectByName
in interface ProjectDao
@NotNull public @NotNull List<Project> getNonEmptyProjects()
getNonEmptyProjects
in interface ProjectDao
@NotNull public @NotNull List<Project> getEmptyProjects()
getEmptyProjects
in interface ProjectDao
@NotNull public @NotNull List<Project> getAllProjectsMarkedForDeletion()
getAllProjectsMarkedForDeletion
in interface ProjectDao
Project
s that are marked for deletion..@Nullable public @Nullable BambooEntityOid getMaxProjectOid(int serverKey)
ProjectDao
BambooEntityOid
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 ProjectDao
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.