Package com.thingworx.data.util
Class InfoTableInstanceFactory
java.lang.Object
com.thingworx.data.util.InfoTableInstanceFactory
@ThingworxExtensionApiClass(since={6,6},
canInstantiate=true)
public final class InfoTableInstanceFactory
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InfoTableConvert a given InfoTable into a newthat uses the givenInfoTableDataShapeDefinitionstatic InfoTableCreates and returns a newwith fields defined in the givenInfoTableDataShapeDefinitionstatic InfoTableCreates and returns a newwith aInfoTablefrom the given entity type as a StringDataShapeDefinitionstatic InfoTableCreates and returns a newcontaining the field defined in the givenInfoTableFieldDefinitionstatic InfoTableCreates and returns a newcontaining the fields defined in the givenInfoTableFieldDefinitionCollectionstatic InfoTable
-
Constructor Details
-
InfoTableInstanceFactory
public InfoTableInstanceFactory()Initializes this instace with default values.
-
-
Method Details
-
createInfoTableFromDataShape
@ThingworxExtensionApiMethod(since={6,6}) public static InfoTable createInfoTableFromDataShape(DataShapeDefinition t) throws Exception Creates and returns a newwith fields defined in the givenInfoTableDataShapeDefinition- Parameters:
t- DataShapeDefinition defining the fields for the new InfoTable- Returns:
- A new InfoTable with the given fields
- Throws:
Exception- If an error occurs
-
createInfoTableFromDataShape
@ThingworxExtensionApiMethod(since={6,6}) public static InfoTable createInfoTableFromDataShape(String type) throws Exception Creates and returns a newwith aInfoTablefrom the given entity type as a StringDataShapeDefinition- Parameters:
type- The entity type as a String- Returns:
- InfoTable with a DataShape from the given entity type
- Throws:
Exception- If an error occurs
-
convertInfoTableUsingDataShape
@ThingworxExtensionApiMethod(since={6,6}) public static InfoTable convertInfoTableUsingDataShape(InfoTable t, DataShapeDefinition ds) throws Exception Convert a given InfoTable into a newthat uses the givenInfoTableDataShapeDefinition- Parameters:
t- InfoTable to be convertedds- DataShapeDefinition to be used in the new InfoTable- Returns:
- InfoTable using the new DataShapeDefinition and values from the given InfoTable
- Throws:
Exception- If an error occurs
-
createInfoTableFromFieldDefinition
@ThingworxExtensionApiMethod(since={6,6}) public static InfoTable createInfoTableFromFieldDefinition(FieldDefinition field) throws Exception Creates and returns a newcontaining the field defined in the givenInfoTableFieldDefinition- Parameters:
field- The field for the new InfoTable- Returns:
- A new InfoTable with the given field
- Throws:
Exception- If an error occurs
-
createInfoTableFromParameters
@ThingworxExtensionApiMethod(since={6,6}) public static InfoTable createInfoTableFromParameters(FieldDefinitionCollection t) throws Exception Creates and returns a newcontaining the fields defined in the givenInfoTableFieldDefinitionCollection- Parameters:
t- FieldDefinitionCollection The fields for the new InfoTable- Returns:
- A new InfoTable with the given fields
- Throws:
Exception- If an error occurs
-
createInfoTableFromVTQ
@ThingworxExtensionApiMethod(since={6,6}) public static InfoTable createInfoTableFromVTQ(VTQ vtq) throws Exception - Parameters:
vtq- VTQ containing the values to be set in each field of the row- Returns:
- InfoTable containing a row with the given VTQ values
- Throws:
Exception- If an error occurs
-