public class Relationship
extends java.lang.Object
Relationships connect nodes and are comprised of an id, type and start/end node id's.
Again, similar to Nodes, relationship id's SHOULD NOT BE USED to identify a relationship.
| Constructor and Description |
|---|
Relationship(long id,
java.lang.String type,
long startNodeId,
long endNodeId,
java.util.Map<java.lang.String,java.lang.Object> properties)
Creates a new relationship to connect two Nodes.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getEndNodeId()
Retrieves the relationships end node id.
|
long |
getId()
Returns this relationship's id.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Returns a map of properties stored in this Relationship.
|
long |
getStartNodeId()
Retrieves the relationships origin node id.
|
java.lang.String |
getType()
Returns this node's type.
|
public Relationship(long id,
java.lang.String type,
long startNodeId,
long endNodeId,
java.util.Map<java.lang.String,java.lang.Object> properties)
id - The Neo4J Specific id for this relationship. Do not use this as a real identifier outside of the scope of
this request.type - The type of this relationship. Usually a verb type name.startNodeId - The first node that this relationship connects. That is the direction originates from here.endNodeId - THe end node that this relationship connects. The direction terminates here.properties - Like Nodes, Relationships can store properties.public long getId()
public long getEndNodeId()
public long getStartNodeId()
public java.lang.String getType()
public java.util.Map<java.lang.String,java.lang.Object> getProperties()