Class AbstractQueryHits
- java.lang.Object
-
- org.apache.jackrabbit.core.query.lucene.AbstractQueryHits
-
- All Implemented Interfaces:
CloseableHits,QueryHits
- Direct Known Subclasses:
ChildNodesQueryHits,DefaultQueryHits,NodeTraversingQueryHits,SortedLuceneQueryHits
public abstract class AbstractQueryHits extends Object implements QueryHits
AbstractQueryHitsserves as a base class forQueryHitsimplementations.
-
-
Constructor Summary
Constructors Constructor Description AbstractQueryHits()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()This default implementation does nothing.intgetSize()This default implementation returns-1.voidskip(int n)Provides a default implementation:-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.core.query.lucene.QueryHits
nextScoreNode
-
-
-
-
Method Detail
-
close
public void close() throws IOExceptionThis default implementation does nothing.- Specified by:
closein interfaceCloseableHits- Throws:
IOException- if an error occurs while releasing resources.
-
skip
public void skip(int n) throws IOExceptionProvides a default implementation:while (n-- > 0) { if (nextScoreNode() == null) { return; } }Sub classes may overwrite this method and implement are more efficient way to skip hits.- Specified by:
skipin interfaceCloseableHits- Parameters:
n- the number of hits to skip.- Throws:
IOException- if an error occurs while skipping.
-
getSize
public int getSize()
This default implementation returns-1.- Specified by:
getSizein interfaceCloseableHits- Returns:
-1.
-
-