Package com.thingworx.types.data.filters
Class NearFilter
- java.lang.Object
-
- com.thingworx.types.data.filters.NearFilter
-
- All Implemented Interfaces:
IFilter
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class NearFilter extends java.lang.Object implements IFilter
Filter which applies a "near" (or "not near") criteria.Note that this filter ignores the "elevation" component of
Location
.
-
-
Constructor Summary
Constructors Constructor Description NearFilter(java.lang.String fieldName, Location anchorLocation, java.lang.Object distance, java.lang.String units, boolean inclusive)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
NearFilter
@ThingworxExtensionApiMethod(since={6,6}) public NearFilter(java.lang.String fieldName, Location anchorLocation, java.lang.Object distance, java.lang.String units, boolean inclusive)
-
-
Method Detail
-
isInclusive
@ThingworxExtensionApiMethod(since={6,6}) public boolean isInclusive()
-
getAnchorLocation
@ThingworxExtensionApiMethod(since={6,6}) public Location getAnchorLocation()
-
getDistance
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Double getDistance()
-
getUnits
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getUnits()
-
setMatchValue
@ThingworxExtensionApiMethod(since={6,6}) public void setMatchValue(java.lang.Object value)
-
getFieldName
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getFieldName()
- Specified by:
getFieldName
in interfaceIFilter
-
setFieldName
@ThingworxExtensionApiMethod(since={6,6}) public void setFieldName(java.lang.String value)
- Specified by:
setFieldName
in interfaceIFilter
-
setFilterExpression
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={7,1}) public void setFilterExpression(java.lang.String expression)
Deprecated.Description copied from interface:IFilter
Sets the filter expression.- Specified by:
setFilterExpression
in interfaceIFilter
- Parameters:
expression
- the filter expression- See Also:
IFilter.getFilterExpression()
-
getFilterExpression
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={7,1}) public java.lang.String getFilterExpression()
Deprecated.Description copied from interface:IFilter
Gets the filter expression.- Specified by:
getFilterExpression
in interfaceIFilter
- Returns:
- the filter expression
- See Also:
IFilter.setFilterExpression(String)
-
resolveFields
@ThingworxExtensionApiMethod(since={6,6}) public void resolveFields(DataShapeDefinition metadata)
- Specified by:
resolveFields
in interfaceIFilter
-
evaluateValue
@ThingworxExtensionApiMethod(since={6,6}) public boolean evaluateValue(IPrimitiveType iPrimitive)
- Specified by:
evaluateValue
in interfaceIFilter
-
evaluateFilter
@ThingworxExtensionApiMethod(since={6,6}) public boolean evaluateFilter(ValueCollection row)
- Specified by:
evaluateFilter
in interfaceIFilter
-
toJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject toJSON() throws org.json.JSONException
Produces JSON representation of this filter. Fields are as follows:CommonPropertyNames.PROP_TYPE
:FilterFactory.FILTER_NEAR
whenisInclusive()
is true; otherwiseFilterFactory.FILTER_NOTNEAR
CommonPropertyNames.PROP_FIELDNAME
:getFieldName()
resultCommonPropertyNames.PROP_LOCATION
:getAnchorLocation()
.toJSON() resultCommonPropertyNames.PROP_DISTANCE
:getDistance()
resultCommonPropertyNames.PROP_UNITS
:getUnits()
result, if non-null
-
-