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.LQLFilter
              extended by com.endeca.portal.data.functions.RangeFilter
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
GeoFilter

public class RangeFilter
extends LQLFilter

This filter class allows range filters to be added to QueryState instances. Currently supported on: ENE presentation API data sources Discovery service data sources.

Author:
Endeca Technologies, Inc.
See Also:
Serialized Form

Nested Class Summary
static class RangeFilter.RangeFilterCreationException
          This exception is thrown when a RangeFilter could not be created
static class RangeFilter.RangeOperator
          Specifies the operator used in this RangeFilter Valid RangeOperators are LT: Less than LTEQ: Less than or equal to GT: Greater than GTEQ: Greater than or equal to BTWN: Between (inclusive) GCLT: Geocode less than (non-inclusive) GCGT: Geocode greater than (non-inclusive) CGBTWN: Geocode beween (inclusive)
static class RangeFilter.RangeOperatorNotSupportedException
          This exception is thrown when an invalid RangeFilter.RangeOperator is present in a RangeFilter.
static class RangeFilter.RangeType
          Specifies the type of RangeFilter
static class RangeFilter.RangeTypeNotSupportedException
          This exception is thrown when an invalid RangeFilter.RangeType is present in a RangeFilter.
 
Field Summary
 
Fields inherited from class com.endeca.portal.data.functions.QueryFunction
CLASS_PROPERTY
 
Constructor Summary
protected RangeFilter()
           
  RangeFilter(java.lang.String attributeKey, RangeFilter.RangeType rangeType, RangeFilter.RangeOperator rangeOperator, java.lang.String value1)
          Constructs a RangeFilter
  RangeFilter(java.lang.String attributeKey, RangeFilter.RangeType rangeType, RangeFilter.RangeOperator rangeOperator, java.lang.String value1, java.lang.String value2)
          Constructs a RangeFilter
  RangeFilter(java.lang.String attributeKey, RangeFilter.RangeType rangeType, RangeFilter.RangeOperator rangeOperator, java.lang.String value1, java.lang.String value2, java.lang.String value3)
          Constructs a RangeFilter
 
Method Summary
 void applyToLQLFilter(LQLFilterCollection exprCollection)
          Adds the LQL filtering clause (aka fragment) produced by this class to the list of all fragments to be applied in order to generate the QueryState.
 java.lang.String getAttributeKey()
           
 java.lang.String getProperty()
          Deprecated. As of Latitude 2.1, replaced by getAttributeKey()
 RangeFilter.RangeOperator getRangeOperator()
           
 RangeFilter.RangeType getRangeType()
           
 java.lang.String getValue1()
           
 java.lang.String getValue2()
           
 java.lang.String getValue3()
           
 void setAttributeKey(java.lang.String attributeKey)
           
 void setProperty(java.lang.String property)
          Deprecated. As of Latitude 2.1, replaced by setAttributeKey(String)
 void setRangeOperator(RangeFilter.RangeOperator rangeOperator)
           
 void setRangeType(RangeFilter.RangeType rangeType)
           
 void setValue1(java.lang.String value1)
           
 void setValue2(java.lang.String value2)
           
 void setValue3(java.lang.String value3)
           
 java.lang.String toString()
          Creates a string representation of the RangeFilter
 
Methods inherited from class com.endeca.portal.data.functions.LQLFilter
applyToDiscoveryServiceQuery
 
Methods inherited from class com.endeca.portal.data.functions.QueryFunction
beforeQueryStateAdd, clone, equals, equals, getName, hashCode, initializeFromJSON, setName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RangeFilter

protected RangeFilter()

RangeFilter

public RangeFilter(java.lang.String attributeKey,
                   RangeFilter.RangeType rangeType,
                   RangeFilter.RangeOperator rangeOperator,
                   java.lang.String value1)
            throws RangeFilter.RangeFilterCreationException
Constructs a RangeFilter

Parameters:
attributeKey - on which the range filter will operate
rangeType -
rangeOperator -
value1 -
Throws:
RangeFilter.RangeFilterCreationException

RangeFilter

public RangeFilter(java.lang.String attributeKey,
                   RangeFilter.RangeType rangeType,
                   RangeFilter.RangeOperator rangeOperator,
                   java.lang.String value1,
                   java.lang.String value2)
            throws RangeFilter.RangeFilterCreationException
Constructs a RangeFilter

Parameters:
attributeKey -
rangeType -
rangeOperator -
value1 -
value2 -
Throws:
RangeFilter.RangeFilterCreationException

RangeFilter

public RangeFilter(java.lang.String attributeKey,
                   RangeFilter.RangeType rangeType,
                   RangeFilter.RangeOperator rangeOperator,
                   java.lang.String value1,
                   java.lang.String value2,
                   java.lang.String value3)
            throws RangeFilter.RangeFilterCreationException
Constructs a RangeFilter

Parameters:
attributeKey -
rangeType -
rangeOperator -
value1 -
value2 -
value3 -
Throws:
RangeFilter.RangeFilterCreationException
Method Detail

getAttributeKey

public java.lang.String getAttributeKey()
Returns:
attributeKey on which this RangeFilter operates

setAttributeKey

public void setAttributeKey(java.lang.String attributeKey)
Parameters:
attributeKey - on which this RangeFilter operates

getProperty

@Deprecated
public java.lang.String getProperty()
Deprecated. As of Latitude 2.1, replaced by getAttributeKey()

Returns:
property on which this RangeFilter operates

setProperty

@Deprecated
public void setProperty(java.lang.String property)
Deprecated. As of Latitude 2.1, replaced by setAttributeKey(String)

Parameters:
property - on which this RangeFilter operates

getRangeType

public RangeFilter.RangeType getRangeType()
Returns:
RangeFilter.RangeType of this RangeFilter

setRangeType

public void setRangeType(RangeFilter.RangeType rangeType)
Parameters:
rangeType - the RangeFilter.RangeType of this RangeFilter

getRangeOperator

public RangeFilter.RangeOperator getRangeOperator()
Returns:
RangeFilter.RangeOperator associated with this RangeFilter

setRangeOperator

public void setRangeOperator(RangeFilter.RangeOperator rangeOperator)
Parameters:
rangeOperator - associated with this RangeFilter

getValue1

public java.lang.String getValue1()
Returns:
value1

setValue1

public void setValue1(java.lang.String value1)
Parameters:
value1 -

getValue2

public java.lang.String getValue2()
Returns:
value2

setValue2

public void setValue2(java.lang.String value2)
Parameters:
value2 -

getValue3

public java.lang.String getValue3()
Returns:
value3

setValue3

public void setValue3(java.lang.String value3)
Parameters:
value3 -

toString

public java.lang.String toString()
Creates a string representation of the RangeFilter

Specified by:
toString in class QueryFunction

applyToLQLFilter

public void applyToLQLFilter(LQLFilterCollection exprCollection)
                      throws QueryFunctionUnsupportedException
Description copied from class: LQLFilter
Adds the LQL filtering clause (aka fragment) produced by this class to the list of all fragments to be applied in order to generate the QueryState.

Specified by:
applyToLQLFilter in class LQLFilter
Parameters:
exprCollection - the collection of all fragments to be applied
Throws:
QueryFunctionUnsupportedException - if the filter cannot be applied