new (require("baja/tag/Relation"))(id, entityOrd, tagsopt, inbound)
- Description:
A relation is a taggable Id and Entity pair.
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
id |
module:baja/tag/Id | String | The Id of the relation. A |
|
entityOrd |
String | baja.Ord | The target entity ORD for the relation. |
|
tags |
Object |
<optional> |
The tags for the relation or a function |
inbound |
Boolean | whether this relation is inbound (inbound = false implied outbound) |
Methods
equals(o) → {Boolean}
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
o |
The object used for comparison. |
Returns:
Returns true if the object is equal to this relation.
- Type
- Boolean
getEndpointOrd()
- Source:
Returns:
Returns the ORD to the Relation's Entity.
getId() → {module:baja/tag/Id}
- Source:
Returns:
The relation's Id
or null if there isn't one.
- Type
- module:baja/tag/Id
getInbound() → {Boolean}
- Description:
Test for inbound relation relative to entity where the relation is stored
- Source:
- Since:
- Niagara 4.15
Returns:
true if relation is an inbound relation
- Type
- Boolean
isInbound() → {Boolean}
- Description:
Test for inbound relation relative to entity where the relation is stored
- Source:
- Since:
- Niagara 4.15
Returns:
true if relation is an inbound relation
- Type
- Boolean
isOutbound() → {Boolean}
- Description:
Test for outbound relation relative to entity where the relation is stored
- Source:
- Since:
- Niagara 4.15
Returns:
true if relation is an outbound relation
- Type
- Boolean
tags() → {Promise}
- Source:
Returns:
A promise that resolves to a Tags object.
- Type
- Promise
toEndpoint()
- Source:
Returns:
Returns a Promise that resolves to a Relation's Entity.