org.apache.jackrabbit.core.query.lucene
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
AbstractQueryHits
serves as a base class for QueryHits
implementations.
Method Summary |
void |
close()
This default implemetation does nothing. |
int |
getSize()
This default implementation returns -1 . |
void |
skip(int n)
Provides 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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractQueryHits
public AbstractQueryHits()
close
public void close()
throws IOException
- This default implemetation does nothing.
- Specified by:
close
in interface CloseableHits
- Throws:
IOException
- if an error occurs while releasing resources.
skip
public void skip(int n)
throws IOException
- Provides 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:
skip
in interface CloseableHits
- 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:
getSize
in interface CloseableHits
- Returns:
-1
.
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.