Package com.thingworx.types.data.queries
Class Query
- java.lang.Object
-
- com.thingworx.types.data.queries.Query
-
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class Query extends java.lang.Object
Representation of simple filter and sorting criteria for queries.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFilter
getFilters()
IPagination
getPagination()
ISort
getSorters()
boolean
isUnparsed()
void
parseQuery()
void
parseQuery(DataShapeDefinition dataShape)
void
parseQuery(InfoTable infoTable)
InfoTable
processQuery(InfoTable input)
void
setFilters(IFilter filters)
void
setPagination(IPagination pagination)
void
setSorters(ISort sorters)
org.json.JSONObject
toJSON()
Produces a JSON representation of this query.
-
-
-
Constructor Detail
-
Query
@ThingworxExtensionApiMethod(since={6,6}) public Query(org.json.JSONObject rawQuery)
-
Query
@ThingworxExtensionApiMethod(since={6,6}) public Query()
-
-
Method Detail
-
isUnparsed
@ThingworxExtensionApiMethod(since={6,6}) public boolean isUnparsed()
-
parseQuery
@ThingworxExtensionApiMethod(since={6,6}) public void parseQuery(DataShapeDefinition dataShape) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
parseQuery
@ThingworxExtensionApiMethod(since={6,6}) public void parseQuery(InfoTable infoTable) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
parseQuery
@ThingworxExtensionApiMethod(since={6,6}) public void parseQuery() throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
getFilters
@ThingworxExtensionApiMethod(since={6,6}) public IFilter getFilters()
-
setFilters
@ThingworxExtensionApiMethod(since={6,6}) public void setFilters(IFilter filters)
-
getSorters
@ThingworxExtensionApiMethod(since={6,6}) public ISort getSorters()
-
setSorters
@ThingworxExtensionApiMethod(since={6,6}) public void setSorters(ISort sorters)
-
getPagination
@ThingworxExtensionApiMethod(since={9,0,0}) public IPagination getPagination()
-
setPagination
@ThingworxExtensionApiMethod(since={9,0,0}) public void setPagination(IPagination pagination)
-
toJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject toJSON() throws org.json.JSONException
Produces a JSON representation of this query. Fields are as follows:CommonPropertyNames.PROP_FILTERS
: filter JSON (as perIFilter.toJSON()
), if non-nullCommonPropertyNames.PROP_SORTS
: query JSON (as perISort.toJSONArray()
), if non-null
- Returns:
- JSON representation of this query
- Throws:
org.json.JSONException
- Upon internal errors
-
processQuery
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable processQuery(InfoTable input) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
-