@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class NearFilter extends java.lang.Object implements IFilter
Note that this filter ignores the "elevation" component of Location
.
Constructor and Description |
---|
NearFilter(java.lang.String fieldName,
Location anchorLocation,
java.lang.Object distance,
java.lang.String units,
boolean inclusive) |
Modifier and Type | Method and Description |
---|---|
boolean |
evaluateFilter(ValueCollection row) |
boolean |
evaluateValue(IPrimitiveType iPrimitive) |
Location |
getAnchorLocation() |
java.lang.Double |
getDistance() |
java.lang.String |
getFieldName() |
java.lang.String |
getFilterExpression()
Deprecated.
|
java.lang.String |
getUnits() |
boolean |
isInclusive() |
void |
resolveFields(DataShapeDefinition metadata) |
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. |
@ThingworxExtensionApiMethod(since={6,6}) public NearFilter(java.lang.String fieldName, Location anchorLocation, java.lang.Object distance, java.lang.String units, boolean inclusive)
@ThingworxExtensionApiMethod(since={6,6}) public boolean isInclusive()
@ThingworxExtensionApiMethod(since={6,6}) public Location getAnchorLocation()
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Double getDistance()
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getUnits()
@ThingworxExtensionApiMethod(since={6,6}) public void setMatchValue(java.lang.Object value)
@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 void resolveFields(DataShapeDefinition metadata)
resolveFields
in interface IFilter
@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_NEAR
when
isInclusive()
is true; otherwise FilterFactory.FILTER_NOTNEAR
CommonPropertyNames.PROP_FIELDNAME
: getFieldName()
result
CommonPropertyNames.PROP_LOCATION
: getAnchorLocation()
.toJSON() result
CommonPropertyNames.PROP_DISTANCE
: getDistance()
result
CommonPropertyNames.PROP_UNITS
: getUnits()
result, if non-null