com.endeca.portal.data.functions
Class RangeFilter

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.RangeFilter
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class RangeFilter
extends QueryFilter

This filter class allows range filters to be added to QueryState instances. Currently, only supported on ENE presentation API data sources, not discovery service data sources.

Author:
wfleming
See Also:
Serialized Form

Nested Class Summary
static class RangeFilter.RangeFilterCreationException
           
static class RangeFilter.RangeOperator
           
static class RangeFilter.RangeOperatorNotSupportedException
           
static class RangeFilter.RangeType
           
static class RangeFilter.RangeTypeNotSupportedException
           
 
Field Summary
 
Fields inherited from class com.endeca.portal.data.functions.QueryFunction
CLASS_PROPERTY, operator
 
Constructor Summary
protected RangeFilter()
           
  RangeFilter(org.json.JSONObject jsonObject)
           
  RangeFilter(java.lang.String property, RangeFilter.RangeType rangeType, RangeFilter.RangeOperator rangeOperator, java.lang.String value1)
           
  RangeFilter(java.lang.String property, RangeFilter.RangeType rangeType, RangeFilter.RangeOperator rangeOperator, java.lang.String value1, java.lang.String value2)
           
  RangeFilter(java.lang.String property, RangeFilter.RangeType rangeType, RangeFilter.RangeOperator rangeOperator, java.lang.String value1, java.lang.String value2, java.lang.String value3)
           
 
Method Summary
 void applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request query)
          Apply this function to a Request.
 void applyToENEQuery(com.endeca.navigation.ENEQuery query)
          Apply this function to an ENEQuery.
 java.util.List<java.lang.reflect.Method> getGetters()
          Return the list of property getters on this function.
 java.lang.String getProperty()
           
 RangeFilter.RangeOperator getRangeOperator()
           
 RangeFilter.RangeType getRangeType()
           
 java.util.List<java.lang.reflect.Method> getSetters()
          Return the list of property setters on this function.
 java.lang.String getValue1()
           
 java.lang.String getValue2()
           
 java.lang.String getValue3()
           
 void setProperty(java.lang.String property)
           
 void setRangeOperator(RangeFilter.RangeOperator rangeOperator)
           
 void setRangeOperator(java.lang.String rangeOperator)
           
 void setRangeType(RangeFilter.RangeType rangeType)
           
 void setRangeType(java.lang.String rangeType)
           
 void setValue1(java.lang.String value1)
           
 void setValue2(java.lang.String value2)
           
 void setValue3(java.lang.String value3)
           
 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
clone, equals, equals, getInstance, getInstance, getName, getOperator, hashCode, init, setName, setOperator, setOperator, toJSON, toXML
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RangeFilter

protected RangeFilter()

RangeFilter

public RangeFilter(org.json.JSONObject jsonObject)
            throws org.json.JSONException,
                   java.lang.IllegalArgumentException,
                   java.lang.ClassNotFoundException,
                   java.lang.IllegalAccessException,
                   java.lang.InstantiationException,
                   java.lang.reflect.InvocationTargetException
Throws:
org.json.JSONException
java.lang.IllegalArgumentException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.reflect.InvocationTargetException

RangeFilter

public RangeFilter(java.lang.String property,
                   RangeFilter.RangeType rangeType,
                   RangeFilter.RangeOperator rangeOperator,
                   java.lang.String value1)
            throws RangeFilter.RangeFilterCreationException
Throws:
RangeFilter.RangeFilterCreationException

RangeFilter

public RangeFilter(java.lang.String property,
                   RangeFilter.RangeType rangeType,
                   RangeFilter.RangeOperator rangeOperator,
                   java.lang.String value1,
                   java.lang.String value2)
            throws RangeFilter.RangeFilterCreationException
Throws:
RangeFilter.RangeFilterCreationException

RangeFilter

public RangeFilter(java.lang.String property,
                   RangeFilter.RangeType rangeType,
                   RangeFilter.RangeOperator rangeOperator,
                   java.lang.String value1,
                   java.lang.String value2,
                   java.lang.String value3)
            throws RangeFilter.RangeFilterCreationException
Throws:
RangeFilter.RangeFilterCreationException
Method Detail

getProperty

public java.lang.String getProperty()

setProperty

public void setProperty(java.lang.String property)

getRangeType

public RangeFilter.RangeType getRangeType()

setRangeType

public void setRangeType(RangeFilter.RangeType rangeType)

setRangeType

public void setRangeType(java.lang.String rangeType)
                  throws RangeFilter.RangeTypeNotSupportedException
Throws:
RangeFilter.RangeTypeNotSupportedException

getRangeOperator

public RangeFilter.RangeOperator getRangeOperator()

setRangeOperator

public void setRangeOperator(RangeFilter.RangeOperator rangeOperator)

setRangeOperator

public void setRangeOperator(java.lang.String rangeOperator)
                      throws RangeFilter.RangeOperatorNotSupportedException
Throws:
RangeFilter.RangeOperatorNotSupportedException

getValue1

public java.lang.String getValue1()

setValue1

public void setValue1(java.lang.String value1)

getValue2

public java.lang.String getValue2()

setValue2

public void setValue2(java.lang.String value2)

getValue3

public java.lang.String getValue3()

setValue3

public void setValue3(java.lang.String value3)

getSetters

public java.util.List<java.lang.reflect.Method> getSetters()
Description copied from class: QueryFunction
Return the list of property setters on this function. Must be implemented by subclass. Required for correct JSON serialization/deserialization support. For most subclasses, implementing this method should be simple, as long as your setter methods follow standard Java naming conventions (e.g. "setPropertyName(PropertyType)"). All you should need to write is:
 private static List setters = Reflection.getSetters(MyFunctionClass.class);
 \@Override
 public List getSetters() {
        return setters;
 }
 

Specified by:
getSetters in class QueryFunction
Returns:
the list of setters

getGetters

public java.util.List<java.lang.reflect.Method> getGetters()
Description copied from class: QueryFunction
Return the list of property getters on this function. Must be implemented by subclass. Required for correct JSON serialization/deserialization support. For most subclasses, implementing this method should be simple, as long as your getter methods follow standard Java naming conventions (e.g. "getPropertyName()"). All you should need to write is:
 private static List getters = Reflection.getGetters(MyFunctionClass.class);
 \@Override
 public List getGetters() {
        return getters;
 }
 

Specified by:
getGetters in class QueryFunction
Returns:
the list of getters

applyToENEQuery

public void applyToENEQuery(com.endeca.navigation.ENEQuery query)
Description copied from class: QueryFunction
Apply this function to an ENEQuery. Must be implemented by subclass.

Specified by:
applyToENEQuery in class QueryFunction

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