Package org.ametys.cms.search.solr
Class SolrResponseIterable<A extends AmetysObject>
- java.lang.Object
-
- org.ametys.cms.search.solr.SolrResponseIterable<A>
-
- Type Parameters:
A
- the actual type ofAmetysObject
s.
- All Implemented Interfaces:
Iterable<SearchResult<A>>
,SearchResultsIterable<SearchResult<A>>
public class SolrResponseIterable<A extends AmetysObject> extends Object implements SearchResultsIterable<SearchResult<A>>
AmetysObjectIterable
backed by a solrQueryResponse
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
SolrResponseIterable.SolrResponseIterator<AO extends AmetysObject>
-
Field Summary
Fields Modifier and Type Field Description (package private) static org.slf4j.Logger
__LOGGER
private org.apache.solr.common.SolrDocumentList
_docList
private SolrResponseIterable.SolrResponseIterator
_lastIterator
(package private) AmetysObjectResolver
_resolver
-
Constructor Summary
Constructors Constructor Description SolrResponseIterable(org.apache.solr.common.SolrDocumentList docList, AmetysObjectResolver resolver)
Build a SolrResponseIterable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getSize()
Returns the number of elements in this iterable.SearchResultsIterator<SearchResult<A>>
iterator()
-
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, spliterator
-
-
-
-
Field Detail
-
__LOGGER
static final org.slf4j.Logger __LOGGER
-
_resolver
AmetysObjectResolver _resolver
-
_docList
private org.apache.solr.common.SolrDocumentList _docList
-
_lastIterator
private SolrResponseIterable.SolrResponseIterator _lastIterator
-
-
Constructor Detail
-
SolrResponseIterable
public SolrResponseIterable(org.apache.solr.common.SolrDocumentList docList, AmetysObjectResolver resolver)
Build a SolrResponseIterable.- Parameters:
docList
- The solr response document list.resolver
- The Ametys object resolver.
-
-
Method Detail
-
iterator
public SearchResultsIterator<SearchResult<A>> iterator()
- Specified by:
iterator
in interfaceIterable<A extends AmetysObject>
- Specified by:
iterator
in interfaceSearchResultsIterable<A extends AmetysObject>
-
getSize
public long getSize()
Description copied from interface:SearchResultsIterable
Returns the number of elements in this iterable.- Specified by:
getSize
in interfaceSearchResultsIterable<A extends AmetysObject>
- Returns:
- the number of elements in this iterable.
-
-