new (require("baja/tag/SmartRelation"))(directRelations, impliedRelations)
- Description:
SmartRelations holds a collection of both direct and implemented
module:baja/tag/Relation objects.
- 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 |
|
entityOrd |
String | baja.Ord |
<optional> |
The Entity ORD we're looking for. |
Returns:
The Relation object
or null if nothing can be found.
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