@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class FieldDefinitionCollection extends NamedObjectCollection<FieldDefinition>
FieldDefinitionCollection
supports serialization to XML and JSON,
as well as creating derived data shape definitions. Fields belonging to this map can be iterated over according to their ordinality or
storage order.Constructor and Description |
---|
FieldDefinitionCollection() |
Modifier and Type | Method and Description |
---|---|
void |
addFieldDefinition(FieldDefinition field)
Adds a new field definition to this data shape definition. |
FieldDefinitionCollection |
clone()
Returns a deep clone of this collection. |
FieldDefinition |
getFieldDefinition(java.lang.String name)
Returns the field definition with the specified name. |
java.util.ArrayList<FieldDefinition> |
getOrderedFields()
Returns a list of the field definitions in this collection using their natural order. |
java.util.ArrayList<FieldDefinition> |
getOrderedFieldsByOrdinal()
Returns a list of field definitions in this collection using the order defined by their ordinality. |
DataShapeDefinition |
toDataShape()
|
getNamesAsInfoTable, getOrderedList
containsEntity, getDescription, getName, getNames
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
@ThingworxExtensionApiMethod(since={6,6}) public FieldDefinition getFieldDefinition(java.lang.String name)
name
- the name of the field to returnnull
if the field does not exist@ThingworxExtensionApiMethod(since={6,6}) public void addFieldDefinition(FieldDefinition field)
field
- the field definition to add@ThingworxExtensionApiMethod(since={6,6}) public DataShapeDefinition toDataShape()
DataShapeDefinition
containing this collection's field definitions@ThingworxExtensionApiMethod(since={6,6}) public java.util.ArrayList<FieldDefinition> getOrderedFields()
@ThingworxExtensionApiMethod(since={6,6}) public java.util.ArrayList<FieldDefinition> getOrderedFieldsByOrdinal()
@ThingworxExtensionApiMethod(since={6,6}) public FieldDefinitionCollection clone()
clone
in class java.util.HashMap<java.lang.String,FieldDefinition>