EntityDef Object
An EntityDef object represents one of the record types in a schema.
In a schema, a record type specifies the metadata for one kind of record. The record type metadata defines the generic structure of that record. Metadata does not include the user data itself. Record type metadata includes the number of fields, the names of the fields, which data type each field must contain, the names of permitted actions, the names of permitted states, and so on.
An EntityDef object is the runtime representation of a record type. An EntityDef object contains information HCL Compass uses to create corresponding Entity objects at runtime. EntityDef objects can be either state-based or stateless. A state-based EntityDef object contains information about the states in which a corresponding Entity object can be placed. A stateless EntityDef object does not have any state information, but does specify which field of the Entity object is used as the unique key.
You cannot create or modify EntityDef objects at
runtime. To create a new EntityDef object, you must define a corresponding
record type using HCL Compass Designer.
You can use an EntityDef object to obtain information about the corresponding
record type. For example, you can use the GetFieldDefNames
, GetActionDefNames
,
and GetStateDefNames
methods
to obtain the names of the record type's fields, actions, and states,
respectively. You can also use the GetFieldDefType
or GetActionDefType
methods
to obtain the type of a particular field or action.
You can use methods of the current Session Object to discover the available EntityDef objects.
BuildEntity
method.