@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class RangeFilter extends java.lang.Object implements IFilter
Modifier and Type | Class and Description |
---|---|
static class |
RangeFilter.Type |
Modifier and Type | Field and Description |
---|---|
static int |
EQUALS
Deprecated.
|
static int |
GREATERTHAN
Deprecated.
|
static int |
GREATERTHANOREQUALS
Deprecated.
|
static int |
LESSTHAN
Deprecated.
|
static int |
LESSTHANOREQUALS
Deprecated.
|
static int |
NOTEQUALS
Deprecated.
|
Constructor and Description |
---|
RangeFilter(java.lang.String fieldName,
int matchType,
java.lang.Object value)
Deprecated.
As of release 7.1, replaced by
RangeFilter(String, RangeFilter.Type, Object) |
RangeFilter(java.lang.String fieldName,
RangeFilter.Type matchType,
java.lang.Object value)
Create case-insensitive range filter. |
RangeFilter(java.lang.String fieldName,
RangeFilter.Type matchType,
java.lang.Object value,
boolean caseSensitive) |
Modifier and Type | Method and Description |
---|---|
boolean |
evaluateFilter(ValueCollection row) |
boolean |
evaluateValue(IPrimitiveType iPrimitive) |
java.lang.String |
getFieldName() |
java.lang.String |
getFilterExpression()
Deprecated.
|
int |
getMatchType()
Deprecated.
As of release 7.1, replaced by
getMatchTypeEnum() |
RangeFilter.Type |
getMatchTypeEnum() |
java.lang.Object |
getMatchValue() |
boolean |
isCaseSensitive() |
void |
resolveFields(DataShapeDefinition metadata)
Converts match value to field type indicated by the provided DataShapeDefinition, if one is so indicated, except in cases where this conversion is not possible or results in a clear loss of numeric precision. |
void |
setFieldName(java.lang.String value) |
void |
setFilterExpression(java.lang.String expression)
Deprecated.
|
void |
setMatchValue(java.lang.Object value) |
org.json.JSONObject |
toJSON()
Produces JSON representation of this filter. |
@Deprecated public static final int LESSTHANOREQUALS
@Deprecated public static final int LESSTHAN
@Deprecated public static final int EQUALS
@Deprecated public static final int GREATERTHAN
@Deprecated public static final int GREATERTHANOREQUALS
@Deprecated public static final int NOTEQUALS
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={7,1}) public RangeFilter(java.lang.String fieldName, int matchType, java.lang.Object value)
RangeFilter(String, RangeFilter.Type, Object)
@ThingworxExtensionApiMethod(since={6,6}) public RangeFilter(java.lang.String fieldName, RangeFilter.Type matchType, java.lang.Object value)
@ThingworxExtensionApiMethod(since={6,6}) public RangeFilter(java.lang.String fieldName, RangeFilter.Type matchType, java.lang.Object value, boolean caseSensitive)
@ThingworxExtensionApiMethod(since={6,6}) public void setMatchValue(java.lang.Object value)
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getFieldName()
getFieldName
in interface IFilter
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={7,1}) public int getMatchType()
getMatchTypeEnum()
@ThingworxExtensionApiMethod(since={6,6}) public RangeFilter.Type getMatchTypeEnum()
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Object getMatchValue()
@ThingworxExtensionApiMethod(since={6,6}) public void setFieldName(java.lang.String value)
setFieldName
in interface IFilter
@ThingworxExtensionApiMethod(since={6,6}) public boolean isCaseSensitive()
@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 void resolveFields(DataShapeDefinition metadata)
This does not necessarily need to be called, as evaluateValue(IPrimitiveType)
will do conversions as needed, but
doing it once here ahead of multiple filtering calls generally results in somewhat faster filtering.
resolveFields
in interface IFilter
metadata
- Data shape definition that may provide target field type; may be null@ThingworxExtensionApiMethod(since={6,6}) public boolean evaluateValue(IPrimitiveType iPrimitive)
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
CommonPropertyNames.PROP_TYPE
: getMatchTypeEnum()
.toString() result
CommonPropertyNames.PROP_FIELDNAME
: getFieldName()
result
CommonPropertyNames.PROP_VALUE
: getMatchValue()
result
CommonPropertyNames.PROP_ISCASESENSITIVE
: isCaseSensitive()
result, if true