Package com.atlassian.bamboo.jpa
Class JpaUtils.CriteriaQuery<E,R>
java.lang.Object
com.atlassian.bamboo.jpa.JpaUtils.CriteriaQuery<E,R>
- Enclosing class:
JpaUtils
Creates a
CriteriaQuery wrapper that initialises commonly used JPA variables.
You can customise the query through apply() and run it with one of the getXXX methods.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCriteriaQuery(org.hibernate.SessionFactory sessionFactory, Class<? extends E> entity, Class<R> result) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidapply()getResultList(int firstResult, int maxResults)
-
Field Details
-
cb
protected final jakarta.persistence.criteria.CriteriaBuilder cb -
q
-
entity
-
-
Constructor Details
-
CriteriaQuery
-
-
Method Details
-
apply
protected abstract void apply() -
getSingleResult
- See Also:
-
uniqueResult
-
getResultList
- See Also:
-
getResultList
- See Also:
-
firstResultOrNull
- Returns:
- top result of a query (which should really be an ordered query) or null if no results
-