Entity Class

Represents one of the fundamental building block in an IModelDb: as an Element, Model, or Relationship. Every subclass of Entity represents one BIS ECClass. An Entity is typically instantiated from an EntityProps and can be converted back to this representation via Entity.toJSON.

Extended by

Methods

Name Description
constructor(props: EntityProps, iModel: IModelDb): Entity Protected    
collectReferenceIds(_referenceIds: EntityReferenceSet): void Protected Collect the Ids of this entity's references at this level of the class hierarchy.  
forEachProperty(func: PropertyCallback, includeCustom: booleantrue): void Call a function for each property of this Entity.  
query metadata for this entity class from the iModel's schema  
getReferenceIds(): EntityReferenceSet Get the set of this entity's entity references, EntityReferenceSet.  
toJSON(): EntityProps Obtain the JSON representation of this Entity.  
is(otherClass: ): boolean Static return whether this Entity class is a subclass of another Entity class  

Properties

Name Type Description
classFullName Accessor ReadOnly string Get the full BIS class name of this Entity in the form "schema:class".  
classFullName Accessor Static ReadOnly string Get the full BIS class name of this Entity in the form "schema:class"  
className Accessor ReadOnly string The name of the BIS class associated with this class.  
className Accessor Static ReadOnly string The name of the BIS class associated with this class.  
id string The Id of this Entity.  
iModel IModelDb The IModelDb that contains this Entity  
isInstanceOfEntity Readonly "true" An immutable property used to discriminate between Entity and EntityProps, used to inform the TypeScript compiler that these two types  
schema Static The Schema that defines this class.  
schemaItemKey Accessor Static ReadOnly SchemaItemKey Serves as a unique identifier for this class.  
schemaItemKey Accessor ReadOnly SchemaItemKey Get the item key used by the ecschema-metadata package to identify this entity class  
schemaName Accessor ReadOnly string The name of the BIS Schema that defines this class  

Defined in

Last Updated: 20 February, 2025