Package com.atlassian.bamboo.project
Class ProjectHibernateDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<E>
com.atlassian.bamboo.persistence3.BambooHibernateObjectWithOidDao<Project>
com.atlassian.bamboo.project.ProjectHibernateDao
- All Implemented Interfaces:
BambooObjectDao<Project>,BambooObjectWithOidDao<Project>,ProjectDao,org.springframework.beans.factory.InitializingBean
public class ProjectHibernateDao
extends BambooHibernateObjectWithOidDao<Project>
implements ProjectDao
-
Field Summary
FieldsFields inherited from class org.springframework.dao.support.DaoSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull Numbercount()@NotNull NumbervoidRemoves the given entity from the database@NotNull Collection<? extends Project>findAll()@NotNull Collection<? extends Project>findAll(int firstResult, int maxResults) findAllProjectsIds(int startIndex, int maxResults) @Nullable ProjectfindById(long id) @Nullable BambooEntityOidgetMaxProjectOid(int serverKey) Returns the maxBambooEntityOidthat's currently in use ofBambooEntityType.PROJECTtype, with the given server key.getProjectByKey(@NotNull String key) getProjectByName(@NotNull String projectName) booleanisExistingProjectKey(@NotNull String projectKey) booleanisExistingProjectName(@NotNull String projectName) Methods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectWithOidDao
findByOidMethods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
convertSearchTermToLikeExpression, countAll, countWithRestriction, deleteAll, executeCountQuery, findAll, findById, merge, save, saveAllMethods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplateMethods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactoryMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDaoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
countAll, countWithRestriction, deleteAll, findAll, findById, merge, save, saveAllMethods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectWithOidDao
findByOid
-
Field Details
-
PERSISTENT_CLASS
-
-
Constructor Details
-
ProjectHibernateDao
public ProjectHibernateDao()
-
-
Method Details
-
findById
- Specified by:
findByIdin interfaceProjectDao
-
findAll
- Specified by:
findAllin interfaceProjectDao
-
findAll
- Specified by:
findAllin interfaceProjectDao
-
findAllProjectsIds
- Specified by:
findAllProjectsIdsin interfaceProjectDao- Returns:
- ids of all projects (not marked for deletion)
-
findAllProjectsIds
- Specified by:
findAllProjectsIdsin interfaceProjectDao- Returns:
- ids of all projects (not marked for deletion)
-
count
- Specified by:
countin interfaceProjectDao
-
countNonDeleted
- Specified by:
countNonDeletedin interfaceProjectDao
-
delete
Description copied from interface:BambooObjectDaoRemoves the given entity from the database- Specified by:
deletein interfaceBambooObjectDao<Project>- Specified by:
deletein interfaceProjectDao- Overrides:
deletein classBambooHibernateObjectDao<Project>- Parameters:
project- entity to be removed
-
isExistingProjectName
- Specified by:
isExistingProjectNamein interfaceProjectDao
-
isExistingProjectKey
- Specified by:
isExistingProjectKeyin interfaceProjectDao
-
getProjectByKey
- Specified by:
getProjectByKeyin interfaceProjectDao
-
getProjectByName
- Specified by:
getProjectByNamein interfaceProjectDao
-
getNonEmptyProjects
- Specified by:
getNonEmptyProjectsin interfaceProjectDao- Returns:
- projects (not marked for deletion) with at least one top level plan (not marked for deletion)
-
getEmptyProjects
- Specified by:
getEmptyProjectsin interfaceProjectDao- Returns:
- projects (not marked for deletion) without top level plans (not marked for deletion)
-
getAllProjectsMarkedForDeletion
- Specified by:
getAllProjectsMarkedForDeletionin interfaceProjectDao- Returns:
- all
Projects that are marked for deletion..
-
getMaxProjectOid
Description copied from interface:ProjectDaoReturns 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.- Specified by:
getMaxProjectOidin interfaceProjectDao
-