Class DataTableThing

All Implemented Interfaces:
ISupportsAccessModifier, IConfigurableObject, INotScriptFriendly, ISupportsDeprecation, IDiffableObject, IAlertProvider, IAvatar, IEntityLifeCycleEvent, IEventMetadataProvider, IEventProvider, IPersistable, IPropertyProvider, IServiceMetadataProvider, IServiceProvider, IShapeProvider, ITaggableObject, IDependencyScannableObject, IImportDependencyHandler, IData, IDynamicServiceShape, IHierarchicalEntity, IEntityDefinition, IPersistableObject<String>, IDesignTimeSecurable, IDesignTimeSecurableEntity, IRunTimeSecurable, IRunTimeSecurableEntity, ISecurable, IVisibilitySecurable, IVisibilitySecurableEntity, IEventProcessor, IAspectContainer, IFeed, INamedObject, Serializable

See Also:
  • Field Details Link icon

  • Constructor Details Link icon

  • Method Details Link icon

    • getEntryIterator Link icon



      Returns an iterator over all entries inside this data table thing. The iterator must be closed when no longer used.
      Returns:
      a closeable iterator
      Throws:
      Exception - if an exception occurred creating the iterator
    • validateConfiguration Link icon

      @ThingworxExtensionApiMethod(since={6,6}, canOverride=true, requiresSuper=true) public void validateConfiguration(ImportedEntityCollection importedEntityCollections) throws Exception
      Description copied from class: Thing


      Validates the configuration of the thing during the import process. This method is called whenever a thing is created or modified via the REST APIs. During the validation step, there may be other associated entities (including thing shapes and templates) that are being imported. These can be accessed via the importedEntities collection if needed.

      Note that some resources belonging to the thing or other associated entities may not be available during this step in the lifecycle.

      It is required for all subclasses of Thing to call super.validateConfiguration(importedEntities) if they override this method.

      Overrides:
      validateConfiguration in class Thing
      Parameters:
      importedEntityCollections - - a typed collection of entities currently being imported
      Throws:
      Exception - If an error occurs
    • initializeThing Link icon

      @ThingworxExtensionApiMethod(since={9,0}, canOverride=true, requiresSuper=true) public void initializeThing(ContextType contextType) throws Exception
      Description copied from class: Thing


      An initialization hook for subclasses of Thing. Some resources of Thing may not be available at this point in the lifecycle.

      Overrides:
      initializeThing in class Thing
      Throws:
      Exception - If an error occurs
    • getDataShapeName Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public String getDataShapeName()
      Specified by:
      getDataShapeName in interface IData
    • GetDataShape Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public String GetDataShape()
      Service Category:
      DataShape
      Service Description:
      Get the currently assigned data shape.
      Returns:
      result Data shape name - DATASHAPENAME
    • SetDataShape Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public void SetDataShape(String name) throws Exception
      Service Category:
      DataShape
      Service Description:
      Sets the data shape.
      Parameters:
      name - Data shape name - DATASHAPENAME
      Throws:
      Exception - If an error occurs
    • getDataShape Link icon

      Specified by:
      getDataShape in interface IData
      Specified by:
      getDataShape in interface IDynamicServiceShape
    • GetFieldNames Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetFieldNames() throws Exception
      Service Category:
      Fields
      Service Description:
      Retrieve a list of field names for the data shape associated with this stream.
      Returns:
      result Field names - INFOTABLE - Aspects {dataShape:EntityList}
      Throws:
      Exception - If an error occurs
    • GetFieldNamesByType Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetFieldNamesByType(String type) throws Exception
      Service Category:
      Fields
      Service Description:
      Retrieve a list of field names for the data shape associated with this stream, of a specific type.
      Parameters:
      type - Base type name - BASETYPENAME
      Returns:
      result Field names - INFOTABLE - Aspects {dataShape:EntityList}
      Throws:
      Exception - If an error occurs
    • Reindex Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public void Reindex() throws Exception
      Service Category:
      Indexing
      Service Description:
      Reindex the custom indexes on the data table.


      Reindexes the Data Table data through Thingworx. NOTE: This service is not implemented for Postgres, will throw a NotImplementedException if used in that Persistence Provider deployment of Thingworx.
      Throws:
      Exception - If reindexing fails. Some data providers throw NotImplementedException because reindexing is not supported.
    • AddOrUpdateDataTableEntry Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public String AddOrUpdateDataTableEntry(TagCollection tags, Location location, String source, String sourceType, InfoTable values) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Add a new data table entry, or if it exists, update an existing entry.
      Parameters:
      tags - Tags - TAGS
      location - Location of the entry (optional) - LOCATION
      source - Source of the entry (optional) - STRING
      sourceType - Source type (optional) - STRING
      values - Data values - INFOTABLE
      Returns:
      id Newly created ID - STRING
      Throws:
      Exception - If an error occurs
    • AddOrUpdateDataTableEntries Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public void AddOrUpdateDataTableEntries(TagCollection tags, Location location, String source, String sourceType, InfoTable values) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Add or update multiple data table entries.
      Parameters:
      tags - Tags - TAGS
      location - Location of the entry (optional) - LOCATION
      source - Source of the entry (optional) - STRING
      sourceType - Source type (optional) - STRING
      values - Data values - INFOTABLE
      Throws:
      Exception - If an error occurs
    • UpdateDataTableEntries Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public void UpdateDataTableEntries(TagCollection tags, Location location, String source, String sourceType, InfoTable values) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Update multiple data table entries.
      Parameters:
      tags - Tags - TAGS
      location - Location of the entry (optional) - LOCATION
      source - Source of the entry (optional) - STRING
      sourceType - Source type (optional) - STRING
      values - Data values - INFOTABLE
      Throws:
      Exception - If an error occurs
    • AddDataTableEntries Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public void AddDataTableEntries(TagCollection tags, Location location, String source, String sourceType, InfoTable values) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Add multiple data table entries.
      Parameters:
      tags - Tags - TAGS
      location - Location of the entry (optional) - LOCATION
      source - Source of the entry (optional) - STRING
      sourceType - Source type (optional) - STRING
      values - Data values - INFOTABLE
      Throws:
      Exception - If an error occurs
    • UpdateDataTableEntriesWithQuery Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public void UpdateDataTableEntriesWithQuery(TagCollection tags, Location location, String source, String sourceType, InfoTable values, org.json.JSONObject query, InfoTable updateValues) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Add or update multiple data table entries based on a query.
      Parameters:
      tags - Tags - TAGS
      location - Location of the entry (optional) - LOCATION
      source - Source of the entry (optional) - STRING
      sourceType - Source type (optional) - STRING
      values - Data values to search for - INFOTABLE
      query - Query definition - QUERY
      updateValues - Data values to be updated - INFOTABLE
      Throws:
      Exception - If an error occurs
    • DeleteDataTableEntriesWithQuery Link icon

      @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={9,0}) @Deprecated public void DeleteDataTableEntriesWithQuery(TagCollection tags, Location location, String source, String sourceType, InfoTable values, org.json.JSONObject query) throws Exception
      Deprecated.
      Service Category:
      DataTableEntries
      Service Description:
      Add or update multiple data table entries based on a query.
      Parameters:
      tags - Tags - TAGS
      location - Location of the entry (optional) - LOCATION
      source - Source of the entry (optional) - STRING
      sourceType - Source type (optional) - STRING
      values - Data values - INFOTABLE
      query - Query definition - QUERY
      Throws:
      Exception - If an error occurs
    • DeleteDataTableEntriesWithQueryCriteria Link icon

      @ThingworxExtensionApiMethod(since={9,0}) public void DeleteDataTableEntriesWithQueryCriteria(TagCollection tags, String source, InfoTable values, org.json.JSONObject query) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Delete entries from data table entries based on a query, values, tags and source.
      Parameters:
      tags - Tags - TAGS
      source - Source of the entry (optional) - STRING
      values - Data values - INFOTABLE
      query - Query definition - QUERY
      Throws:
      Exception - If an error occurs
    • AddDataTableEntry Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public String AddDataTableEntry(TagCollection tags, Location location, String source, String sourceType, InfoTable values) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Add a new data table entry.
      Parameters:
      tags - Tags - TAGS
      location - Location of the entry (optional) - LOCATION
      source - Source of the entry (optional) - STRING
      sourceType - Source type (optional) - STRING
      values - Data values - INFOTABLE
      Returns:
      id Newly created id - STRING
      Throws:
      Exception - If an error occurs
    • UpdateDataTableEntry Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public void UpdateDataTableEntry(TagCollection tags, Location location, String source, String sourceType, InfoTable values) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Update an existing data table entry.
      Parameters:
      tags - Tags - TAGS
      location - Location of the entry (optional) - LOCATION
      source - Source of the entry (optional) - STRING
      sourceType - Source type (optional) - STRING
      values - Data values - INFOTABLE
      Throws:
      Exception - If an error occurs
    • AssignDataTableEntries Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public void AssignDataTableEntries(TagCollection tags, Location location, String source, String sourceType, InfoTable values) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Replaces existing data table entries.
      Parameters:
      tags - Tags - TAGS
      location - Location of the entry (optional) - LOCATION
      source - Source of the entry (optional) - STRING
      sourceType - Source type (optional) - STRING
      values - Data values - INFOTABLE
      Throws:
      Exception - If an error occurs
    • DeleteDataTableEntry Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public void DeleteDataTableEntry(InfoTable values) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Delete an existing data table entry.
      Parameters:
      values - Data values - INFOTABLE
      Throws:
      Exception - If an error occurs
    • DeleteDataTableEntryByKey Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public void DeleteDataTableEntryByKey(String key) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Delete an existing data table entry using its key value.
      Parameters:
      key - Key Value - STRING
      Throws:
      Exception - If an error occurs
    • GetDataTableEntry Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetDataTableEntry(InfoTable values) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Get an existing data table entry.
      Parameters:
      values - Data values - INFOTABLE
      Returns:
      result Table entries - INFOTABLE - Aspects {isEntityDataShape:true, isDataTableEntry:true}
      Throws:
      Exception - If an error occurs
    • GetDataTableEntryByKey Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetDataTableEntryByKey(String key) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Get an existing data table entry using its key value.
      Parameters:
      key - Key Value - STRING
      Returns:
      result Table entries - INFOTABLE - Aspects {isEntityDataShape:true, isDataTableEntry:true}
      Throws:
      Exception - If an error occurs
    • PurgeDataTableEntries Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public void PurgeDataTableEntries() throws Exception
      Service Category:
      Maintenance
      Service Description:
      Remove all data table entries.
      Throws:
      Exception - If an error occurs
    • CreateValues Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable CreateValues() throws Exception
      Service Category:
      Values
      Service Description:
      Create an empty info table of the correct datashape for this data table.
      Returns:
      Values Created Infotable - INFOTABLE - Aspects {isEntityDataShape:true}
      Throws:
      Exception - If an error occurs
    • CreateValuesWithData Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable CreateValuesWithData(org.json.JSONObject values) throws Exception
      Service Category:
      Values
      Service Description:
      Create an info table of the correct datashape for this stream and include data values.
      Parameters:
      values - Data values (JSON Object) - JSON
      Returns:
      Values Created Infotable - INFOTABLE - Aspects {isEntityDataShape:true}
      Throws:
      Exception - If an error occurs
    • GetDataTableEntries Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetDataTableEntries(Double maxItems) throws Exception
      Service Category:
      Queries
      Service Description:
      Retrieve all table entries up to max items number.
      Parameters:
      maxItems - Maximum number of items to return - NUMBER
      Returns:
      result Table entries - INFOTABLE - Aspects {isEntityDataShape:true, isDataTableEntry:true}
      Throws:
      Exception - If an error occurs
    • FindDataTableEntries Link icon

      @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={8,5}) @Deprecated public InfoTable FindDataTableEntries(InfoTable Info) throws Exception
      Deprecated.
      Throws:
      Exception - If an error occurs
    • FindDataTableEntries Link icon

      @ThingworxExtensionApiMethod(since={8,5}) public InfoTable FindDataTableEntries(InfoTable values, Double maxItems) throws Exception
      Service Category:
      Queries
      Service Description:
      Retrieve all table entries that match the provided values.
      Parameters:
      values - Data values - INFOTABLE
      maxItems - Maximum number of items to return - NUMBER
      Returns:
      result Table entries - INFOTABLE - Aspects {isEntityDataShape:true, isDataTableEntry:true}
      Throws:
      Exception - If an error occurs
    • DeleteDataTableEntries Link icon

      @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={8,5}) @Deprecated public void DeleteDataTableEntries(InfoTable Info) throws Exception
      Deprecated.
      Throws:
      Exception - If an error occurs
    • DeleteDataTableEntries Link icon

      @ThingworxExtensionApiMethod(since={8,5}) public void DeleteDataTableEntries(InfoTable values, Double maxItems) throws Exception
      Service Category:
      DataTableEntries
      Service Description:
      Delete all table entries that match the provided values.
      Parameters:
      values - Data values - INFOTABLE
      maxItems - Maximum number of items to return - NUMBER
      Throws:
      Exception - If an error occurs
    • GetDataTableEntryCount Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public Integer GetDataTableEntryCount() throws Exception
      Service Category:
      Service Description:
      Get an count of data table entries.
      Returns:
      result Table entry count - INTEGER
      Throws:
      Exception - If an error occurs
    • QueryDataTableEntries Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryDataTableEntries(InfoTable values, Double maxItems, TagCollection tags, String source, org.json.JSONObject query) throws Exception
      Service Category:
      Queries
      Service Description:
      Retrieve all table entries that match the query parameters.
      Parameters:
      values - Data values - INFOTABLE
      maxItems - Maximum number of items to return - NUMBER
      tags - Tags (optional) - TAGS
      source - Source (optional) - STRING
      query - Query definition - QUERY
      Returns:
      result Table entries - INFOTABLE - Aspects {isEntityDataShape:true, isDataTableEntry:true}
      Throws:
      Exception - If an error occurs
    • SearchDataTableEntries Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable SearchDataTableEntries(Double maxItems, String searchExpression, TagCollection tags, org.json.JSONObject query, String source) throws Exception
      Service Category:
      Queries
      Service Description:
      Retrieve all table entries that match the search query parameters.
      Parameters:
      maxItems - Maximum number of items to return - NUMBER
      searchExpression - Search expression - STRING
      tags - Tags (optional) - TAGS
      query - Query definition - QUERY
      source - Source (optional) - STRING
      Returns:
      result Table entries - INFOTABLE - Aspects {isEntityDataShape:true, isDataTableEntry:true}
      Throws:
      Exception - If an error occurs
    • getDependencies Link icon

      Description copied from class: Thing


      Returns a map containing references to all entities that the Thing is dependent on.

      Overrides:
      getDependencies in class Thing
      Returns:
      a map of up-stream dependencies
    • getDataType Link icon

    • getItemEntityType Link icon

    • getItemEntityName Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public String getItemEntityName()
      Specified by:
      getItemEntityName in interface IFeed
    • getItemCollectionName Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public String getItemCollectionName()
      Specified by:
      getItemCollectionName in interface IFeed
    • isStoredAsEncrypted Link icon

      @ThingworxExtensionApiMethod(since={6,6}, canOverride=true) protected boolean isStoredAsEncrypted()


      True if a secure data table.
      Returns:
      boolean