public class SpringDataCouchbaseQuery<T> extends AbstractCouchbaseQueryDSL<Q> implements com.querydsl.core.Fetchable<T>
| Constructor and Description |
|---|
SpringDataCouchbaseQuery(CouchbaseOperations operations,
Class<? extends T> type)
Creates a new
SpringDataCouchbaseQuery. |
SpringDataCouchbaseQuery(CouchbaseOperations operations,
Class<? extends T> type,
String collectionName)
Creates a new
SpringDataCouchbaseQuery to query the given collection. |
| Modifier and Type | Method and Description |
|---|---|
CouchbaseDocument |
asDocument()
Get the where definition as a Document instance
|
protected com.querydsl.core.types.Predicate |
createFilter(com.querydsl.core.QueryMetadata metadata) |
protected Query |
createQuery() |
protected Query |
createQuery(com.querydsl.core.types.Predicate filter,
com.querydsl.core.types.Expression<?> projection,
com.querydsl.core.QueryModifiers modifiers,
List<com.querydsl.core.types.OrderSpecifier<?>> orderBy) |
protected org.springframework.data.domain.Sort |
createSort(List<com.querydsl.core.types.OrderSpecifier<?>> orderSpecifiers)
Compute the sort
CouchbaseDocument from the given list of order specifiers. |
List<T> |
fetch() |
long |
fetchCount() |
T |
fetchFirst() |
T |
fetchOne() |
org.springframework.data.domain.Page<T> |
fetchPage(org.springframework.data.domain.Pageable pageable)
Fetch a
Page. |
com.querydsl.core.QueryResults<T> |
fetchResults() |
protected List<Object> |
getIds(Class<?> var1,
com.querydsl.core.types.Predicate var2) |
com.mysema.commons.lang.CloseableIterator<T> |
iterate() |
Stream<T> |
stream() |
String |
toString()
Returns the representation of the query.
|
createCriteria, createJoinFilter, createProjection, createQuery, distinct, getQueryMixin, getSerializer, limit, offset, orderBy, orderBy, restrict, set, where, wherepublic SpringDataCouchbaseQuery(CouchbaseOperations operations, Class<? extends T> type)
SpringDataCouchbaseQuery.operations - must not be null.type - must not be null.public SpringDataCouchbaseQuery(CouchbaseOperations operations, Class<? extends T> type, String collectionName)
SpringDataCouchbaseQuery to query the given collection.operations - must not be null.type - must not be null.collectionName - must not be null or empty.public com.mysema.commons.lang.CloseableIterator<T> iterate()
iterate in interface com.querydsl.core.Fetchable<T>public org.springframework.data.domain.Page<T> fetchPage(org.springframework.data.domain.Pageable pageable)
Page.pageable - public T fetchFirst()
fetchFirst in interface com.querydsl.core.Fetchable<T>public com.querydsl.core.QueryResults<T> fetchResults()
fetchResults in interface com.querydsl.core.Fetchable<T>public long fetchCount()
fetchCount in interface com.querydsl.core.Fetchable<T>protected Query createQuery()
protected com.querydsl.core.types.Predicate createFilter(com.querydsl.core.QueryMetadata metadata)
createFilter in class AbstractCouchbaseQueryDSL<SpringDataCouchbaseQuery<T>>protected List<Object> getIds(Class<?> var1, com.querydsl.core.types.Predicate var2)
getIds in class AbstractCouchbaseQueryDSL<SpringDataCouchbaseQuery<T>>protected Query createQuery(@Nullable com.querydsl.core.types.Predicate filter, @Nullable com.querydsl.core.types.Expression<?> projection, com.querydsl.core.QueryModifiers modifiers, List<com.querydsl.core.types.OrderSpecifier<?>> orderBy)
public String toString()
where(p.lastname.eq("Matthews")).orderBy(p.firstname.asc()).offset(1).limit(5);
results in
find({"lastname" : "Matthews"}).sort({"firstname" : 1}).skip(1).limit(5)
Note that encoding to String may fail when using data types that cannot be encoded or DBRef's without an
identifier.toString in class AbstractCouchbaseQueryDSL<Q extends org.springframework.data.couchbase.repository.support.SpringDataCouchbaseQuerySupport<Q>>public CouchbaseDocument asDocument()
asDocument in class AbstractCouchbaseQueryDSL<Q extends org.springframework.data.couchbase.repository.support.SpringDataCouchbaseQuerySupport<Q>>protected org.springframework.data.domain.Sort createSort(List<com.querydsl.core.types.OrderSpecifier<?>> orderSpecifiers)
CouchbaseDocument from the given list of order specifiers.orderSpecifiers - can be null.CouchbaseDocument if predicate is null. see
CouchbaseDocumentSerializer#toSort(List)Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.