entities~RelationshipManager(applicationContext)

Management service for relationships between entities.

new RelationshipManager(applicationContext)

Constructs the RelationshipManager.
Parameters:
Name Type Description
applicationContext object The application context.

Methods

create(relationshipType, startEntity, endEntity) → {Relationship}

Creates a new relationship.
Parameters:
Name Type Description
relationshipType RelationshipType The relationship type.
startEntity Entity The start entity.
endEntity Entity The end entity.
Returns:
Relationship - The relationship.

getAll() → {Array.<Relationship>}

Returns all relationships.
Returns:
Array.<Relationship> - The list of relationships.

getByUuid(uuid) → {Relationship}

Returns the relationship with the given uuid.
Parameters:
Name Type Description
uuid string The uuid of the relationship.
Returns:
Relationship - The relationship.

remove(relationship)

Removes the given relationship.
Parameters:
Name Type Description
relationship Relationship The relationship.