RelationshipClass Class

A Typescript class representation of a ECRelationshipClass.

Extends

Methods

Name Description
fromJSON(relationshipClassProps: RelationshipClassProps): Promise<void>    
fromJSONSync(relationshipClassProps: RelationshipClassProps): void    
toJSON(standalone: booleanfalse, includeSchemaVersion: booleanfalse): RelationshipClassProps Save this RelationshipClass's properties to an object for serializing to JSON.  
isRelationshipClass(item?: SchemaItem): item is RelationshipClass Static Type guard to check if the SchemaItem is of type RelationshipClass.  

Inherited methods

Name Inherited from Description
createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty> Protected Inherited ECClass Creates a PrimitiveArrayECProperty.
createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty> Protected Inherited ECClass  
createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty Protected Inherited ECClass Creates a PrimitiveArrayECProperty.
createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty Protected Inherited ECClass  
createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty> Protected Inherited ECClass Creates a PrimitiveECProperty.
createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty> Protected Inherited ECClass  
createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty Protected Inherited ECClass Creates a PrimitiveECProperty.
createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty Protected Inherited ECClass  
getAllBaseClasses(): AsyncIterable<ECClass, any, any> Inherited ECClass Iterates (recursively) over all base classes and mixins, in "property override" order.
getAllBaseClassesSync(): Iterable<AnyClass, any, any> Inherited ECClass  
getBaseClassSync(): undefined | ECClass Inherited ECClass  
getCustomAttributes(): Promise<> Inherited ECClass Retrieve all custom attributes in the current class and its bases
getCustomAttributesSync(): Inherited ECClass Retrieve all custom attributes in the current class and its bases.
getDerivedClasses(): Promise<undefined | ECClass[]> Inherited ECClass Gets the derived classes belonging to this class.
getInheritedProperty(name: string): Promise<undefined | Property> Inherited ECClass Searches the base class, if one exists, for the property with the name provided.
getInheritedPropertySync(name: string): undefined | Property Inherited ECClass Searches the base class, if one exists, for the property with the name provided.
getProperties(excludeInherited?: boolean): Promise<Iterable<Property, any, any>> Inherited ECClass Returns the properties on this class and its base classes.
getPropertiesSync(excludeInherited?: boolean): Iterable<Property, any, any> Inherited ECClass Returns the properties on this class and its base classes.
getProperty(name: string, excludeInherited: booleanfalse): Promise<undefined | Property> Inherited ECClass Searches, case-insensitive, for an ECProperty with given the name on this class and, by default, on
getPropertySync(name: string, excludeInherited: booleanfalse): undefined | Property Inherited ECClass Searches, case-insensitive, for a local ECProperty with the name provided.
is(targetClass: string, schemaName: string): Promise<boolean> Inherited ECClass Indicates if the targetClass is of this type.
is(targetClass: ECClass): Promise<boolean> Inherited ECClass  
isSync(targetClass: ECClass): boolean Inherited ECClass A synchronous version of the ECClass.is, indicating if the targetClass is of this type.
traverseBaseClasses(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): Promise<boolean> Inherited ECClass Asynchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback
traverseBaseClassesSync(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): boolean Inherited ECClass Synchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback
equalByKey(thisSchemaItem: SchemaItem, thatSchemaItemOrKey?: SchemaItemKey | SchemaItem): boolean Static Inherited ECClass Indicates if the two SchemaItem objects are equal by comparing their respective key properties.
parseFullName(fullName: string): [string, string] Static Inherited ECClass Parses the given full name, {schemaName}.{schemaItemName} or {schemaName}:{schemaItemName}, into two separate strings.

Properties

Name Type Description
schemaItemType Readonly SchemaItemType Get the type of item represented by this instance  
source Accessor ReadOnly RelationshipConstraint    
strength Accessor ReadOnly StrengthType    
strengthDirection Accessor ReadOnly StrengthDirection    
target Accessor ReadOnly RelationshipConstraint    

Inherited properties

Name Type Inherited from Description
baseClass Accessor Inherited ReadOnly undefined | LazyLoadedECClass ECClass Gets the base class if it exists, otherwise returns undefined.
customAttributes Accessor Inherited ReadOnly undefined | ECClass  
description Accessor Inherited ReadOnly undefined | string ECClass  
fullName Accessor Inherited ReadOnly string ECClass  
hasLocalProperties Accessor Inherited ReadOnly boolean ECClass Quick way to check whether this class has any local properties without having to use the iterable
key Accessor Inherited ReadOnly SchemaItemKey ECClass  
label Accessor Inherited ReadOnly undefined | string ECClass  
modifier Accessor Inherited ReadOnly ECClassModifier ECClass  
name Accessor Inherited ReadOnly string ECClass  
schema Readonly Inherited Schema ECClass  

Defined in

Last Updated: 26 April, 2025