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
.
-
-
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
-
-
-
-
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.
-
-