public class RSQLJPASupport extends RSQLCommonSupport
| Constructor and Description |
|---|
RSQLJPASupport() |
RSQLJPASupport(Map<String,javax.persistence.EntityManager> entityManagerMap) |
| Modifier and Type | Method and Description |
|---|---|
static long |
count(org.springframework.data.jpa.repository.JpaSpecificationExecutor<?> jpaSpecificationExecutor,
String rsqlQuery)
Returns the number of instances that the given
Specification will return. |
static List<?> |
findAll(org.springframework.data.jpa.repository.JpaSpecificationExecutor<?> jpaSpecificationExecutor,
String rsqlQuery)
Returns all entities matching the given
Specification. |
static org.springframework.data.domain.Page<?> |
findAll(org.springframework.data.jpa.repository.JpaSpecificationExecutor<?> jpaSpecificationExecutor,
String rsqlQuery,
org.springframework.data.domain.Pageable pageable)
Returns a
Page of entities matching the given Specification. |
static List<?> |
findAll(org.springframework.data.jpa.repository.JpaSpecificationExecutor<?> jpaSpecificationExecutor,
String rsqlQuery,
org.springframework.data.domain.Sort sort)
Returns all entities matching the given
Specification and Sort. |
static List<?> |
findAll(org.springframework.data.jpa.repository.JpaSpecificationExecutor<?> jpaSpecificationExecutor,
String rsqlQuery,
String sort)
Returns all entities matching the given
Specification and Sort. |
static Optional<?> |
findOne(org.springframework.data.jpa.repository.JpaSpecificationExecutor<?> jpaSpecificationExecutor,
String rsqlQuery)
Returns a single entity matching the given
Specification or Optional.empty() if none found. |
protected String |
getVersion() |
static <T> org.springframework.data.jpa.domain.Specification<T> |
rsql(String rsqlQuery) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
rsql(String rsqlQuery,
boolean distinct) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
rsql(String rsqlQuery,
boolean distinct,
Map<String,String> propertyPathMapper) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
rsql(String rsqlQuery,
List<RSQLCustomPredicate<?>> customPredicates) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
rsql(String rsqlQuery,
Map<String,String> propertyPathMapper) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
toSort(String sortQuery) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
toSort(String sortQuery,
Map<String,String> propertyPathMapper)
Add orderBy(s) to
CriteriaQuery. |
static <T> org.springframework.data.jpa.domain.Specification<T> |
toSpecification(String rsqlQuery) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
toSpecification(String rsqlQuery,
boolean distinct) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
toSpecification(String rsqlQuery,
boolean distinct,
Map<String,String> propertyPathMapper) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
toSpecification(String rsqlQuery,
boolean distinct,
Map<String,String> propertyPathMapper,
List<RSQLCustomPredicate<?>> customPredicates,
Map<String,javax.persistence.criteria.JoinType> joinHints) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
toSpecification(String rsqlQuery,
boolean distinct,
Map<String,String> propertyPathMapper,
Map<String,javax.persistence.criteria.JoinType> joinHints) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
toSpecification(String rsqlQuery,
List<RSQLCustomPredicate<?>> customPredicates) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
toSpecification(String rsqlQuery,
Map<String,String> propertyPathMapper) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
toSpecification(String rsqlQuery,
Map<String,String> propertyPathMapper,
List<RSQLCustomPredicate<?>> customPredicates,
Map<String,javax.persistence.criteria.JoinType> joinHints) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
toSpecification(String rsqlQuery,
Map<String,String> propertyPathMapper,
Map<String,javax.persistence.criteria.JoinType> joinHints) |
addConverter, addConverter, addEntityAttributeParser, addEntityAttributeTypeMap, addMapping, addMapping, addPropertyBlacklist, addPropertyBlacklist, addPropertyWhitelist, addPropertyWhitelist, getConversionService, getEntityManagerMap, getManagedTypeMap, getPropertyBlacklist, getPropertyRemapping, getPropertyWhitelist, getValueTypeMap, init, removeConverter, toComplexMultiValueMap, toMultiValueMappublic static <T> org.springframework.data.jpa.domain.Specification<T> rsql(String rsqlQuery)
public static <T> org.springframework.data.jpa.domain.Specification<T> rsql(String rsqlQuery, boolean distinct)
public static <T> org.springframework.data.jpa.domain.Specification<T> rsql(String rsqlQuery, Map<String,String> propertyPathMapper)
public static <T> org.springframework.data.jpa.domain.Specification<T> rsql(String rsqlQuery, boolean distinct, Map<String,String> propertyPathMapper)
public static <T> org.springframework.data.jpa.domain.Specification<T> rsql(String rsqlQuery, List<RSQLCustomPredicate<?>> customPredicates)
public static <T> org.springframework.data.jpa.domain.Specification<T> toSpecification(String rsqlQuery)
public static <T> org.springframework.data.jpa.domain.Specification<T> toSpecification(String rsqlQuery, Map<String,String> propertyPathMapper)
public static <T> org.springframework.data.jpa.domain.Specification<T> toSpecification(String rsqlQuery, boolean distinct)
public static <T> org.springframework.data.jpa.domain.Specification<T> toSpecification(String rsqlQuery, boolean distinct, Map<String,String> propertyPathMapper)
public static <T> org.springframework.data.jpa.domain.Specification<T> toSpecification(String rsqlQuery, List<RSQLCustomPredicate<?>> customPredicates)
public static <T> org.springframework.data.jpa.domain.Specification<T> toSpecification(String rsqlQuery, Map<String,String> propertyPathMapper, Map<String,javax.persistence.criteria.JoinType> joinHints)
public static <T> org.springframework.data.jpa.domain.Specification<T> toSpecification(String rsqlQuery, boolean distinct, Map<String,String> propertyPathMapper, Map<String,javax.persistence.criteria.JoinType> joinHints)
public static <T> org.springframework.data.jpa.domain.Specification<T> toSpecification(String rsqlQuery, Map<String,String> propertyPathMapper, List<RSQLCustomPredicate<?>> customPredicates, Map<String,javax.persistence.criteria.JoinType> joinHints)
public static <T> org.springframework.data.jpa.domain.Specification<T> toSpecification(String rsqlQuery, boolean distinct, Map<String,String> propertyPathMapper, List<RSQLCustomPredicate<?>> customPredicates, Map<String,javax.persistence.criteria.JoinType> joinHints)
public static <T> org.springframework.data.jpa.domain.Specification<T> toSort(@Nullable
String sortQuery)
public static <T> org.springframework.data.jpa.domain.Specification<T> toSort(@Nullable
String sortQuery,
Map<String,String> propertyPathMapper)
CriteriaQuery.
Example: "field1,asc;field2,desc;field3.subfield1,asc"T - sortQuery - - sort querypropertyPathMapper - - property remappingSpecification with specified order bypublic static Optional<?> findOne(org.springframework.data.jpa.repository.JpaSpecificationExecutor<?> jpaSpecificationExecutor, @Nullable String rsqlQuery)
Specification or Optional.empty() if none found.jpaSpecificationExecutor - JPA repositoryrsqlQuery - can be null.org.springframework.dao.IncorrectResultSizeDataAccessException - if more than one entity found.public static List<?> findAll(org.springframework.data.jpa.repository.JpaSpecificationExecutor<?> jpaSpecificationExecutor, @Nullable String rsqlQuery)
Specification.jpaSpecificationExecutor - JPA repositoryrsqlQuery - can be null.public static org.springframework.data.domain.Page<?> findAll(org.springframework.data.jpa.repository.JpaSpecificationExecutor<?> jpaSpecificationExecutor,
@Nullable
String rsqlQuery,
org.springframework.data.domain.Pageable pageable)
Page of entities matching the given Specification.jpaSpecificationExecutor - JPA repositoryrsqlQuery - can be null.pageable - must not be null.public static List<?> findAll(org.springframework.data.jpa.repository.JpaSpecificationExecutor<?> jpaSpecificationExecutor, @Nullable String rsqlQuery, org.springframework.data.domain.Sort sort)
Specification and Sort.jpaSpecificationExecutor - JPA repositoryrsqlQuery - can be null.sort - must not be null.public static List<?> findAll(org.springframework.data.jpa.repository.JpaSpecificationExecutor<?> jpaSpecificationExecutor, @Nullable String rsqlQuery, @Nullable String sort)
Specification and Sort.jpaSpecificationExecutor - JPA repositoryrsqlQuery - can be null.sort - can be null, comma delimited.public static long count(org.springframework.data.jpa.repository.JpaSpecificationExecutor<?> jpaSpecificationExecutor,
@Nullable
String rsqlQuery)
Specification will return.jpaSpecificationExecutor - JPA repositoryrsqlQuery - the Specification to count instances for. Can be null.protected String getVersion()
getVersion in class RSQLCommonSupportCopyright © 2018–2021. All rights reserved.