Constructor and Description |
---|
JpaUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> List<T> |
getResultPage(javax.persistence.TypedQuery<T> query,
PageCriteria pageCriteria)
Get a page of results from the specified TypedQuery
by using the given PageCriteria to limit the query
results.
|
static <T> T |
getSingleResult(List<T> list) |
static <T,I> T |
saveOrUpdate(I id,
javax.persistence.EntityManager entityManager,
T entity) |
public JpaUtil()
public static <T> T getSingleResult(List<T> list)
public static <T> List<T> getResultPage(javax.persistence.TypedQuery<T> query, PageCriteria pageCriteria)
T
- the type parameterquery
- the querypageCriteria
- the page criteriapublic static <T,I> T saveOrUpdate(I id, javax.persistence.EntityManager entityManager, T entity)
Copyright © 2018. All rights reserved.