public final class JpaUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DELETE_ALL_QUERY_STRING |
Modifier and Type | Method and Description |
---|---|
static <T> javax.persistence.Query |
applyAndBind(java.lang.String queryString,
java.lang.Iterable<T> entities,
javax.persistence.EntityManager entityManager)
Creates a where-clause referencing the given entities and appends it to the given query string.
|
static java.lang.String |
detectAlias(java.lang.String query)
Resolves the alias for the entity to be retrieved from the given JPA query.
|
static java.lang.String |
getEntityName(javax.persistence.EntityManager em,
java.lang.Class<?> entityClass) |
static java.lang.String |
getQueryString(java.lang.String template,
java.lang.String entityName)
Returns the query string for the given class name.
|
public static final java.lang.String DELETE_ALL_QUERY_STRING
public static java.lang.String detectAlias(java.lang.String query)
public static <T> javax.persistence.Query applyAndBind(java.lang.String queryString, java.lang.Iterable<T> entities, javax.persistence.EntityManager entityManager)
public static java.lang.String getQueryString(java.lang.String template, java.lang.String entityName)
public static java.lang.String getEntityName(javax.persistence.EntityManager em, java.lang.Class<?> entityClass)