Package com.atlassian.bamboo.jpa
Class JpaUtils.CriteriaVersionUpdater<E,R,T>
- java.lang.Object
-
- com.atlassian.bamboo.jpa.JpaUtils.CriteriaVersionUpdater<E,R,T>
-
- Enclosing class:
- JpaUtils
public abstract static class JpaUtils.CriteriaVersionUpdater<E,R,T> extends Object
Creates a custom wrapper that initialises commonly used JPA variables in order to increment entity's root version. You can customise the version update throughapply()
and run it with the incrementRootVersion methods.- Since:
- 9.4
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.persistence.criteria.CriteriaBuilder
cb
protected javax.persistence.criteria.Root<? extends E>
entity
protected javax.persistence.criteria.CriteriaQuery<R>
q
protected VersioningSupplement<T>
versioningSupplement
-
Constructor Summary
Constructors Constructor Description CriteriaVersionUpdater(org.hibernate.SessionFactory sessionFactory, Class<? extends E> entity, Class<R> result, VersioningSupplement<T> versioningSupplement)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
apply()
It should fetch the unique, single entry whose root version needs to be incremented.void
incrementRootVersion()
Triggers root version incrementation if the root exists.
-
-
-
Field Detail
-
cb
protected final javax.persistence.criteria.CriteriaBuilder cb
-
q
protected final javax.persistence.criteria.CriteriaQuery<R> q
-
entity
protected final javax.persistence.criteria.Root<? extends E> entity
-
versioningSupplement
protected final VersioningSupplement<T> versioningSupplement
-
-