Package com.thingworx.types.data.filters
Class OrFilterCollection
- java.lang.Object
-
- com.thingworx.types.data.filters.FilterCollection
-
- com.thingworx.types.data.filters.OrFilterCollection
-
- All Implemented Interfaces:
IFilter
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class OrFilterCollection extends FilterCollection
FilterCollection
that aggregates one or more child filters with an "or" criteria.
-
-
Constructor Summary
Constructors Constructor Description OrFilterCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
evaluateFilter(ValueCollection row)
boolean
evaluateValue(IPrimitiveType value)
org.json.JSONObject
toJSON()
Produces JSON with fields as follows:CommonPropertyNames.PROP_TYPE
:FilterFactory.FILTER_COMPOSITE_OR
CommonPropertyNames.PROP_FILTERS
: JSONArray of filter JSONs; seeFilterCollection.getFilters()
-
Methods inherited from class com.thingworx.types.data.filters.FilterCollection
addFilter, clearFilters, getFieldName, getFilter, getFilterCount, getFilterExpression, getFilters, resolveFields, setFieldName, setFilterExpression
-
-
-
-
Method Detail
-
evaluateValue
@ThingworxExtensionApiMethod(since={6,6}) public boolean evaluateValue(IPrimitiveType value)
- Specified by:
evaluateValue
in interfaceIFilter
- Overrides:
evaluateValue
in classFilterCollection
-
evaluateFilter
@ThingworxExtensionApiMethod(since={6,6}) public boolean evaluateFilter(ValueCollection row)
- Specified by:
evaluateFilter
in interfaceIFilter
- Overrides:
evaluateFilter
in classFilterCollection
-
toJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject toJSON() throws org.json.JSONException
Produces JSON with fields as follows:CommonPropertyNames.PROP_TYPE
:FilterFactory.FILTER_COMPOSITE_OR
CommonPropertyNames.PROP_FILTERS
: JSONArray of filter JSONs; seeFilterCollection.getFilters()
- Specified by:
toJSON
in interfaceIFilter
- Overrides:
toJSON
in classFilterCollection
- Returns:
- JSON representation of this filter
- Throws:
org.json.JSONException
- Upon internal errors
-
-