public class MappedRelationship extends Object implements Mappable
startNodeId - relationshipId - relationshipType - endNodeId
The relationshipId is recorded for relationship entities, and not for simple relationships.
The relationship direction is always OUTGOING from the startNodeId to the endNodeId.
The startNodeType and endNodeType represent the class type of the entities on either end of the relationship, and may be a relationship entity class.| Constructor and Description |
|---|
MappedRelationship(long startNodeId,
String relationshipType,
long endNodeId,
Class startNodeType,
Class endNodeType) |
MappedRelationship(long startNodeId,
String relationshipType,
long endNodeId,
Long relationshipId,
Class startNodeType,
Class endNodeType) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
The default state for an existing relationship
is active, meaning that we don't expect to
delete it when the transaction commits.
|
void |
deactivate()
Deactivating a relationship marks it for
deletion, meaning that, unless it is
subsequently reactivated, it will be
removed from the database when the
transaction commits.
|
boolean |
equals(Object o) |
long |
getEndNodeId() |
Class |
getEndNodeType() |
Long |
getRelationshipId() |
String |
getRelationshipType() |
long |
getStartNodeId() |
Class |
getStartNodeType() |
int |
hashCode() |
boolean |
isActive() |
void |
setRelationshipId(Long relationshipId) |
public MappedRelationship(long startNodeId,
String relationshipType,
long endNodeId,
Class startNodeType,
Class endNodeType)
public long getStartNodeId()
getStartNodeId in interface Mappablepublic String getRelationshipType()
getRelationshipType in interface Mappablepublic long getEndNodeId()
getEndNodeId in interface Mappablepublic Long getRelationshipId()
public void setRelationshipId(Long relationshipId)
public void activate()
public void deactivate()
public boolean isActive()
public Class getEndNodeType()
getEndNodeType in interface Mappablepublic Class getStartNodeType()
getStartNodeType in interface MappableCopyright © 2016 Neo Technology, Inc.. All rights reserved.