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>
-
-
Constructor Summary
Constructors Constructor Description BambooHibernateVersionAwareObjectDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(T t)
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>>
getMainVersioningSupplement()
protected @NotNull Optional<VersioningSupplement<R>>
getRootVersioningSupplement()
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
save(T t)
Saves the given entity.<E extends T>
voidsaveAll(@NotNull Collection<E> entities)
Save all entities in the collection to the database-
Methods 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
-
-
-
-
Method Detail
-
save
public void save(@NotNull T t)
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
public <E extends T> void saveAll(@NotNull @NotNull Collection<E> entities)
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
public void delete(@NotNull T t)
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
public <E extends T> void deleteAll(@NotNull @NotNull Collection<E> entities)
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
@NotNull protected @NotNull Optional<VersioningSupplement<T>> getMainVersioningSupplement()
-
getRootVersioningSupplement
@NotNull protected @NotNull Optional<VersioningSupplement<R>> getRootVersioningSupplement()
-
incrementMainVersion
protected void incrementMainVersion(@NotNull T entity)
-
incrementMainVersion
protected <E extends T> void incrementMainVersion(@NotNull @NotNull Collection<E> entities)
-
incrementRootVersion
protected void incrementRootVersion(@NotNull T entity)
-
incrementRootVersion
protected <E extends T> void incrementRootVersion(@NotNull @NotNull Collection<E> entities)
-
-