Class LucenePage<T,K,V>
java.lang.Object
org.springframework.data.gemfire.domain.support.AbstractSliceSupport<T>
org.springframework.data.gemfire.domain.support.AbstractPageSupport<T>
org.springframework.data.gemfire.search.lucene.support.LucenePage<T,K,V>
- All Implemented Interfaces:
Iterable<T>
,Supplier<Stream<T>>
,org.springframework.data.domain.Page<T>
,org.springframework.data.domain.Slice<T>
,org.springframework.data.util.Streamable<T>
Deprecated.
To be removed in GemFire 10 integration
The
LucenePage
class is a Spring Data Page
implementation supporting Spring Data style paging
of PageableLuceneQueryResults
complete with Spring Data projections.- Since:
- 1.1.0
- See Also:
-
List
LuceneResultStruct
PageableLuceneQueryResults
Page
AbstractPageSupport
ProjectingLuceneAccessor
-
Constructor Summary
ConstructorDescriptionLucenePage
(ProjectingLuceneAccessor template, org.apache.geode.cache.lucene.PageableLuceneQueryResults<K, V> queryResults, int pageSize, Class<T> projectionType) Deprecated.Constructs a new instance ofLucenePage
initialized with the givenLucene query results
,page size
andprojection type
.LucenePage
(ProjectingLuceneAccessor template, org.apache.geode.cache.lucene.PageableLuceneQueryResults<K, V> queryResults, int pageSize, Class<T> projectionType, LucenePage<T, K, V> previous) Deprecated.Constructs a new instance ofLucenePage
initialized with the givenLucene query results
,page size
,projection type
andprevious page
, if one exists. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.LucenePage<T,
K, V> getNext()
Deprecated.Null-safe method to return the nextpage
in the collection ofpages
.int
Deprecated.protected int
Deprecated.Returns the number of elements perpage
.LucenePage<T,
K, V> Deprecated.Returns the previouspage
in the collection ofpages
.Deprecated.Returns theClass
type of the projection.Deprecated.Returns theLucene query results
backing thisLucenePage
.int
getSize()
Deprecated.protected ProjectingLuceneAccessor
Deprecated.Returns theProjectingLuceneAccessor
used by thisLucenePage
to perform Lucene data access operations and projections.long
Deprecated.int
Deprecated.boolean
hasNext()
Deprecated.boolean
Deprecated.<S> org.springframework.data.domain.Page<S>
Deprecated.materialize
(ProjectingLuceneAccessor template, List<org.apache.geode.cache.lucene.LuceneResultStruct<K, V>> pageOfQueryResults, Class<T> projectionType) Deprecated.static <T,
K, V> LucenePage<T, K, V> newLucenePage
(ProjectingLuceneAccessor template, org.apache.geode.cache.lucene.PageableLuceneQueryResults<K, V> queryResults, int pageSize, Class<T> projectionType) Deprecated.Factory method used to construct a new instance ofLucenePage
initialized with the givenLucene query results
,page size
, andprojection type
.static <T,
K, V> LucenePage<T, K, V> newLucenePage
(ProjectingLuceneAccessor template, org.apache.geode.cache.lucene.PageableLuceneQueryResults<K, V> queryResults, int pageSize, Class<T> projectionType, LucenePage<T, K, V> previousPage) Deprecated.Factory method used to construct a new instance ofLucenePage
initialized with the givenLucene query results
,page size
,projection type
andprevious page
, if one exists.Methods inherited from class org.springframework.data.gemfire.domain.support.AbstractSliceSupport
getNumberOfElements, getSort, hasContent, isFirst, isLast, iterator, nextPageable, previousPageable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.springframework.data.domain.Slice
getNumberOfElements, getPageable, getSort, hasContent, isFirst, isLast, nextOrLastPageable, nextPageable, previousOrFirstPageable, previousPageable
Methods inherited from interface org.springframework.data.util.Streamable
and, and, and, and, filter, flatMap, get, isEmpty, stream, toList, toSet
-
Constructor Details
-
LucenePage
public LucenePage(ProjectingLuceneAccessor template, org.apache.geode.cache.lucene.PageableLuceneQueryResults<K, V> queryResults, int pageSize, Class<T> projectionType) Deprecated.Constructs a new instance ofLucenePage
initialized with the givenLucene query results
,page size
andprojection type
. Theprevious page
is set to null.- Parameters:
template
-ProjectingLuceneAccessor
used to perform Lucene queries and data access operations along with projections.queryResults
-PageableLuceneQueryResults
wrapped by thisLucenePage
.pageSize
- number of elements on aLucenePage
.projectionType
-Class
type of the projection used to view an individualLuceneResultStruct
in theLucene query results
.- Throws:
IllegalArgumentException
- ifProjectingLuceneAccessor
or thePageableLuceneQueryResults
are null, or thePageableLuceneQueryResults
do not have anext page
.- See Also:
-
LucenePage
public LucenePage(ProjectingLuceneAccessor template, org.apache.geode.cache.lucene.PageableLuceneQueryResults<K, V> queryResults, int pageSize, Class<T> projectionType, LucenePage<T, K, V> previous) Deprecated.Constructs a new instance ofLucenePage
initialized with the givenLucene query results
,page size
,projection type
andprevious page
, if one exists.- Parameters:
template
-ProjectingLuceneAccessor
used to perform Lucene queries and data access operations along with projections.queryResults
-PageableLuceneQueryResults
wrapped by thisLucenePage
.pageSize
- number of elements on aLucenePage
.projectionType
-Class
type of the projection used to view an individualLuceneResultStruct
in theLucene query results
.previous
-previous page
in the chain ofpages
, if thisLucenePage
is not the firstLucenePage
. Can be null.- Throws:
IllegalArgumentException
- ifProjectingLuceneAccessor
or thePageableLuceneQueryResults
are null, or thePageableLuceneQueryResults
do not have anext page
.- See Also:
-
-
Method Details
-
newLucenePage
public static <T,K, LucenePage<T,V> K, newLucenePageV> (ProjectingLuceneAccessor template, org.apache.geode.cache.lucene.PageableLuceneQueryResults<K, V> queryResults, int pageSize, Class<T> projectionType) Deprecated.Factory method used to construct a new instance ofLucenePage
initialized with the givenLucene query results
,page size
, andprojection type
. Theprevious page
is set to null.- Parameters:
template
-ProjectingLuceneAccessor
used to perform Lucene queries and data access operations along with projections.queryResults
-PageableLuceneQueryResults
wrapped by thisLucenePage
.pageSize
- number of elements on aLucenePage
.projectionType
-Class
type of the projection used to view an individualLuceneResultStruct
in theLucene query results
.- Throws:
IllegalArgumentException
- ifProjectingLuceneAccessor
or thePageableLuceneQueryResults
are null, or thePageableLuceneQueryResults
do not have anext page
.- See Also:
-
newLucenePage
public static <T,K, LucenePage<T,V> K, newLucenePageV> (ProjectingLuceneAccessor template, org.apache.geode.cache.lucene.PageableLuceneQueryResults<K, V> queryResults, int pageSize, Class<T> projectionType, LucenePage<T, K, V> previousPage) Deprecated.Factory method used to construct a new instance ofLucenePage
initialized with the givenLucene query results
,page size
,projection type
andprevious page
, if one exists.- Parameters:
template
-ProjectingLuceneAccessor
used to perform Lucene queries and data access operations along with projections.queryResults
-PageableLuceneQueryResults
wrapped by thisLucenePage
.pageSize
- number of elements on aLucenePage
.projectionType
-Class
type of the projection used to view an individualLuceneResultStruct
in theLucene query results
.previousPage
-previous page
in the chain ofpages
, if thisLucenePage
is not the firstLucenePage
. Can be null.- Throws:
IllegalArgumentException
- ifProjectingLuceneAccessor
or thePageableLuceneQueryResults
are null, or thePageableLuceneQueryResults
do not have anext page
.- See Also:
-
materialize
protected List<T> materialize(ProjectingLuceneAccessor template, List<org.apache.geode.cache.lucene.LuceneResultStruct<K, V>> pageOfQueryResults, Class<T> projectionType) Deprecated.- Parameters:
template
-ProjectingLuceneAccessor
used to project the desired values from theList
ofLuceneResultStruct
objects.pageOfQueryResults
- Lucene query results captured in theList
ofLuceneResultStruct
objects.projectionType
-Class
type to project theLuceneResultStruct
objects as.- Returns:
- a
List
of projected values of the givenprojection type
. - See Also:
-
LuceneResultStruct
-
getPageSize
protected int getPageSize()Deprecated.Returns the number of elements perpage
.- Returns:
- an integer value indicating the number of elements on a
page
.
-
getProjectionType
Deprecated.Returns theClass
type of the projection.- Returns:
- a
Class
specifying the projection type.
-
getQueryResults
Deprecated.Returns theLucene query results
backing thisLucenePage
.- Returns:
- a reference to the
PageableLuceneQueryResults
backing thisLucenePage
. - See Also:
-
LucenePage
PageableLuceneQueryResults
-
getTemplate
Deprecated.Returns theProjectingLuceneAccessor
used by thisLucenePage
to perform Lucene data access operations and projections.- Returns:
- the
ProjectingLuceneAccessor
used by thisLucenePage
to perform Lucene data access operations and projections. - See Also:
-
hasNext
public boolean hasNext()Deprecated.- Specified by:
hasNext
in interfaceorg.springframework.data.domain.Slice<T>
- Overrides:
hasNext
in classAbstractSliceSupport<T>
-
hasPrevious
public boolean hasPrevious()Deprecated.- Specified by:
hasPrevious
in interfaceorg.springframework.data.domain.Slice<T>
- Overrides:
hasPrevious
in classAbstractSliceSupport<T>
-
getContent
Deprecated.- Specified by:
getContent
in interfaceorg.springframework.data.domain.Slice<T>
- Overrides:
getContent
in classAbstractSliceSupport<T>
-
getNext
Deprecated.Null-safe method to return the nextpage
in the collection ofpages
.- Returns:
- the next
page
in the collection ofpages
. - Throws:
IllegalStateException
- if no morepages
exist beyond thispage
.- See Also:
-
getNumber
public int getNumber()Deprecated.- Specified by:
getNumber
in interfaceorg.springframework.data.domain.Slice<T>
- Overrides:
getNumber
in classAbstractSliceSupport<T>
-
getPrevious
Deprecated.Returns the previouspage
in the collection ofpages
.- Returns:
- the previous
page
in the collection ofpages
or null if noLucenePage
proceeds thispage
. - See Also:
-
getSize
public int getSize()Deprecated.- Specified by:
getSize
in interfaceorg.springframework.data.domain.Slice<T>
- Overrides:
getSize
in classAbstractSliceSupport<T>
-
getTotalElements
public long getTotalElements()Deprecated.- Specified by:
getTotalElements
in interfaceorg.springframework.data.domain.Page<T>
- Overrides:
getTotalElements
in classAbstractPageSupport<T>
-
getTotalPages
public int getTotalPages()Deprecated.- Specified by:
getTotalPages
in interfaceorg.springframework.data.domain.Page<T>
- Overrides:
getTotalPages
in classAbstractPageSupport<T>
-
map
Deprecated.
-