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:
-
SelectResults
Pageable
AbstractSelectResults
PagingUtils
Lazy
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPagedSelectResults
(org.apache.geode.cache.query.SelectResults<T> selectResults, org.springframework.data.domain.Pageable pageable) Constructs a new instance ofPagedSelectResults
initialized with the given, requiredSelectResults
andPageable
object encapsulating the details of the requested page. -
Method Summary
Modifier and TypeMethodDescriptionasList()
asSet()
protected org.springframework.data.domain.Pageable
Returns thePageable
object encapsulating the details of the requested page.iterator()
int
size()
with
(org.springframework.data.domain.Pageable pageRequest) Builder method used to allow a newpage request
in 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, toArray
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 ofPagedSelectResults
initialized with the given, requiredSelectResults
andPageable
object encapsulating the details of the requested page.- Parameters:
selectResults
-SelectResults
to wrap; must not be null.pageable
-Pageable
object encapsulating the details of the requested page; must not be null.- Throws:
IllegalArgumentException
- if theSelectResults
or thePageable
object is null.- See Also:
-
SelectResults
Pageable
-
-
Method Details
-
getPageRequest
@NonNull protected org.springframework.data.domain.Pageable getPageRequest()Returns thePageable
object encapsulating the details of the requested page.- Returns:
- the
Pageable
object encapsulating the details of the requested page. - See Also:
-
Pageable
-
asSet
- Specified by:
asSet
in interfaceorg.apache.geode.cache.query.SelectResults<T>
- Overrides:
asSet
in classAbstractSelectResults<T>
-
asList
- Specified by:
asList
in interfaceorg.apache.geode.cache.query.SelectResults<T>
- Overrides:
asList
in classAbstractSelectResults<T>
-
iterator
- Specified by:
iterator
in interfaceCollection<T>
- Specified by:
iterator
in interfaceIterable<T>
- Overrides:
iterator
in classAbstractSelectResults<T>
-
size
public int size()- Specified by:
size
in interfaceCollection<T>
- Overrides:
size
in classAbstractSelectResults<T>
-
with
Builder method used to allow a newpage request
in order to get a different page of results from the underlyingSelectResults
.- Parameters:
pageRequest
-Pageable
object encapsulating the details of the requested page; must not be null.- Returns:
- this
PagedSelectResults
. - Throws:
IllegalArgumentException
- ifPageable
is null.- See Also:
-
Pageable
-