com.endeca.portal.data.functions
Class RecordFilter

java.lang.Object
  extended by com.endeca.portal.data.functions.QueryFunction
      extended by com.endeca.portal.data.functions.QueryFilter
          extended by com.endeca.portal.data.functions.RecordFilter
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class RecordFilter
extends QueryFilter

Permits adding a record filter to a QueryState. Currently, only supported on ENE presentation API data sources, not discovery service data sources.

Author:
wfleming
See Also:
Serialized Form

Field Summary
protected  java.lang.String recordFilter
           
 
Fields inherited from class com.endeca.portal.data.functions.QueryFunction
CLASS_PROPERTY
 
Constructor Summary
protected RecordFilter()
           
  RecordFilter(java.lang.String recordFilter)
           
  RecordFilter(java.lang.String name, java.lang.String recordFilter)
           
 
Method Summary
static RecordFilter andAll(java.util.Collection<RecordFilter> filters)
          Takes a collection of RecordFilters and computes the logical conjunction: AND(filter1, filter2, ...)
static RecordFilter andAll(java.lang.String... filters)
          Logical conjunction of filters in string-form.
 void applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request query)
          Apply this function to a Request.
 java.lang.String getRecordFilter()
           
static RecordFilter orAll(java.util.Collection<RecordFilter> filters)
          Takes a collection of RecordFilters and computes the logical disjunction: OR(filter1, filter2, ...)
static RecordFilter orAll(java.lang.String... filters)
          Logical disjunction of filters in string-form.
 void setName(java.lang.String name)
          Set the name.
 void setRecordFilter(java.lang.String recordFilter)
           
 java.lang.String toString()
          This class' toString is abstract: all concrete subclasses are expected to provide an implementation. toString is used in comparing QueryFunction instances for equality, so if you implement a QueryFunction subclass it is important that your toString implementation be consistent and deterministic.
 
Methods inherited from class com.endeca.portal.data.functions.QueryFunction
beforeQueryStateAdd, clone, equals, equals, getName, hashCode, initializeFromJSON
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

recordFilter

protected java.lang.String recordFilter
Constructor Detail

RecordFilter

protected RecordFilter()

RecordFilter

public RecordFilter(java.lang.String recordFilter)

RecordFilter

public RecordFilter(java.lang.String name,
                    java.lang.String recordFilter)
Method Detail

getRecordFilter

public java.lang.String getRecordFilter()

setRecordFilter

public void setRecordFilter(java.lang.String recordFilter)

setName

public void setName(java.lang.String name)
Description copied from class: QueryFunction
Set the name.

Overrides:
setName in class QueryFunction
Parameters:
name - the name to set

applyToDiscoveryServiceQuery

public void applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request query)
                                  throws QueryFunctionUnsupportedException
Description copied from class: QueryFunction
Apply this function to a Request. Must be implemented by subclass.

Specified by:
applyToDiscoveryServiceQuery in class QueryFunction
Throws:
QueryFunctionUnsupportedException

toString

public java.lang.String toString()
Description copied from class: QueryFunction
This class' toString is abstract: all concrete subclasses are expected to provide an implementation. toString is used in comparing QueryFunction instances for equality, so if you implement a QueryFunction subclass it is important that your toString implementation be consistent and deterministic.

Specified by:
toString in class QueryFunction

andAll

public static RecordFilter andAll(java.util.Collection<RecordFilter> filters)
Takes a collection of RecordFilters and computes the logical conjunction: AND(filter1, filter2, ...) and returns it as a new RecordFilter. The returned filter is a new instance and isolated from any changes to the input filter instances. In the trivial cases:

Parameters:
filters - the filters to AND together
Returns:
a new filter as the conjunction of the input filters, or null if no filters were supplied
See Also:
orAll(Collection)

andAll

public static RecordFilter andAll(java.lang.String... filters)
Logical conjunction of filters in string-form.

See Also:
andAll(Collection)

orAll

public static RecordFilter orAll(java.util.Collection<RecordFilter> filters)
Takes a collection of RecordFilters and computes the logical disjunction: OR(filter1, filter2, ...) and returns it as a new RecordFilter. The returned filter is a new instance and isolated from any changes to the input filter instances. In the trivial cases:

Parameters:
filters - the filters to OR together
Returns:
a new filter as the disjunction of the input filters, or null if no filters were supplied
See Also:
andAll(Collection)

orAll

public static RecordFilter orAll(java.lang.String... filters)
Logical disjunction of filters in string-form.

See Also:
orAll(Collection)