public class LucenePage<T,K,V> extends AbstractPageSupport<T>
LucenePage class is a Spring Data Page implementation supporting Spring Data style paging
of PageableLuceneQueryResults complete with Spring Data projections.List,
LuceneResultStruct,
PageableLuceneQueryResults,
Page,
AbstractPageSupport,
ProjectingLuceneAccessor| Constructor and Description |
|---|
LucenePage(ProjectingLuceneAccessor template,
org.apache.geode.cache.lucene.PageableLuceneQueryResults<K,V> queryResults,
int pageSize,
java.lang.Class<T> projectionType)
Deprecated.
Constructs a new instance of
LucenePage initialized with
the given Lucene query results, page size
and projection type. |
LucenePage(ProjectingLuceneAccessor template,
org.apache.geode.cache.lucene.PageableLuceneQueryResults<K,V> queryResults,
int pageSize,
java.lang.Class<T> projectionType,
LucenePage<T,K,V> previous)
Deprecated.
Constructs a new instance of
LucenePage initialized with
the given Lucene query results, page size,
projection type and previous page, if one exists. |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<T> |
getContent()
Deprecated.
|
LucenePage<T,K,V> |
getNext()
Deprecated.
Null-safe method to return the next
page in the collection of pages. |
int |
getNumber()
Deprecated.
|
protected int |
getPageSize()
Deprecated.
Returns the number of elements per
page. |
LucenePage<T,K,V> |
getPrevious()
Deprecated.
Returns the previous
page in the collection of pages. |
protected java.lang.Class<T> |
getProjectionType()
Deprecated.
Returns the
Class type of the projection. |
protected org.apache.geode.cache.lucene.PageableLuceneQueryResults<K,V> |
getQueryResults()
Deprecated.
Returns the
Lucene query results backing this LucenePage. |
int |
getSize()
Deprecated.
|
protected ProjectingLuceneAccessor |
getTemplate()
Deprecated.
Returns the
ProjectingLuceneAccessor used by this LucenePage to perform
Lucene data access operations and projections. |
long |
getTotalElements()
Deprecated.
|
int |
getTotalPages()
Deprecated.
|
boolean |
hasNext()
Deprecated.
|
boolean |
hasPrevious()
Deprecated.
|
<S> org.springframework.data.domain.Page<S> |
map(java.util.function.Function<? super T,? extends S> converter)
Deprecated.
|
protected java.util.List<T> |
materialize(ProjectingLuceneAccessor template,
java.util.List<org.apache.geode.cache.lucene.LuceneResultStruct<K,V>> pageOfQueryResults,
java.lang.Class<T> projectionType)
Deprecated.
Renders the
List of LuceneResultStruct objects into projected values based on
the projection type. |
static <T,K,V> LucenePage<T,K,V> |
newLucenePage(ProjectingLuceneAccessor template,
org.apache.geode.cache.lucene.PageableLuceneQueryResults<K,V> queryResults,
int pageSize,
java.lang.Class<T> projectionType)
Deprecated.
Factory method used to construct a new instance of
LucenePage initialized with
the given Lucene query results, page size,
and projection type. |
static <T,K,V> LucenePage<T,K,V> |
newLucenePage(ProjectingLuceneAccessor template,
org.apache.geode.cache.lucene.PageableLuceneQueryResults<K,V> queryResults,
int pageSize,
java.lang.Class<T> projectionType,
LucenePage<T,K,V> previousPage)
Deprecated.
Factory method used to construct a new instance of
LucenePage initialized with
the given Lucene query results, page size,
projection type and previous page, if one exists. |
getNumberOfElements, getSort, hasContent, isFirst, isLast, iterator, nextPageable, previousPageableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNumberOfElements, getPageable, getSort, hasContent, isFirst, isLast, nextOrLastPageable, nextPageable, previousOrFirstPageable, previousPageablepublic LucenePage(ProjectingLuceneAccessor template, org.apache.geode.cache.lucene.PageableLuceneQueryResults<K,V> queryResults, int pageSize, java.lang.Class<T> projectionType)
LucenePage initialized with
the given Lucene query results, page size
and projection type.
The previous page is set to null.template - ProjectingLuceneAccessor used to perform Lucene queries and data access operations
along with projections.queryResults - PageableLuceneQueryResults wrapped by this LucenePage.pageSize - number of elements on a LucenePage.projectionType - Class type of the projection used to view an individual LuceneResultStruct
in the Lucene query results.java.lang.IllegalArgumentException - if ProjectingLuceneAccessor or the PageableLuceneQueryResults
are null, or the PageableLuceneQueryResults do not have
a next page.LucenePage(ProjectingLuceneAccessor, PageableLuceneQueryResults, int, Class, LucenePage)public LucenePage(ProjectingLuceneAccessor template, org.apache.geode.cache.lucene.PageableLuceneQueryResults<K,V> queryResults, int pageSize, java.lang.Class<T> projectionType, LucenePage<T,K,V> previous)
LucenePage initialized with
the given Lucene query results, page size,
projection type and previous page, if one exists.template - ProjectingLuceneAccessor used to perform Lucene queries and data access operations
along with projections.queryResults - PageableLuceneQueryResults wrapped by this LucenePage.pageSize - number of elements on a LucenePage.projectionType - Class type of the projection used to view an individual LuceneResultStruct
in the Lucene query results.previous - previous page in the chain of pages,
if this LucenePage is not the first LucenePage. Can be null.java.lang.IllegalArgumentException - if ProjectingLuceneAccessor or the PageableLuceneQueryResults
are null, or the PageableLuceneQueryResults do not have
a next page.materialize(ProjectingLuceneAccessor, List, Class)public static <T,K,V> LucenePage<T,K,V> newLucenePage(ProjectingLuceneAccessor template, org.apache.geode.cache.lucene.PageableLuceneQueryResults<K,V> queryResults, int pageSize, java.lang.Class<T> projectionType)
LucenePage initialized with
the given Lucene query results, page size,
and projection type.
The previous page is set to null.template - ProjectingLuceneAccessor used to perform Lucene queries and data access operations
along with projections.queryResults - PageableLuceneQueryResults wrapped by this LucenePage.pageSize - number of elements on a LucenePage.projectionType - Class type of the projection used to view an individual LuceneResultStruct
in the Lucene query results.java.lang.IllegalArgumentException - if ProjectingLuceneAccessor or the PageableLuceneQueryResults
are null, or the PageableLuceneQueryResults do not have
a next page.LucenePage(ProjectingLuceneAccessor, PageableLuceneQueryResults, int, Class)public static <T,K,V> LucenePage<T,K,V> newLucenePage(ProjectingLuceneAccessor template, org.apache.geode.cache.lucene.PageableLuceneQueryResults<K,V> queryResults, int pageSize, java.lang.Class<T> projectionType, LucenePage<T,K,V> previousPage)
LucenePage initialized with
the given Lucene query results, page size,
projection type and previous page, if one exists.template - ProjectingLuceneAccessor used to perform Lucene queries and data access operations
along with projections.queryResults - PageableLuceneQueryResults wrapped by this LucenePage.pageSize - number of elements on a LucenePage.projectionType - Class type of the projection used to view an individual LuceneResultStruct
in the Lucene query results.previousPage - previous page in the chain of pages,
if this LucenePage is not the first LucenePage. Can be null.java.lang.IllegalArgumentException - if ProjectingLuceneAccessor or the PageableLuceneQueryResults
are null, or the PageableLuceneQueryResults do not have
a next page.LucenePage(ProjectingLuceneAccessor, PageableLuceneQueryResults, int, Class, LucenePage)protected java.util.List<T> materialize(ProjectingLuceneAccessor template, java.util.List<org.apache.geode.cache.lucene.LuceneResultStruct<K,V>> pageOfQueryResults, java.lang.Class<T> projectionType)
List of LuceneResultStruct objects into projected values based on
the projection type.template - ProjectingLuceneAccessor used to project the desired values
from the List of LuceneResultStruct objects.pageOfQueryResults - Lucene query results captured in the List
of LuceneResultStruct objects.projectionType - Class type to project the LuceneResultStruct objects as.List of projected values of the given projection type.LuceneResultStructprotected int getPageSize()
page.page.protected java.lang.Class<T> getProjectionType()
Class type of the projection.Class specifying the projection type.protected org.apache.geode.cache.lucene.PageableLuceneQueryResults<K,V> getQueryResults()
Lucene query results backing this LucenePage.PageableLuceneQueryResults backing this LucenePage.LucenePage,
PageableLuceneQueryResultsprotected ProjectingLuceneAccessor getTemplate()
ProjectingLuceneAccessor used by this LucenePage to perform
Lucene data access operations and projections.ProjectingLuceneAccessor used by this LucenePage to perform
Lucene data access operations and projections.ProjectingLuceneAccessorpublic boolean hasNext()
hasNext in interface org.springframework.data.domain.Slice<T>hasNext in class AbstractSliceSupport<T>public boolean hasPrevious()
hasPrevious in interface org.springframework.data.domain.Slice<T>hasPrevious in class AbstractSliceSupport<T>public java.util.List<T> getContent()
getContent in interface org.springframework.data.domain.Slice<T>getContent in class AbstractSliceSupport<T>public LucenePage<T,K,V> getNext()
page in the collection of pages.page in the collection of pages.java.lang.IllegalStateException - if no more pages exist beyond this page.LucenePage,
getPrevious()public int getNumber()
getNumber in interface org.springframework.data.domain.Slice<T>getNumber in class AbstractSliceSupport<T>public LucenePage<T,K,V> getPrevious()
page in the collection of pages.page in the collection of pages
or null if no LucenePage proceeds this page.LucenePage,
getNext()public int getSize()
getSize in interface org.springframework.data.domain.Slice<T>getSize in class AbstractSliceSupport<T>public long getTotalElements()
getTotalElements in interface org.springframework.data.domain.Page<T>getTotalElements in class AbstractPageSupport<T>public int getTotalPages()
getTotalPages in interface org.springframework.data.domain.Page<T>getTotalPages in class AbstractPageSupport<T>public <S> org.springframework.data.domain.Page<S> map(java.util.function.Function<? super T,? extends S> converter)