Module: baja/tag/Relation


new (require("baja/tag/Relation"))(id, entityOrd [, tags])

A relation is a taggable Id and Entity pair.

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

The Id of the relation. A
qname string can also be passed in.

entityOrd String | baja.Ord

The target entity ORD for the relation.

tags Object <optional>

The tags for the relation or a function
that returns a promise that resolves to a tags object.

Methods


equals(o)

Parameters:
Name Type Description
o

The object used for comparison.

Returns:

Returns true if the object is equal to this relation.

Type
Boolean

getEndpointOrd()

Returns:

Returns the ORD to the Relation's Entity.


getId()

Returns:

The relation's Id
or null if there isn't one.

Type
module:baja/tag/Id

tags()

Returns:

A promise that resolves to a Tags object.

Type
Promise

toEndpoint()

Returns:

Returns a Promise that resolves to a Relation's Entity.