Package com.thingworx.types.data.filters
Class BetweenFilter
- java.lang.Object
-
- com.thingworx.types.data.filters.BetweenFilter
-
- All Implemented Interfaces:
IFilter
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class BetweenFilter extends java.lang.Object implements IFilter
Filter which applies a "between" (or "not between") criteria.
-
-
Constructor Summary
Constructors Constructor Description BetweenFilter(java.lang.String fieldName, java.lang.Object from, java.lang.Object to, boolean inclusive)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
evaluateFilter(ValueCollection row)
boolean
evaluateValue(IPrimitiveType value)
FilterCollection
getCombinedFilter()
java.lang.String
getFieldName()
java.lang.String
getFilterExpression()
Deprecated.void
resolveFields(DataShapeDefinition metadata)
void
setFieldName(java.lang.String value)
void
setFilterExpression(java.lang.String expression)
Deprecated.org.json.JSONObject
toJSON()
Produces a JSON representation of this filter by delegating to the internal filter collection as returned bygetCombinedFilter()
.
-
-
-
Constructor Detail
-
BetweenFilter
@ThingworxExtensionApiMethod(since={6,6}) public BetweenFilter(java.lang.String fieldName, java.lang.Object from, java.lang.Object to, boolean inclusive)
-
-
Method Detail
-
getFieldName
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getFieldName()
- Specified by:
getFieldName
in interfaceIFilter
-
setFieldName
@ThingworxExtensionApiMethod(since={6,6}) public void setFieldName(java.lang.String value)
- Specified by:
setFieldName
in interfaceIFilter
-
setFilterExpression
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={7,1}) public void setFilterExpression(java.lang.String expression)
Deprecated.Description copied from interface:IFilter
Sets the filter expression.- Specified by:
setFilterExpression
in interfaceIFilter
- Parameters:
expression
- the filter expression- See Also:
IFilter.getFilterExpression()
-
getFilterExpression
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={7,1}) public java.lang.String getFilterExpression()
Deprecated.Description copied from interface:IFilter
Gets the filter expression.- Specified by:
getFilterExpression
in interfaceIFilter
- Returns:
- the filter expression
- See Also:
IFilter.setFilterExpression(String)
-
getCombinedFilter
@ThingworxExtensionApiMethod(since={6,6}) public FilterCollection getCombinedFilter()
-
resolveFields
@ThingworxExtensionApiMethod(since={6,6}) public void resolveFields(DataShapeDefinition metadata)
- Specified by:
resolveFields
in interfaceIFilter
-
evaluateValue
@ThingworxExtensionApiMethod(since={6,6}) public boolean evaluateValue(IPrimitiveType value)
- Specified by:
evaluateValue
in interfaceIFilter
-
evaluateFilter
@ThingworxExtensionApiMethod(since={6,6}) public boolean evaluateFilter(ValueCollection row)
- Specified by:
evaluateFilter
in interfaceIFilter
-
toJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject toJSON() throws org.json.JSONException
Produces a JSON representation of this filter by delegating to the internal filter collection as returned bygetCombinedFilter()
.Note that this will not reproduce the original between filter upon re-parsing the resulting JSON. This is because there is nothing to prevent someone from modifying the internal filter collection and thus delegation is used to stay true to the actual current state of the filter.
-
-