Skip to main content

DataObject Class

Zuora

DataObject Class

The DataObject class is used by Zuora Rules Engine to represent a record. The primary functions of DataObjects are to set and retrieve fields from their objects.

DataObject Class Global Methods

The following methods can be called from instances of the zqu.DataObject class.

Return Type Methid Description
String

getObjectType()

Returns the API Name of the SObject represented by this DataObject.
Object

get
(String fieldName)

Retrieves a field value from the record.
void

put
(String fieldName, Object value)

Sets a field value on the record.
void

putParent
(String fieldName, zqu.DataObject relatedObject)

Links a parent record.
void

addChild
(String fieldName, zqu.DataObject relatedObject)

Links a child record.
void

removeChild
(zqu.DataObject relatedObject)

Unlinks a child record.
zqu.DataObject

getParent
(String objectName)

Retrieves a parent record, by relationship name.
List <zqu.DataObject> 

getChildren
(String objectName)

Retrieves all child records, by object name.
void

flagAdded()

Indicates a record was just added.
Boolean isAdded() Indicates a record was just added.
void

flagRequired()

Indicates an added record cannot be removed.
Boolean isRequired() Indicates an added record cannot be removed.
void

flagRemoved()

Indicates a record was just removed.
Boolean isRemoved() Indicates a record was just removed.
String

describe()

Readable representation of the record.