Object definitions

A business object is an entity that is stored on the HCL Commerce Server, but is represented in the Management Center user interface in a way that a business user can understand. This representation can be a different representation than you would see in the HCL Commerce Server itself. A business user can create, update, and delete a business object by using Management Center. For example, a product is a business object which a Product Manager or Category Manager authors and maintains with Management Center.

A model object is the client-side (Management Center) representation of a business object. Do not directly instantiate the cmc/foundation/ModelObject class since the client side model instantiates and destroys instances of this class, as required. All business object properties are instances of cmc/foundation/ModelProperty and are owned by a single instance of cmc/foundation/ModelObject.

The cmc/foundation/ObjectDefinition class is the base class of all business object definition classes and describes the characteristics of a business object in the Management Center. Do not directly instantiate the ObjectDefinition class. Instead, instantiate the classes that extend from it, such as cmc/foundation/ChildObjectDefinition and cmc/foundation/OrganizationalObjectDefinition.

It is important to understand the types of objects that the Management Center framework supports and their hierarchy and class inheritance. Here is a diagram to illustrate this inheritance:


Business objects that show the inherited object definition classes
cmc/foundation/ObjectDefinition
At the top level is the business object definition (as defined in the ObjectDefinition class).
cmc/foundation/PrimaryObjectDefinition
The PrimaryObjectDefinition class is a direct subclass of the ObjectDefinition class. A primary object definition describes a top level business object that exists as its own entity, independent of other objects. To declare that a Business Object Editor should manage a primary object, create an instance of that primary object definition as a child of the BusinessObjectEditor class. For example, a product is a primary object for the Catalogs tool.
cmc/foundation/OrganizationalObjectDefinition
The OrganizationalObjectDefinition class is a direct subclass of the ObjectDefinition class. An organizational object describes a node within the Management Center explorer view. It has no representation on the HCL Commerce Server. Organizational objects are available only for organizing the display of business objects and is typically used to group objects within the explorer view. For example, the Campaigns node within the explorer view for the Marketing tool is an organizational object.
cmc/foundation/ChildObjectDefinition
The ChildObjectDefinition class is a direct subclass of the ObjectDefinition. A child object definition describes a secondary business object. A child object must have a parent object. The parent object can be a primary object or another child object. To declare that an object has child objects of a specific type, create an instance of the child object definition as a child of the parent object definition. For example, a product can have multiple product descriptions. The product description object definition is instantiated as a child of the product object definition.
cmc/foundation/TopObjectDefinition
The TopObjectDefinition class is a direct subclass of the OrganizationalObjectDefinition class. The top object definition is an organizational object definition that describes the root object for an instance of the BusinessObjectEditor class. This root object is the starting point for populating the Management Center explorer tree. When the Business Object Editor is initialized, the objects in the tree are populated using the top object definition's template declaration and its get children service declarations. Only one top object definition can be declared for each Business Object Editor.
cmc/foundation/ReferenceObjectDefinition
The ReferenceObjectDefinition class is a special type of ChildObjectDefinition that describes a type of relationship between two primary objects. For example, a merchandising association that describes a cross-sell between two products is modeled using a reference object definition.
cmc/foundation/ParentReferenceObjectDefinition
The ParentReferenceObjectDefinition class is a direct subclass of the ReferenceObjectDefinition class. A parent reference object definition describes a parent-child relationship between two primary objects. A child object can have only one parent. For example, there is a parent-child relationship between categories and products.
cmc/foundation/CollectionReferenceObjectDefinition
The CollectionReferenceObjectDefinition class is a direct subclass of the ReferenceObjectDefinition class. A collection reference object definition describes a parent-child relationship between two primary objects. The parent object is the collection object and the child object is a member object in the collection. A member object can belong to more than one collection object.