RelationshipClass Class

A Typescript class representation of a ECRelationshipClass.

Extends

Methods

Name Description
constructor(schema: Schema, name: string, modifier?: ECClassModifier): RelationshipClass    
createNavigationProperty(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): Promise<NavigationProperty> Protected    
createNavigationPropertySync(name: string, relationship: string | RelationshipClass, direction: string | StrengthDirection): NavigationProperty Protected    
fromJSON(relationshipClassProps: RelationshipClassProps): Promise<void>    
fromJSONSync(relationshipClassProps: RelationshipClassProps): void    
toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): RelationshipClassProps Save this RelationshipClass's properties to an object for serializing to JSON.  

Inherited methods

Name Inherited from Description
addCustomAttribute(customAttribute: CustomAttribute): void Protected ECClass  
addProperty<T extends Property<T>>(prop: T): T Protected ECClass Convenience method for adding an already loaded ECProperty used by create*Property methods.
buildPropertyCache(result: Property[], existingValues?: Map<string, number>, resetBaseCaches: boolean = false): Promise<void> Protected ECClass  
buildPropertyCacheSync(result: Property[], existingValues?: Map<string, number>, resetBaseCaches: boolean = false): void Protected ECClass  
createPrimitiveArrayProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveArrayProperty> Protected ECClass Creates a PrimitiveArrayECProperty.
createPrimitiveArrayProperty(name: string, primitiveType: Enumeration): Promise<EnumerationArrayProperty> Protected ECClass  
createPrimitiveArrayPropertySync(name: string, primitiveType: PrimitiveType): PrimitiveArrayProperty Protected ECClass Creates a PrimitiveArrayECProperty.
createPrimitiveArrayPropertySync(name: string, primitiveType: Enumeration): EnumerationArrayProperty Protected ECClass  
createPrimitiveProperty(name: string, primitiveType: PrimitiveType): Promise<PrimitiveProperty> Protected ECClass Creates a PrimitiveECProperty.
createPrimitiveProperty(name: string, primitiveType: Enumeration): Promise<EnumerationProperty> Protected ECClass  
createPrimitivePropertySync(name: string, primitiveType: PrimitiveType): PrimitiveProperty Protected ECClass Creates a PrimitiveECProperty.
createPrimitivePropertySync(name: string, primitiveType: Enumeration): EnumerationProperty Protected ECClass  
createStructArrayProperty(name: string, structType: string | StructClass): Promise<StructArrayProperty> Protected ECClass  
createStructArrayPropertySync(name: string, structType: string | StructClass): StructArrayProperty Protected ECClass  
createStructProperty(name: string, structType: string | StructClass): Promise<StructProperty> Protected ECClass  
createStructPropertySync(name: string, structType: string | StructClass): StructProperty Protected ECClass  
getAllBaseClasses(): AsyncIterableIterator<ECClass> ECClass Iterates (recursively) over all base classes and mixins, in "property override" order.
getAllBaseClassesSync(): Iterable<AnyClass> ECClass  
getBaseClassSync(): undefined | ECClass ECClass  
getCustomAttributes(): Promise<> ECClass Retrieve all custom attributes in the current class and its bases
getCustomAttributesSync(): ECClass Retrieve all custom attributes in the current class and its bases.
getInheritedProperty(name: string): Promise<undefined | Property> ECClass Searches the base class, if one exists, for the property with the name provided.
getInheritedPropertySync(name: string): undefined | Property ECClass Searches the base class, if one exists, for the property with the name provided.
getProperties(resetCache: boolean = false): Promise<Property[]> ECClass Iterates all properties, including the ones merged from base classes and mixins.
getPropertiesSync(resetCache: boolean = false): Property[] ECClass Iterates all properties, including the ones merged from base classes and mixins.
getProperty(name: string, includeInherited: boolean = false): Promise<undefined | Property> ECClass Searches, case-insensitive, for a local ECProperty with the name provided.
getPropertySync(name: string, includeInherited: boolean = false): undefined | Property ECClass Searches, case-insensitive, for a local ECProperty with the name provided.
is(targetClass: string, schemaName: string): Promise<boolean> ECClass Indicates if the targetClass is of this type.
is(targetClass: ECClass): Promise<boolean> ECClass  
isSync(targetClass: ECClass): boolean ECClass A synchronous version of the ECClass.is, indicating if the targetClass is of this type.
loadPrimitiveType(primitiveType: undefined | string | PrimitiveType | Enumeration, schema: Schema): Promise<PrimitiveType | Enumeration> Protected ECClass  
loadPrimitiveTypeSync(primitiveType: undefined | string | PrimitiveType | Enumeration, schema: Schema): PrimitiveType | Enumeration Protected ECClass  
loadStructType(structType: undefined | string | StructClass, schema: Schema): Promise<StructClass> Protected ECClass  
loadStructTypeSync(structType: undefined | string | StructClass, schema: Schema): StructClass Protected ECClass  
traverseBaseClasses(callback: (ecClass: ECClass, arg?: any) => boolean, arg?: any): Promise<boolean> 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 ECClass Synchronously traverses through the inheritance tree, using depth-first traversal, calling the given callback
equalByKey(thisSchemaItem: SchemaItem, thatSchemaItemOrKey?: SchemaItemKey | SchemaItem): boolean Static ECClass Indicates if the two SchemaItem objects are equal by comparing their respective ECClass.key properties.
mergeProperties(target: Property[], existingValues: Map<string, number>, propertiesToMerge: Property[], overwriteExisting: boolean): void ProtectedStatic ECClass  
parseFullName(fullName: string): [string, string] Static ECClass Parses the given full name, {schemaName}.{schemaItemName} or {schemaName}:{schemaItemName}, into two separate strings.

Properties

Name Type Description
_source Protected RelationshipConstraint    
_strength Protected StrengthType    
_strengthDirection Protected StrengthDirection    
_target Protected RelationshipConstraint    
schema Readonly Schema    
schemaItemType Readonly RelationshipClass    
source Accessor ReadOnly RelationshipConstraint    
strength Accessor ReadOnly StrengthType    
strengthDirection Accessor ReadOnly StrengthDirection    
target Accessor ReadOnly RelationshipConstraint    

Inherited properties

Name Type Inherited from Description
_baseClass Protected undefined | LazyLoadedECClass ECClass  
_description Protected undefined | string ECClass  
_key Protected SchemaItemKey ECClass  
_label Protected undefined | string ECClass  
_modifier Protected ECClassModifier ECClass  
_properties Protected undefined | Map<string, Property> ECClass  
baseClass Accessor undefined | LazyLoadedECClass ECClass  
customAttributes Accessor ReadOnly undefined | ECClass  
description Accessor ReadOnly undefined | string ECClass  
fullName Accessor ReadOnly string ECClass  
key Accessor ReadOnly SchemaItemKey ECClass  
label Accessor ReadOnly undefined | string ECClass  
modifier Accessor ReadOnly ECClassModifier ECClass  
name Accessor ReadOnly string ECClass  
properties Accessor ReadOnly undefined | IterableIterator<Property> ECClass  

Defined in

Last Updated: 15 March, 2024