|
Spring Data Document | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.document.mongodb.repository.SimpleMongoRepository<T,ID> org.springframework.data.document.mongodb.repository.QueryDslMongoRepository<T,ID>
public class QueryDslMongoRepository<T,ID extends Serializable>
Special QueryDsl based repository implementation that allows execution
Predicate
s in various forms. TODO: Extract QueryDslMongoRepository.EntityPathResolver
into Spring Data Commons TODO: Refactor Spring Data JPA to use this common
infrastructure
Nested Class Summary | |
---|---|
static interface |
QueryDslMongoRepository.EntityPathResolver
Strategy interface to abstract the ways to translate an plain domain class into a EntityPath . |
Constructor Summary | |
---|---|
QueryDslMongoRepository(MongoEntityInformation<T,ID> entityInformation,
MongoTemplate template)
Creates a new QueryDslMongoRepository for the given
EntityMetadata and MongoTemplate . |
|
QueryDslMongoRepository(MongoEntityInformation<T,ID> entityInformation,
MongoTemplate template,
QueryDslMongoRepository.EntityPathResolver resolver)
Creates a new QueryDslMongoRepository for the given MongoEntityInformation ,
MongoTemplate and QueryDslMongoRepository.EntityPathResolver . |
Method Summary | |
---|---|
Long |
count(com.mysema.query.types.Predicate predicate)
Returns the number of instances that the given Predicate will return. |
List<T> |
findAll(com.mysema.query.types.Predicate predicate)
Returns all entities matching the given Predicate . |
List<T> |
findAll(com.mysema.query.types.Predicate predicate,
com.mysema.query.types.OrderSpecifier<?>... orders)
Returns all entities matching the given Predicate applying the given OrderSpecifier s. |
org.springframework.data.domain.Page<T> |
findAll(com.mysema.query.types.Predicate predicate,
org.springframework.data.domain.Pageable pageable)
Returns a Page of entities matching the given Predicate . |
T |
findOne(com.mysema.query.types.Predicate predicate)
Returns a single entity matching the given Predicate . |
Methods inherited from class org.springframework.data.document.mongodb.repository.SimpleMongoRepository |
---|
count, delete, delete, deleteAll, exists, findAll, findAll, findAll, findAll, findOne, getEntityInformation, getMongoOperations, save, save |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryDslMongoRepository(MongoEntityInformation<T,ID> entityInformation, MongoTemplate template)
QueryDslMongoRepository
for the given
EntityMetadata
and MongoTemplate
. Uses the
SimpleEntityPathResolver
to create an EntityPath
for the
given domain class.
entityInformation
- template
- public QueryDslMongoRepository(MongoEntityInformation<T,ID> entityInformation, MongoTemplate template, QueryDslMongoRepository.EntityPathResolver resolver)
QueryDslMongoRepository
for the given MongoEntityInformation
,
MongoTemplate
and QueryDslMongoRepository.EntityPathResolver
.
entityInformation
- template
- resolver
- Method Detail |
---|
public T findOne(com.mysema.query.types.Predicate predicate)
QueryDslPredicateExecutor
Predicate
.
findOne
in interface QueryDslPredicateExecutor<T>
public List<T> findAll(com.mysema.query.types.Predicate predicate)
QueryDslPredicateExecutor
Predicate
.
findAll
in interface QueryDslPredicateExecutor<T>
public List<T> findAll(com.mysema.query.types.Predicate predicate, com.mysema.query.types.OrderSpecifier<?>... orders)
QueryDslPredicateExecutor
Predicate
applying the given OrderSpecifier
s.
findAll
in interface QueryDslPredicateExecutor<T>
public org.springframework.data.domain.Page<T> findAll(com.mysema.query.types.Predicate predicate, org.springframework.data.domain.Pageable pageable)
QueryDslPredicateExecutor
Page
of entities matching the given Predicate
.
findAll
in interface QueryDslPredicateExecutor<T>
public Long count(com.mysema.query.types.Predicate predicate)
QueryDslPredicateExecutor
Predicate
will return.
count
in interface QueryDslPredicateExecutor<T>
predicate
- the Predicate
to count instances for
|
Spring Data Document | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |