module:baja/tag/SmartRelation

module:baja/tag/SmartRelation

new (require("baja/tag/SmartRelation"))(directRelations, impliedRelations)

Description:
Source:
Parameters:
Name Type Description
directRelations

A direct Relations implementation.

impliedRelations

An implied Relations implementation.

Methods

get(id, entityOrdopt) → {module:baja/tag/Relation}

Description:
  • Find the specified Relation object via its Id and return it.
    If the Relation can't be found then return null.

Source:
Parameters:
Name Type Attributes Description
id String | module:baja/tag/Id

The Id
used for the search. This can be an Id or a qname for an Id.

entityOrd String | baja.Ord <optional>

The Entity ORD we're looking for.
If this isn't defined, the first matching relation with specified tag is
returned.

Returns:

The Relation object
or null if nothing can be found.

Type
module:baja/tag/Relation

getAll() → {Array.<module:baja/tag/Relation>}

Description:
  • Returns a copy of the contained Relations array.

    Any duplicate relations are filtered out.

Source:
Returns:

An array of Relation objects.

Type
Array.<module:baja/tag/Relation>

getDirectRelations()

Description:
  • Return the direct relations.

Source:
Returns:

The direct Relations.

getImpliedRelations()

Description:
  • Return the implied relations.

Source:
Returns:

the implied relations.

isEmpty() → {Boolean}

Source:
Returns:

Returns true if there are no Relation objects.

Type
Boolean