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 javax.persistence.criteria.CriteriaBuilder cb -
q
-
entity
-
-
Constructor Details
-
CriteriaQuery
-
-
Method Details
-
apply
protected abstract void apply() -
getSingleResult
- See Also:
-
TypedQuery.getSingleResult()
-
uniqueResult
-
getResultList
- See Also:
-
TypedQuery.getResultList()
-
getResultList
- See Also:
-
TypedQuery.setFirstResult(int)TypedQuery.setMaxResults(int)TypedQuery.getResultList()
-