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 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(Filter filter)
          Add the specified filter to the chain of filters
 DocIdSet getDocIdSet(IndexReader reader)
           
 boolean isEmpty()
           
 boolean removeFilter(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(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(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 DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Specified by:
getDocIdSet in class Filter
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2013 Red Hat, Inc. All Rights Reserved