User Guide: SDKs > VoltMX Iris SDK > Invoking an Object Service > Data Transfer Objects > voltmx.sdk.dto.DataObject Class
voltmx.sdk.dto.DataObject Class
This class represents a data object in the Object Service. An instantiation of this class is required as a parameter in many methods of the OnlineObjectService Class and the OfflineObjectService Class.
Constructors
The voltmx.sdk.dto.DataObject class has one constructor.
voltmx.sdk.dto.DataObject(string objectName)
Parameter | Type | Description |
---|---|---|
objectName | string | Name of object defined in the object service |
Methods
The voltmx.sdk.dto.DataObject class includes the following methods.
- addChildDataObject(child)
- addField(fieldName, value)
- setOdataUrl(URL)
- setRecord(record)
- setSelectQueryObject(queryObject)
addChildDataObject(child) Method
Adds another DataObject as a child.
Signature
Parameters
Parameter | Type | Description |
---|---|---|
child | voltmx.sdk.dto.DataObject | The DataObject to be added as a child |
addField(fieldName, value) Method
Adds a field in the data object.
Signature
Parameters
Parameter | Type | Description |
---|---|---|
fieldName | string | The name of the field being added. |
value | string | The value of the added field |
setOdataUrl(URL) Method
Specifies the Odata URL.
Signature
Parameters
Parameter | Type | Description |
---|---|---|
URL | string | The Odata URL to set. |
setRecord(record) Method
Specifies a record in the data object.
Signature
Parameters
Parameter | Type | Description |
---|---|---|
record | JSON object | The record to be set. |
setSelectQueryObject(queryObject) Method
Sets the specific query object to be used in the query.
Signature
Parameters
Parameter | Type | Description |
---|---|---|
queryObject | voltmx.sdk.dto.SelectQuery | The object that contains the query. |