@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class SetFilter extends java.lang.Object implements IFilter
Constructor and Description |
---|
SetFilter(java.lang.String fieldName,
java.util.ArrayList<?> items,
java.lang.Boolean inclusive)
Create case-insensitive set filter. |
SetFilter(java.lang.String fieldName,
java.util.Collection<?> items,
boolean inclusive)
Create case-insensitive set filter. |
SetFilter(java.lang.String fieldName,
java.util.Collection<?> items,
boolean inclusive,
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.
|
java.util.Collection<java.lang.Object> |
getMatchItems() |
boolean |
isCaseSensitive() |
boolean |
isInclusive() |
void |
resolveFields(DataShapeDefinition metadata)
Converts match items to field type indicated by the provided DataShapeDefinition, if one is so indicated. |
void |
setFieldName(java.lang.String value) |
void |
setFilterExpression(java.lang.String expression)
Deprecated.
|
org.json.JSONObject |
toJSON()
Produces JSON representation of this filter. |
@ThingworxExtensionApiMethod(since={6,6}) public SetFilter(java.lang.String fieldName, java.util.ArrayList<?> items, java.lang.Boolean inclusive)
@ThingworxExtensionApiMethod(since={6,6}) public SetFilter(java.lang.String fieldName, java.util.Collection<?> items, boolean inclusive)
@ThingworxExtensionApiMethod(since={6,6}) public SetFilter(java.lang.String fieldName, java.util.Collection<?> items, boolean inclusive, boolean caseSensitive)
@ThingworxExtensionApiMethod(since={6,6}) public void resolveFields(DataShapeDefinition metadata)
resolveFields
in interface IFilter
metadata
- Data shape definition that may provide target field type; may be null@ThingworxExtensionApiMethod(since={6,6}) public boolean isInclusive()
@ThingworxExtensionApiMethod(since={6,6}) public boolean isCaseSensitive()
@ThingworxExtensionApiMethod(since={6,6}) public java.util.Collection<java.lang.Object> getMatchItems()
@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 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
: FilterFactory.FILTER_IN
when isInclusive()
is true; otherwise FilterFactory.FILTER_NOT_IN
CommonPropertyNames.PROP_FIELDNAME
: getFieldName()
result
CommonPropertyNames.PROP_VALUES
: new JSONArray of getMatchItems()
result
CommonPropertyNames.PROP_ISCASESENSITIVE
: isCaseSensitive()
result, if true