module:baja/tag/RelationSet

module:baja/tag/RelationSet

new (require("baja/tag/RelationSet"))(relations)

Description:
  • Relations is used to store a collection of relation objects. A relations collection
    is semantically equivalent to a mathematical set: it is an unordered collection of
    distinct Relation objects.

Source:
Parameters:
Name Type Description
relations Array.<module:baja/tag/Relation>

An array of relation objects.

Methods

get(id, entityOrdopt)

Description:
  • Return a relation object for the specified id and entity.

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

The id or qname of the
Relation.

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:

module:baja/tag/Relation The relation object or null
if the relation can't be found.

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

Description:
  • Return an array of all of the relations objects.

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

The id or qname of the
Relation. If not defined, the relations will be returned.

Returns:

An array of Relations.

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

isEmpty() → {Boolean}

Description:
  • Return true if there are no relation objects.

Source:
Returns:
Type
Boolean