RelationshipConstraint Class

A Typescript class representation of a ECRelationshipConstraint.

Implements

Methods

Name Description
constructor(relClass: RelationshipClass, relEnd: RelationshipEnd, roleLabel?: string, polymorphic?: boolean): RelationshipConstraint    
addClass(constraint: EntityClass | Mixin | RelationshipClass): void Adds the provided class as a constraint class to this constraint.  
addCustomAttribute(customAttribute: CustomAttribute): void Protected    
fromJSON(relationshipConstraintProps: RelationshipConstraintProps): Promise<void>    
fromJSONSync(relationshipConstraintProps: RelationshipConstraintProps): void    
removeClass(constraint: EntityClass | Mixin | RelationshipClass): void Protected Removes the provided class as a constraint class from this constraint.  
supportsClass(ecClass: ECClass): Promise<boolean> Indicates if the provided ECClass is supported by this RelationshipConstraint.  
toJSON(): RelationshipConstraintProps Save this RelationshipConstraint's properties to an object for serializing to JSON.  
classCompatibleWithConstraint(constraintClass: ECClass, testClass: ECClass, isPolymorphic: boolean): Promise<boolean> Static Indicates if an ECClass is of the type or applies to the type (if a mixin) of the ECClass specified by the constraintClass parameter.  

Properties

Name Type Description
_abstractConstraint Protected undefined | LazyLoadedRelationshipConstraintClass    
_constraintClasses Protected undefined | LazyLoadedRelationshipConstraintClass[]    
_multiplicity Protected undefined | RelationshipMultiplicity    
_polymorphic Protected undefined | boolean    
_relationshipClass Protected RelationshipClass    
_relationshipEnd Protected RelationshipEnd    
_roleLabel Protected undefined | string    
abstractConstraint Accessor undefined | LazyLoadedRelationshipConstraintClass    
constraintClasses Accessor ReadOnly undefined | LazyLoadedRelationshipConstraintClass[]    
customAttributes Accessor ReadOnly undefined |    
fullName Accessor ReadOnly string Returns the constraint name, ie.  
isSource Accessor ReadOnly boolean True if this RelationshipConstraint is the Source relationship end.  
multiplicity Accessor RelationshipMultiplicity    
polymorphic Accessor boolean    
relationshipClass Accessor ReadOnly RelationshipClass    
relationshipEnd Accessor RelationshipEnd    
roleLabel Accessor undefined | string    
schema Accessor ReadOnly Schema Returns the schema of the RelationshipClass.  

Defined in

Last Updated: 28 March, 2024