org.apache.jackrabbit.core.query.lucene
Class FilterQueryHits

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.FilterQueryHits
All Implemented Interfaces:
CloseableHits, QueryHits

public class FilterQueryHits
extends Object
implements QueryHits

FilterQueryHits implements a QueryHits filter that forwards each call to the underlying query hits.


Constructor Summary
FilterQueryHits(QueryHits hits)
          Creates a new FilterQueryHits, which forwards each call to hits.
 
Method Summary
 void close()
          Releases resources held by this hits instance.
 int getSize()
          
 ScoreNode nextScoreNode()
          Returns the next score node in this QueryHits or null if there are no more score nodes.
 void skip(int n)
          Skips a n score nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterQueryHits

public FilterQueryHits(QueryHits hits)
Creates a new FilterQueryHits, which forwards each call to hits.

Parameters:
hits - the underlying query hits.
Method Detail

close

public void close()
           throws IOException
Releases resources held by this hits instance.

Specified by:
close in interface CloseableHits
Throws:
IOException - if an error occurs while releasing resources.

getSize

public int getSize()

Specified by:
getSize in interface CloseableHits
Returns:
the number of results or -1 if the size is unknown.

nextScoreNode

public ScoreNode nextScoreNode()
                        throws IOException
Returns the next score node in this QueryHits or null if there are no more score nodes.

Specified by:
nextScoreNode in interface QueryHits
Returns:
the next score node in this QueryHits.
Throws:
IOException - if an error occurs while reading from the index.

skip

public void skip(int n)
          throws IOException
Skips a n score nodes.

Specified by:
skip in interface CloseableHits
Parameters:
n - the number of score nodes to skip.
Throws:
IOException - if an error occurs while skipping.


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.