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) |
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) |
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 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 Number count()
count
in interface ProjectDao
@NotNull public Number countNonDeleted()
countNonDeleted
in interface ProjectDao
public void delete(@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 String projectName)
isExistingProjectName
in interface ProjectDao
public boolean isExistingProjectKey(@NotNull String projectKey)
isExistingProjectKey
in interface ProjectDao
public Project getProjectByKey(@NotNull String key)
getProjectByKey
in interface ProjectDao
public 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 ProjectDao
Project
s that are marked for deletion..@Nullable public 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 © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.