Modifier

Partager via


Entity

An entity is the basic building block of the object model. It provides a concrete placeholder for a user to attach certain information to a concept. It's a collection of attributes that creates a semantic meaning of why these attributes coexist. Since entities can inherit from other entities, it's possible for them to represent a hierarchical structure. The hierarchical structure can also be removed from the entities by resolving them.

public class CdmEntityDefinition extends CdmObjectDefinitionBase, CdmReferencesEntities

CdmEntityDefinition extends CdmObjectDefinition, CdmReferencesEntities in Python.
CdmEntityDefinition extends CdmObjectDefinitionBase in TypeScript.

Constructors

Name Description
CdmEntityDefinition(CdmCorpusContext, string, CdmEntityReference)
ctx: The corpus context.
entityName: The entity's name.
extendsEntity [optional]: The entity extended by this entity.
Initializes a new instance of the CdmEntityDefinition class.

Properties

Name Type Description
EntityName string The entity's name.
ExtendsEntity CdmEntityReference The entity extended by this entity.
Attributes CdmCollection<CdmAttributeItem> The collection of attributes for this entity.
AttributeContext CdmAttributeContext The entity's attribute context.
DisplayName string The entity's display name.
SourceName string The entity's source name - the original entity name from another source system (for example, Dynamics).
Description string The entity's description.
CdmSchemas List<string> The list of Common Data Model entities that the entity "contains" or implements (a set of contracts or interfaces).
Version string The entity's version.
ExtendsEntityResolutionGuidance CdmAttributeResolutionGuidance The resolution guidance for the attributes taken from the entity extended by this entity.
PrimaryKey string The attribute that identifies itself as the primary key.

Methods

Name Description Return Type
CreateResolvedEntityAsync(string, ResolveOptions, CdmFolderDefinition, string)
newEntName: The new entity name.
resOpt [optional]: The resolve options.
folder [optional]: The folder that will be used as a target corpus path. If not specified, InDocument's folder (a property on the entity) is used instead.
newDocName [optional]: The new document name.
Creates a resolved copy of the entity. Task<CdmEntityDefinition>
GetName() See CdmObjectDefinition.GetName(). string
IsDerivedFrom(string, ResolveOptions) See CdmObject.IsDerivedFrom(...). bool
Copy(ResolveOptions, CdmObject) See CdmObject.Copy(...). CdmObject
Validate() See CdmObject.Validate(). bool