Spring Data for VMware GemFire
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:
-
ListLuceneResultStructPageableLuceneQueryResultsPageAbstractPageSupportProjectingLuceneAccessor
-
Constructor Summary
ConstructorsConstructorDescriptionLucenePage(ProjectingLuceneAccessor template, org.apache.geode.cache.lucene.PageableLuceneQueryResults<K, V> queryResults, int pageSize, Class<T> projectionType) Deprecated.Constructs a new instance ofLucenePageinitialized with the givenLucene query results,page sizeandprojection 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 ofLucenePageinitialized with the givenLucene query results,page size,projection typeandprevious page, if one exists. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.LucenePage<T,K, V> getNext()Deprecated.Null-safe method to return the nextpagein the collection ofpages.intDeprecated.protected intDeprecated.Returns the number of elements perpage.LucenePage<T,K, V> Deprecated.Returns the previouspagein the collection ofpages.Deprecated.Returns theClasstype of the projection.Deprecated.Returns theLucene query resultsbacking thisLucenePage.intgetSize()Deprecated.protected ProjectingLuceneAccessorDeprecated.Returns theProjectingLuceneAccessorused by thisLucenePageto perform Lucene data access operations and projections.longDeprecated.intDeprecated.booleanhasNext()Deprecated.booleanDeprecated.<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 ofLucenePageinitialized 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 ofLucenePageinitialized with the givenLucene query results,page size,projection typeandprevious page, if one exists.Methods inherited from class org.springframework.data.gemfire.domain.support.AbstractSliceSupport
getNumberOfElements, getSort, hasContent, isFirst, isLast, iterator, nextPageable, previousPageableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.springframework.data.domain.Slice
getNumberOfElements, getPageable, getSort, hasContent, isFirst, isLast, nextOrLastPageable, nextPageable, previousOrFirstPageable, previousPageableMethods 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 ofLucenePageinitialized with the givenLucene query results,page sizeandprojection type. Theprevious pageis set to null.- Parameters:
template-ProjectingLuceneAccessorused to perform Lucene queries and data access operations along with projections.queryResults-PageableLuceneQueryResultswrapped by thisLucenePage.pageSize- number of elements on aLucenePage.projectionType-Classtype of the projection used to view an individualLuceneResultStructin theLucene query results.- Throws:
IllegalArgumentException- ifProjectingLuceneAccessoror thePageableLuceneQueryResultsare null, or thePageableLuceneQueryResultsdo 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 ofLucenePageinitialized with the givenLucene query results,page size,projection typeandprevious page, if one exists.- Parameters:
template-ProjectingLuceneAccessorused to perform Lucene queries and data access operations along with projections.queryResults-PageableLuceneQueryResultswrapped by thisLucenePage.pageSize- number of elements on aLucenePage.projectionType-Classtype of the projection used to view an individualLuceneResultStructin theLucene query results.previous-previous pagein the chain ofpages, if thisLucenePageis not the firstLucenePage. Can be null.- Throws:
IllegalArgumentException- ifProjectingLuceneAccessoror thePageableLuceneQueryResultsare null, or thePageableLuceneQueryResultsdo 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 ofLucenePageinitialized with the givenLucene query results,page size, andprojection type. Theprevious pageis set to null.- Parameters:
template-ProjectingLuceneAccessorused to perform Lucene queries and data access operations along with projections.queryResults-PageableLuceneQueryResultswrapped by thisLucenePage.pageSize- number of elements on aLucenePage.projectionType-Classtype of the projection used to view an individualLuceneResultStructin theLucene query results.- Throws:
IllegalArgumentException- ifProjectingLuceneAccessoror thePageableLuceneQueryResultsare null, or thePageableLuceneQueryResultsdo 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 ofLucenePageinitialized with the givenLucene query results,page size,projection typeandprevious page, if one exists.- Parameters:
template-ProjectingLuceneAccessorused to perform Lucene queries and data access operations along with projections.queryResults-PageableLuceneQueryResultswrapped by thisLucenePage.pageSize- number of elements on aLucenePage.projectionType-Classtype of the projection used to view an individualLuceneResultStructin theLucene query results.previousPage-previous pagein the chain ofpages, if thisLucenePageis not the firstLucenePage. Can be null.- Throws:
IllegalArgumentException- ifProjectingLuceneAccessoror thePageableLuceneQueryResultsare null, or thePageableLuceneQueryResultsdo 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-ProjectingLuceneAccessorused to project the desired values from theListofLuceneResultStructobjects.pageOfQueryResults- Lucene query results captured in theListofLuceneResultStructobjects.projectionType-Classtype to project theLuceneResultStructobjects as.- Returns:
- a
Listof 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 theClasstype of the projection.- Returns:
- a
Classspecifying the projection type.
-
getQueryResults
Deprecated.Returns theLucene query resultsbacking thisLucenePage.- Returns:
- a reference to the
PageableLuceneQueryResultsbacking thisLucenePage. - See Also:
-
LucenePagePageableLuceneQueryResults
-
getTemplate
Deprecated.Returns theProjectingLuceneAccessorused by thisLucenePageto perform Lucene data access operations and projections.- Returns:
- the
ProjectingLuceneAccessorused by thisLucenePageto perform Lucene data access operations and projections. - See Also:
-
hasNext
public boolean hasNext()Deprecated.- Specified by:
hasNextin interfaceorg.springframework.data.domain.Slice<T>- Overrides:
hasNextin classAbstractSliceSupport<T>
-
hasPrevious
public boolean hasPrevious()Deprecated.- Specified by:
hasPreviousin interfaceorg.springframework.data.domain.Slice<T>- Overrides:
hasPreviousin classAbstractSliceSupport<T>
-
getContent
Deprecated.- Specified by:
getContentin interfaceorg.springframework.data.domain.Slice<T>- Overrides:
getContentin classAbstractSliceSupport<T>
-
getNext
Deprecated.Null-safe method to return the nextpagein the collection ofpages.- Returns:
- the next
pagein the collection ofpages. - Throws:
IllegalStateException- if no morepagesexist beyond thispage.- See Also:
-
getNumber
public int getNumber()Deprecated.- Specified by:
getNumberin interfaceorg.springframework.data.domain.Slice<T>- Overrides:
getNumberin classAbstractSliceSupport<T>
-
getPrevious
Deprecated.Returns the previouspagein the collection ofpages.- Returns:
- the previous
pagein the collection ofpagesor null if noLucenePageproceeds thispage. - See Also:
-
getSize
public int getSize()Deprecated.- Specified by:
getSizein interfaceorg.springframework.data.domain.Slice<T>- Overrides:
getSizein classAbstractSliceSupport<T>
-
getTotalElements
public long getTotalElements()Deprecated.- Specified by:
getTotalElementsin interfaceorg.springframework.data.domain.Page<T>- Overrides:
getTotalElementsin classAbstractPageSupport<T>
-
getTotalPages
public int getTotalPages()Deprecated.- Specified by:
getTotalPagesin interfaceorg.springframework.data.domain.Page<T>- Overrides:
getTotalPagesin classAbstractPageSupport<T>
-
map
Deprecated.
-