Class JpaUtils
java.lang.Object
org.springframework.integration.jpa.support.JpaUtils
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, Gary Russell
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> QueryapplyAndBind(String queryString, Iterable<T> entities, EntityManager entityManager) Creates a where-clause referencing the given entities and appends it to the given query string.static StringdetectAlias(String query) Resolves the alias for the entity to be retrieved from the given JPA query.static StringgetEntityName(EntityManager em, Class<?> entityClass) static StringgetQueryString(String template, String entityName) Returns the query string for the given class name.
- 
Field Details- 
DELETE_ALL_QUERY_STRING- See Also:
 
 
- 
- 
Method Details- 
detectAliasResolves the alias for the entity to be retrieved from the given JPA query.- Parameters:
- query- The query.
- Returns:
- The alias, or null.
 
- 
applyAndBindpublic static <T> Query applyAndBind(String queryString, Iterable<T> entities, 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.- Type Parameters:
- T- The entity type.
- Parameters:
- queryString- The query string.
- entities- The entities.
- entityManager- The entity manager.
- Returns:
- The query.
 
- 
getQueryStringReturns the query string for the given class name.- Parameters:
- template- The template.
- entityName- The entity name.
- Returns:
- The query string.
 
- 
getEntityName
 
-