@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class BetweenFilter extends java.lang.Object implements IFilter
Constructor and Description |
---|
BetweenFilter(java.lang.String fieldName,
java.lang.Object from,
java.lang.Object to,
boolean inclusive) |
Modifier and Type | Method and 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 by getCombinedFilter() . |
@ThingworxExtensionApiMethod(since={6,6}) public BetweenFilter(java.lang.String fieldName, java.lang.Object from, java.lang.Object to, boolean inclusive)
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getFieldName()
getFieldName
in interface IFilter
@ThingworxExtensionApiMethod(since={6,6}) public void setFieldName(java.lang.String value)
setFieldName
in interface IFilter
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={7,1}) public void setFilterExpression(java.lang.String expression)
IFilter
setFilterExpression
in interface IFilter
expression
- the filter expressionIFilter.getFilterExpression()
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={7,1}) public java.lang.String getFilterExpression()
IFilter
getFilterExpression
in interface IFilter
IFilter.setFilterExpression(String)
@ThingworxExtensionApiMethod(since={6,6}) public FilterCollection getCombinedFilter()
@ThingworxExtensionApiMethod(since={6,6}) public void resolveFields(DataShapeDefinition metadata)
resolveFields
in interface IFilter
@ThingworxExtensionApiMethod(since={6,6}) public boolean evaluateValue(IPrimitiveType value)
evaluateValue
in interface IFilter
@ThingworxExtensionApiMethod(since={6,6}) public boolean evaluateFilter(ValueCollection row)
evaluateFilter
in interface IFilter
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject toJSON() throws org.json.JSONException
getCombinedFilter()
.
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.