Class BambooHibernateVersionAwareObjectDao<T extends BambooObject,R>
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
com.atlassian.bamboo.persistence3.BambooHibernateObjectDao<T>
com.atlassian.bamboo.persistence3.BambooHibernateVersionAwareObjectDao<T,R>
- All Implemented Interfaces:
BambooObjectDao<T>,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
ArtifactDefinitionHibernateDao,BambooHibernateVersionAwareObjectWithOidDao,ChainStageHibernateDao,PlanRepositoryLinkHibernateDao,VariableDefinitionHibernateDao
public abstract class BambooHibernateVersionAwareObjectDao<T extends BambooObject,R>
extends BambooHibernateObjectDao<T>
-
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves the given entity from the database<E extends T>
voiddeleteAll(@NotNull Collection<E> entities) Remove all elements in the collection from databaseprotected @NotNull Optional<VersioningSupplement<T>>protected @NotNull Optional<VersioningSupplement<R>>protected <E extends T>
voidincrementMainVersion(@NotNull Collection<E> entities) protected voidincrementMainVersion(T entity) protected <E extends T>
voidincrementRootVersion(@NotNull Collection<E> entities) protected voidincrementRootVersion(T entity) voidSaves the given entity.<E extends T>
voidsaveAll(@NotNull Collection<E> entities) Save all entities in the collection to the databaseMethods inherited from class com.atlassian.bamboo.persistence3.BambooHibernateObjectDao
convertSearchTermToLikeExpression, countAll, countWithRestriction, executeCountQuery, findAll, findById, mergeMethods 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, initDao
-
Constructor Details
-
BambooHibernateVersionAwareObjectDao
public BambooHibernateVersionAwareObjectDao()
-
-
Method Details
-
save
Description copied from interface:BambooObjectDaoSaves the given entity. If the entity implementation is an instance ofEntityObjectthis method will: - updateEntityObject.getLastModificationDate()- setEntityObject.getCreationDate()if the object has not been saved- Specified by:
savein interfaceBambooObjectDao<T extends BambooObject>- Overrides:
savein classBambooHibernateObjectDao<T extends BambooObject>- Parameters:
t- entity to be saved
-
saveAll
Description copied from interface:BambooObjectDaoSave all entities in the collection to the database- Specified by:
saveAllin interfaceBambooObjectDao<T extends BambooObject>- Overrides:
saveAllin classBambooHibernateObjectDao<T extends BambooObject>- Parameters:
entities- entities to be saved to database
-
delete
Description copied from interface:BambooObjectDaoRemoves the given entity from the database- Specified by:
deletein interfaceBambooObjectDao<T extends BambooObject>- Overrides:
deletein classBambooHibernateObjectDao<T extends BambooObject>- Parameters:
t- entity to be removed
-
deleteAll
Description copied from interface:BambooObjectDaoRemove all elements in the collection from database- Specified by:
deleteAllin interfaceBambooObjectDao<T extends BambooObject>- Overrides:
deleteAllin classBambooHibernateObjectDao<T extends BambooObject>- Parameters:
entities- elements to be removed from database
-
getMainVersioningSupplement
-
getRootVersioningSupplement
-
incrementMainVersion
-
incrementMainVersion
-
incrementRootVersion
-
incrementRootVersion
-