public class QuerydslLdapRepository<T> extends SimpleLdapRepository<T> implements QuerydslPredicateExecutor<T>
Constructor and Description |
---|
QuerydslLdapRepository(LdapOperations ldapOperations, ObjectDirectoryMapper odm, Class<T> entityType) Creates a new QuerydslLdapRepository . |
Modifier and Type | Method and Description |
---|---|
long | count(Predicate predicate) Returns the number of instances matching the given Predicate . |
boolean | exists(Predicate predicate) Checks whether the data store contains elements that match the given Predicate . |
Iterable<T> | findAll(<any>... orders) Returns all entities matching the given Predicate . |
List<T> | findAll(Predicate predicate) Find all entries matching the specified query. |
Iterable<T> | findAll(Predicate predicate, <any>... orders) Returns all entities matching the given Predicate applying the given OrderSpecifier s. |
Page<T> | findAll(Predicate predicate, Pageable pageable) Returns a Page of entities matching the given Predicate . |
Iterable<T> | findAll(Predicate predicate, Sort sort) Returns all entities matching the given Predicate applying the given Sort . |
Optional<T> | findOne(Predicate predicate) Find one entry matching the specified query. |
count, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findAllById, findById, save, saveAll
public QuerydslLdapRepository(LdapOperations ldapOperations, ObjectDirectoryMapper odm, Class<T> entityType)
QuerydslLdapRepository
.ldapOperations
- must not be null.odm
- must not be null.entityType
- must not be null.public Optional<T> findOne(Predicate predicate)
LdapRepository
findOne
in interface LdapRepository<T>
findOne
in interface QuerydslPredicateExecutor<T>
findOne
in class SimpleLdapRepository<T>
predicate
- the query specification.null
if no matching entry was found.public List<T> findAll(Predicate predicate)
LdapRepository
findAll
in interface LdapRepository<T>
findAll
in interface QuerydslPredicateExecutor<T>
findAll
in class SimpleLdapRepository<T>
predicate
- the query specification.public long count(Predicate predicate)
QuerydslPredicateExecutor
Predicate
.count
in interface QuerydslPredicateExecutor<T>
predicate
- the Predicate
to count instances for, must not be null.Predicate
.public boolean exists(Predicate predicate)
QuerydslPredicateExecutor
Predicate
.exists
in interface QuerydslPredicateExecutor<T>
predicate
- the Predicate
to use for the existence check, must not be null.Predicate
.public Iterable<T> findAll(Predicate predicate, Sort sort)
QuerydslPredicateExecutor
Predicate
applying the given Sort
. In case no match could be found an empty Iterable
is returned.findAll
in interface QuerydslPredicateExecutor<T>
predicate
- must not be null.sort
- the Sort
specification to sort the results by, may be Sort.unsorted()
, must not be null.Predicate
.public Iterable<T> findAll(<any>... orders)
QuerydslPredicateExecutor
Predicate
. In case no match could be found an empty Iterable
is returned.findAll
in interface LdapRepository<T>
findAll
in interface QuerydslPredicateExecutor<T>
orders
- must not be null.Predicate
.public Iterable<T> findAll(Predicate predicate, <any>... orders)
QuerydslPredicateExecutor
Predicate
applying the given OrderSpecifier
s. In case no match could be found an empty Iterable
is returned.findAll
in interface QuerydslPredicateExecutor<T>
predicate
- must not be null.orders
- the OrderSpecifier
s to sort the results by, must not be null.Predicate
applying the given OrderSpecifier
s.public Page<T> findAll(Predicate predicate, Pageable pageable)
QuerydslPredicateExecutor
Page
of entities matching the given Predicate
. In case no match could be found, an empty Page
is returned.findAll
in interface QuerydslPredicateExecutor<T>
predicate
- must not be null.pageable
- may be Pageable.unpaged()
, must not be null.Page
of entities matching the given Predicate
.