org.hibernate.search.filter.impl
Class ChainedFilter

java.lang.Object
  extended by org.apache.lucene.search.Filter
      extended by org.hibernate.search.filter.impl.ChainedFilter
All Implemented Interfaces:
Serializable

public class ChainedFilter
extends org.apache.lucene.search.Filter

A Filter capable of chaining other filters, so that it's possible to apply several filters on a Query.

The resulting filter will only enable result Documents if no filter removed it.

Author:
Emmanuel Bernard, Sanne Grinovero, Hardy Ferentschik
See Also:
Serialized Form

Constructor Summary
ChainedFilter()
           
 
Method Summary
 void addFilter(org.apache.lucene.search.Filter filter)
          Add the specified filter to the chain of filters
 org.apache.lucene.search.DocIdSet getDocIdSet(org.apache.lucene.index.IndexReader reader)
           
 boolean isEmpty()
           
 boolean removeFilter(org.apache.lucene.search.Filter filter)
          Returns the specified filter from the current filter chain.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChainedFilter

public ChainedFilter()
Method Detail

addFilter

public void addFilter(org.apache.lucene.search.Filter filter)
Add the specified filter to the chain of filters

Parameters:
filter - the filter to add to the filter chain. Cannot be null.

removeFilter

public boolean removeFilter(org.apache.lucene.search.Filter filter)
Returns the specified filter from the current filter chain.

Parameters:
filter - the filter to remove form the chaim
Returns:
true if this chained filter contained the specified filter, false otherwise.

isEmpty

public boolean isEmpty()

getDocIdSet

public org.apache.lucene.search.DocIdSet getDocIdSet(org.apache.lucene.index.IndexReader reader)
                                              throws IOException
Specified by:
getDocIdSet in class org.apache.lucene.search.Filter
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved