Spring Integration

org.springframework.integration.jpa.support
Class JpaUtils

java.lang.Object
  extended by org.springframework.integration.jpa.support.JpaUtils

public final class JpaUtils
extends java.lang.Object

This Utility contains a sub-set of utility methods from the Spring Data JPA Project. As the Spring Integration JPA adapter uses only these utility methods, they were copied into this class in order to prevent having to declare a dependency on Spring Data JPA.

Since:
2.2
Author:
Oliver Gierke, Gunnar Hillert

Field Summary
static java.lang.String DELETE_ALL_QUERY_STRING
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELETE_ALL_QUERY_STRING

public static final java.lang.String DELETE_ALL_QUERY_STRING
See Also:
Constant Field Values
Method Detail

detectAlias

public static java.lang.String detectAlias(java.lang.String query)
Resolves the alias for the entity to be retrieved from the given JPA query.


applyAndBind

public 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. Binds the given entities to the query.


getQueryString

public static java.lang.String getQueryString(java.lang.String template,
                                              java.lang.String entityName)
Returns the query string for the given class name.


getEntityName

public static java.lang.String getEntityName(javax.persistence.EntityManager em,
                                             java.lang.Class<?> entityClass)

Spring Integration