Spring Data for VMware GemFire
Class PagedSelectResults<T>
java.lang.Object
org.springframework.data.gemfire.repository.query.AbstractSelectResults<T>
org.springframework.data.gemfire.repository.query.PagedSelectResults<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>,org.apache.geode.cache.query.SelectResults<T>
An Apache Geode
SelectResults implementation with support for Paging.- Since:
- 2.4.0
- See Also:
-
SelectResultsPageableAbstractSelectResultsPagingUtilsLazy
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPagedSelectResults(org.apache.geode.cache.query.SelectResults<T> selectResults, org.springframework.data.domain.Pageable pageable) Constructs a new instance ofPagedSelectResultsinitialized with the given, requiredSelectResultsandPageableobject encapsulating the details of the requested page. -
Method Summary
Modifier and TypeMethodDescriptionasList()asSet()protected org.springframework.data.domain.PageableReturns thePageableobject encapsulating the details of the requested page.iterator()intsize()with(org.springframework.data.domain.Pageable pageRequest) Builder method used to allow a newpage requestin order to get a different page of results from the underlyingSelectResults.Methods inherited from class org.springframework.data.gemfire.repository.query.AbstractSelectResults
add, addAll, clear, contains, containsAll, getCollectionType, getSelectResults, isEmpty, isModifiable, occurrences, remove, removeAll, retainAll, setElementType, toArray, toArrayMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Field Details
-
NON_NULL_PAGEABLE_MESSAGE
- See Also:
-
-
Constructor Details
-
PagedSelectResults
public PagedSelectResults(@NonNull org.apache.geode.cache.query.SelectResults<T> selectResults, @NonNull org.springframework.data.domain.Pageable pageable) Constructs a new instance ofPagedSelectResultsinitialized with the given, requiredSelectResultsandPageableobject encapsulating the details of the requested page.- Parameters:
selectResults-SelectResultsto wrap; must not be null.pageable-Pageableobject encapsulating the details of the requested page; must not be null.- Throws:
IllegalArgumentException- if theSelectResultsor thePageableobject is null.- See Also:
-
SelectResultsPageable
-
-
Method Details
-
getPageRequest
@NonNull protected org.springframework.data.domain.Pageable getPageRequest()Returns thePageableobject encapsulating the details of the requested page.- Returns:
- the
Pageableobject encapsulating the details of the requested page. - See Also:
-
Pageable
-
asSet
- Specified by:
asSetin interfaceorg.apache.geode.cache.query.SelectResults<T>- Overrides:
asSetin classAbstractSelectResults<T>
-
asList
- Specified by:
asListin interfaceorg.apache.geode.cache.query.SelectResults<T>- Overrides:
asListin classAbstractSelectResults<T>
-
iterator
- Specified by:
iteratorin interfaceCollection<T>- Specified by:
iteratorin interfaceIterable<T>- Overrides:
iteratorin classAbstractSelectResults<T>
-
size
public int size()- Specified by:
sizein interfaceCollection<T>- Overrides:
sizein classAbstractSelectResults<T>
-
with
Builder method used to allow a newpage requestin order to get a different page of results from the underlyingSelectResults.- Parameters:
pageRequest-Pageableobject encapsulating the details of the requested page; must not be null.- Returns:
- this
PagedSelectResults. - Throws:
IllegalArgumentException- ifPageableis null.- See Also:
-
Pageable
-