public interface Relationship
extends java.util.Map<java.lang.String,java.lang.Object>
Relationship
specifies an edge in the social graph and represents
the relationship between two graph nodes (users, groups, topics).Modifier and Type | Method and Description |
---|---|
void |
delete()
Deletes this relationship.
|
<T> T |
get(java.lang.String name,
java.lang.Class<T> type)
Get a named property and convert it into the given type.
|
<T> T |
get(java.lang.String name,
T defaultValue)
Get a named property and convert it into the given type.
|
GraphNode |
getEndNode()
Returns the ending node of this relationship
|
GraphNode |
getOtherNode(GraphNode node)
A convenience operation that, given a node that is attached to this relationship, returns the other node.
|
GraphNode |
getStartNode()
Returns the starting node of this relationship
|
java.lang.String |
getType()
Returns the type of this relationship.
|
boolean |
isBidirectional()
Convenience operation that checks if this relationship is also established in the other direction.
|
boolean |
isVirtual()
Specifies tha this relationship is virtual and is not (and will never be) backed by a persistence object.
|
java.lang.String |
signature()
Returns a signature of the relationship of the form:
startNodeId ":" type ":" endNodeId ,
with the ids and type url encoded. |
GraphNode getStartNode()
GraphNode getEndNode()
GraphNode getOtherNode(GraphNode node)
node
- the start or end node of this relationshipboolean isBidirectional()
true
if this relationship is bidirectional.java.lang.String getType()
boolean isVirtual()
true
if this node is virtual.void delete()
java.lang.String signature()
startNodeId ":" type ":" endNodeId
,
with the ids and type url encoded. the equals and hash methods should use this signature for equality check.<T> T get(java.lang.String name, java.lang.Class<T> type)
T
- the typename
- The name of the propertytype
- The class of the typenull
if
non existing or can't be converted.<T> T get(java.lang.String name, T defaultValue)
T
- the typename
- The name of the propertydefaultValue
- The default value to use if the named property does
not exist or cannot be converted to the requested type. The
default value is also used to define the type to convert the
value to. If this is null
any existing property is
not converted."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"