Welcome to Zuora Product Documentation

Explore our rich library of product information

DataObject class

This article describes the methods of DataObject global class..

DataObject Class Global Methods

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.

The following methods can be called from instances of the zqu.DataObject class.
Return TypeMethodDescription
StringgetObjectType()Returns the API Name of the SObject represented by this DataObject.
Objectget(String fieldName)Retrieves a field value from the record.
voidput(String fieldName, Object value)Sets a field value on the record.
voidputParent(String fieldName, zqu.DataObject relatedObject)Links a parent record.
voidaddChild(String fieldName, zqu.DataObject relatedObject)Links a child record.
voidremoveChild(zqu.DataObject relatedObject)Unlinks a child record.
zqu.DataObjectgetParent(String objectName)Retrieves a parent record, by relationship name.
List <zqu.DataObject> getChildren(String objectName)Retrieves all child records, by object name.
voidflagAdded()Indicates a record was just added.
BooleanisAdded()Indicates a record was just added.
voidflagRequired()Indicates an added record cannot be removed.
BooleanisRequired()Indicates an added record cannot be removed.
voidflagRemoved()Indicates a record was just removed.
BooleanisRemoved()Indicates a record was just removed.
Stringdescribe()Readable representation of the record.