declare interface to single Building Blocks of the datamodel

Hierarchy

  • BuildingBlock

Index

Methods

addValue

  • addValue(propertyPersistentName: string, value: AttributeValue): boolean
  • For multi value properties, adds the value to the value array. Works only if the value is not already contained.

    Parameters

    • propertyPersistentName: string

      Persistent name of the attribute

    • value: AttributeValue

      New value to add

    Returns boolean

    Whether the operation was successful.

clearValues

  • clearValues(propertyPersistentName: string): boolean
  • Unsets the value for an attribute

    Parameters

    • propertyPersistentName: string

      Persistent name of the attribute

    Returns boolean

    Whether the operation was successful.

connect

  • connect(object2: BuildingBlock, relationendPersistentName: string): boolean
  • Connects an object to the other object via a relation of the given type. If an object can have only one relation an earlier relation is replaced. The objects are connected in both directions.

    Parameters

    • object2: BuildingBlock

      Second Building block to connect to

    • relationendPersistentName: string

      Persistent name of the relationship end to connect to

    Returns boolean

    Whether the operation was successful.

disconnect

  • disconnect(object2: BuildingBlock, relationendPersistentName: string): boolean
  • Disconnects an object from the other object.

    Parameters

    • object2: BuildingBlock

      Second Building block to disconnect from

    • relationendPersistentName: string

      Persistent name of the relationship end to disconnect from

    Returns boolean

    Whether the operation was successful.

getId

  • getId(): number
  • Id of the building block

    Returns number

getPropertyInfo

  • getPropertyInfo(propertyPersistentName: string): PropertyInfo
  • Gets inner properties of Building Block attribute by its persistent name (mandatory, multiple and type attribute properties are available)

    Parameters

    • propertyPersistentName: string

      Persistent name of the attribute

    Returns PropertyInfo

getRelatedObject

  • getRelatedObject(relationEndPersistentName: string): BuildingBlock | null
  • Get the assigned object for a single assignment relation, does not work for multi assignment relations.

    Parameters

    • relationEndPersistentName: string

      Persistent name of the relation end

    Returns BuildingBlock | null

    The related building block or null if no building block exists on the relation end

getRelatedObjects

  • getRelatedObjects(relationEndPersistentName: string): BuildingBlock[]
  • Get an array of objects for a multi assignment relation, does not work for single assignment relations.

    Parameters

    • relationEndPersistentName: string

      Persistent name of the relation end

    Returns BuildingBlock[]

getValue

  • Get the value for a property that can have only a single value. Does not work for multi value properties.

    Parameters

    • propertyPersistentName: string

      Persistent name of the attribute

    Returns AttributeValue

getValues

  • Get the array of values for a property that can have more than one value. Returns empty array if no values are assigned. Does not work for single value properties.

    Parameters

    • propertyPersistentName: string

      Persistent name of the attribute

    Returns AttributeValue[]

remove

  • remove(): void
  • Removes the corresponding Object from the model.

    Returns void

removeValue

  • removeValue(propertyPersistentName: string, value: AttributeValue): boolean
  • For multi value properties, removes the value from the value array. Works only if the value is contained.

    Parameters

    • propertyPersistentName: string

      Persistent name of the attribute

    • value: AttributeValue

      Existing value to remove

    Returns boolean

    Whether the operation was successful.

setValue

  • setValue(propertyPersistentName: string, value: AttributeValue): boolean
  • for single value properties, replaces the current value with the new value

    Parameters

    • propertyPersistentName: string

      Persistent name of the attribute

    • value: AttributeValue

      New value to set

    Returns boolean

    Whether the operation was successful.

setValues

  • setValues(propertyPersistentName: string, values: AttributeValue[]): boolean
  • For multi value properties, replaces the current value array with a new array of values

    Parameters

    • propertyPersistentName: string

      Persistent name of the attribute

    • values: AttributeValue[]

      New values to set

    Returns boolean

    Whether the operation was successful.

Legend

Generated using TypeDoc