Entity Class @preview
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. | |
forEach(func: PropertyHandler, includeCustom: booleantrue): void | Call a function for each property of this Entity. | |
forEachProperty(func: PropertyCallback, includeCustom: booleantrue): void | Call a function for each property of this Entity. | Deprecated |
getMetaData(): Promise<EntityClass> | 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. | |
deserialize(props: DeserializeEntityArgs): EntityProps Static | Converts an ECSqlRow of an Entity to an EntityProps. | |
is(otherClass: ): boolean Static | return whether this Entity class is a subclass of another Entity class | |
serialize(props: EntityProps, _iModel: IModelDb): ECSqlRow Static | Converts an EntityProps to an ECSqlRow. |
Properties
Name | Type | Description | |
---|---|---|---|
_customHandledProps Protected Static Readonly | CustomHandledProperty[] | List of properties that are need to be custom handled during deserialization and serialization. | |
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
- core/backend/src/Entity.ts Line 51
Last Updated: 27 June, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.