Package com.thingworx.types.data.sorters
Class SortCollection
- java.lang.Object
-
- com.thingworx.types.data.sorters.SortCollection
-
- All Implemented Interfaces:
ISort
,java.util.Comparator<ValueCollection>
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class SortCollection extends java.lang.Object implements ISort
Sorter based on the composition of a collection of child sorters.
-
-
Constructor Summary
Constructors Constructor Description SortCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSort(ISort sort)
void
clearSorts()
int
compare(ValueCollection row1, ValueCollection row2)
java.lang.String
getFieldName()
java.util.ArrayList<ISort>
getSorters()
boolean
isAscending()
boolean
isCaseSensitive()
void
resolveFields(DataShapeDefinition fields)
void
setAscending(boolean value)
void
setFieldName(java.lang.String value)
org.json.JSONArray
toJSON()
Produces JSONArray of child sorters' JSON representations.org.json.JSONArray
toJSONArray()
-
-
-
Constructor Detail
-
SortCollection
@ThingworxExtensionApiMethod(since={6,6}) public SortCollection()
-
-
Method Detail
-
addSort
@ThingworxExtensionApiMethod(since={6,6}) public void addSort(ISort sort)
-
clearSorts
@ThingworxExtensionApiMethod(since={6,6}) public void clearSorts()
-
getSorters
@ThingworxExtensionApiMethod(since={6,6}) public java.util.ArrayList<ISort> getSorters()
-
resolveFields
@ThingworxExtensionApiMethod(since={6,6}) public void resolveFields(DataShapeDefinition fields)
- Specified by:
resolveFields
in interfaceISort
-
compare
@ThingworxExtensionApiMethod(since={6,6}) public int compare(ValueCollection row1, ValueCollection row2)
- Specified by:
compare
in interfacejava.util.Comparator<ValueCollection>
-
getFieldName
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getFieldName()
- Specified by:
getFieldName
in interfaceISort
-
isAscending
@ThingworxExtensionApiMethod(since={6,6}) public boolean isAscending()
- Specified by:
isAscending
in interfaceISort
-
setAscending
@ThingworxExtensionApiMethod(since={6,6}) public void setAscending(boolean value)
- Specified by:
setAscending
in interfaceISort
-
setFieldName
@ThingworxExtensionApiMethod(since={6,6}) public void setFieldName(java.lang.String value)
- Specified by:
setFieldName
in interfaceISort
-
isCaseSensitive
@ThingworxExtensionApiMethod(since={6,6}) public boolean isCaseSensitive()
- Specified by:
isCaseSensitive
in interfaceISort
-
toJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONArray toJSON() throws org.json.JSONException
Produces JSONArray of child sorters' JSON representations.- Specified by:
toJSON
in interfaceISort
- Returns:
- JSON representation of this sorter
- Throws:
org.json.JSONException
- Upon internal errors- See Also:
getSorters()
-
toJSONArray
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONArray toJSONArray() throws org.json.JSONException
- Specified by:
toJSONArray
in interfaceISort
- Returns:
- JSONArray representation of this sorter
- Throws:
org.json.JSONException
- Upon internal errors
-
-