Module spring.data.mongodb
Class QuerydslMongoPredicateExecutor<T>
java.lang.Object
org.springframework.data.mongodb.repository.support.QuerydslMongoPredicateExecutor<T>
- All Implemented Interfaces:
QuerydslPredicateExecutor<T>
public class QuerydslMongoPredicateExecutor<T>
extends Object
implements QuerydslPredicateExecutor<T>
MongoDB-specific
QuerydslPredicateExecutor that allows execution Predicates in various forms.- Since:
- 2.0
- Author:
- Oliver Gierke, Thomas Darimont, Mark Paluch, Christoph Strobl, Mark Paluch
-
Constructor Summary
ConstructorsConstructorDescriptionQuerydslMongoPredicateExecutor(MongoEntityInformation<T, ?> entityInformation, MongoOperations mongoOperations) Creates a newQuerydslMongoPredicateExecutorfor the givenMongoEntityInformationandMongoOperations.QuerydslMongoPredicateExecutor(MongoEntityInformation<T, ?> entityInformation, MongoOperations mongoOperations, EntityPathResolver resolver) Creates a newQuerydslMongoPredicateExecutorfor the givenMongoEntityInformation,MongoOperationsandEntityPathResolver. -
Method Summary
Modifier and TypeMethodDescriptionlongcount(com.querydsl.core.types.Predicate predicate) booleanexists(com.querydsl.core.types.Predicate predicate) findAll(com.querydsl.core.types.OrderSpecifier<?>... orders) findAll(com.querydsl.core.types.Predicate predicate) findAll(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orders) <S extends T,R>
RfindBy(com.querydsl.core.types.Predicate predicate, Function<FluentQuery.FetchableFluentQuery<S>, R> queryFunction) findOne(com.querydsl.core.types.Predicate predicate) protected org.springframework.data.mongodb.repository.support.SpringDataMongodbSerializerprotected static <E> com.querydsl.core.types.dsl.PathBuilder<E>pathBuilderFor(com.querydsl.core.types.EntityPath<E> path) protected com.querydsl.core.types.OrderSpecifier<?>toOrder(Sort.Order order) Transforms a plainSort.Orderinto a Querydsl specificOrderSpecifier.protected List<com.querydsl.core.types.OrderSpecifier<?>>toOrderSpecifiers(Sort sort) Converts the givenSorttoOrderSpecifier.protected EntityInformation<T,?>
-
Constructor Details
-
QuerydslMongoPredicateExecutor
public QuerydslMongoPredicateExecutor(MongoEntityInformation<T, ?> entityInformation, MongoOperations mongoOperations) Creates a newQuerydslMongoPredicateExecutorfor the givenMongoEntityInformationandMongoOperations. Uses theSimpleEntityPathResolverto create anEntityPathfor the given domain class.- Parameters:
entityInformation- must not be null.mongoOperations- must not be null.
-
QuerydslMongoPredicateExecutor
public QuerydslMongoPredicateExecutor(MongoEntityInformation<T, ?> entityInformation, MongoOperations mongoOperations, EntityPathResolver resolver) Creates a newQuerydslMongoPredicateExecutorfor the givenMongoEntityInformation,MongoOperationsandEntityPathResolver.- Parameters:
entityInformation- must not be null.mongoOperations- must not be null.resolver- must not be null.
-
-
Method Details
-
findOne
- Specified by:
findOnein interfaceQuerydslPredicateExecutor<T>
-
findAll
- Specified by:
findAllin interfaceQuerydslPredicateExecutor<T>
-
findAll
public List<T> findAll(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orders) - Specified by:
findAllin interfaceQuerydslPredicateExecutor<T>
-
findAll
- Specified by:
findAllin interfaceQuerydslPredicateExecutor<T>
-
findAll
- Specified by:
findAllin interfaceQuerydslPredicateExecutor<T>
-
findAll
- Specified by:
findAllin interfaceQuerydslPredicateExecutor<T>
-
count
public long count(com.querydsl.core.types.Predicate predicate) - Specified by:
countin interfaceQuerydslPredicateExecutor<T>
-
exists
public boolean exists(com.querydsl.core.types.Predicate predicate) - Specified by:
existsin interfaceQuerydslPredicateExecutor<T>
-
findBy
public <S extends T,R> R findBy(com.querydsl.core.types.Predicate predicate, Function<FluentQuery.FetchableFluentQuery<S>, R> queryFunction) - Specified by:
findByin interfaceQuerydslPredicateExecutor<T>
-
pathBuilderFor
protected static <E> com.querydsl.core.types.dsl.PathBuilder<E> pathBuilderFor(com.querydsl.core.types.EntityPath<E> path) -
typeInformation
-
mongodbSerializer
protected org.springframework.data.mongodb.repository.support.SpringDataMongodbSerializer mongodbSerializer() -
toOrder
Transforms a plainSort.Orderinto a Querydsl specificOrderSpecifier.- Parameters:
order-- Returns:
-
toOrderSpecifiers
Converts the givenSorttoOrderSpecifier.- Parameters:
sort-- Returns:
-