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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes 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 void
incrementMainVersion
(T entity) protected <E extends T>
voidincrementRootVersion
(@NotNull Collection<E> entities) protected void
incrementRootVersion
(T entity) void
Saves 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, merge
Methods inherited from class com.atlassian.bamboo.persistence3.StatelessSessionHibernateDaoSupport
getCacheAwareHibernateTemplate
Methods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
-
Constructor Details
-
BambooHibernateVersionAwareObjectDao
public BambooHibernateVersionAwareObjectDao()
-
-
Method Details
-
save
Description copied from interface:BambooObjectDao
Saves the given entity. If the entity implementation is an instance ofEntityObject
this method will: - updateEntityObject.getLastModificationDate()
- setEntityObject.getCreationDate()
if the object has not been saved- Specified by:
save
in interfaceBambooObjectDao<T extends BambooObject>
- Overrides:
save
in classBambooHibernateObjectDao<T extends BambooObject>
- Parameters:
t
- entity to be saved
-
saveAll
Description copied from interface:BambooObjectDao
Save all entities in the collection to the database- Specified by:
saveAll
in interfaceBambooObjectDao<T extends BambooObject>
- Overrides:
saveAll
in classBambooHibernateObjectDao<T extends BambooObject>
- Parameters:
entities
- entities to be saved to database
-
delete
Description copied from interface:BambooObjectDao
Removes the given entity from the database- Specified by:
delete
in interfaceBambooObjectDao<T extends BambooObject>
- Overrides:
delete
in classBambooHibernateObjectDao<T extends BambooObject>
- Parameters:
t
- entity to be removed
-
deleteAll
Description copied from interface:BambooObjectDao
Remove all elements in the collection from database- Specified by:
deleteAll
in interfaceBambooObjectDao<T extends BambooObject>
- Overrides:
deleteAll
in classBambooHibernateObjectDao<T extends BambooObject>
- Parameters:
entities
- elements to be removed from database
-
getMainVersioningSupplement
-
getRootVersioningSupplement
-
incrementMainVersion
-
incrementMainVersion
-
incrementRootVersion
-
incrementRootVersion
-