Complex Data

The classes defined in the business object model (BOM) are represented in the runtime JavaScript API.

A parameter or data field's data type can be defined as an external reference to a class defined in a BOM, or in dependent projects. Each attribute defined in a class results in a corresponding attribute-name property, where attribute-name is the BOM attribute name. For example, a BOM class Customer that has a firstName attribute (specified as Text type in the BOM in this example) generates a Customer class with the property:

String firstName;

 

In addition, the getClass() method is available, which returns the class object for the class with the given name:

getClass(className)

where:

  • className is a fully qualified name of the BOM JavaScript class. This must be a class managed by the given factory.

The method and properties listed below are available on the class object returned from getClass(className).

Method / Property Return Value Description
getName() String Returns the fully qualified name of the class.
ATTRIBUTE_NAMES String[] Returns a JavaScript string array containing the names of all attributes for this class. These are names as defined in the BOM for this class and all of its super-classes. For complex children, these correspond to the name of the association endpoint for the child.

This array is the union of attribute names retrieved using PRIMITIVE_ATTRIBUTE_NAMES and COMPOSITE_ATTRIBUTE_NAMES.

This array should not be modified.

PRIMITIVE_ATTRIBUTE_NAMES String[] Returns a JavaScript string array. These are attributes with simple data types, that is, primitive types and enumerations. These are names as defined in the BOM for this class and all of its super-classes. This includes both single- and multi-valued attributes.

This array should not be modified.

COMPOSITE_ATTRIBUTE_NAMES String[] Returns a JavaScript string array containing the names of all complex children of this class. These are names of the association endpoints for these children as defined in the BOM for this class and all of its super-classes. This includes both single- and multi-valued attributes.

This array should not be modified.