Package com.graphaware.common.json
Class LongIdJsonRelationship
- java.lang.Object
-
- com.graphaware.common.representation.DetachedEntity<ID,Relationship>
-
- com.graphaware.common.representation.DetachedRelationship<ID,SerializableNode<ID>>
-
- com.graphaware.common.representation.SerializableRelationship<ID>
-
- com.graphaware.common.json.JsonRelationship<Long>
-
- com.graphaware.common.json.LongIdJsonRelationship
-
- All Implemented Interfaces:
DetachedRelationshipExpressions
,EntityExpressions
,Serializable
public class LongIdJsonRelationship extends JsonRelationship<Long>
JsonRelationship
withLong
custom ID. Can be easily used to directly represent Neo4j relationships by using constructors without supplyingNodeIdTransformer
orRelationshipIdTransformer
. In these cases,TrivialNodeIdTransformer
andTrivialRelationshipIdTransformer
are used and custom node/relationship IDs become the internal Neo4j node IDs. It is recommended, however, that true custom IDs are used, such as UUIDs.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.graphaware.common.representation.DetachedEntity
NEW
-
-
Constructor Summary
Constructors Constructor Description LongIdJsonRelationship()
LongIdJsonRelationship(long id)
LongIdJsonRelationship(long id, long startNodeId, long endNodeId, String type, Map<String,Object> properties)
LongIdJsonRelationship(long startNodeId, long endNodeId, String type, Map<String,Object> properties)
LongIdJsonRelationship(Relationship relationship)
LongIdJsonRelationship(Relationship relationship, RelationshipIdTransformer<Long> relationshipIdTransformer, NodeIdTransformer<Long> nodeIdTransformer)
LongIdJsonRelationship(Relationship relationship, String[] properties)
LongIdJsonRelationship(Relationship relationship, String[] properties, RelationshipIdTransformer<Long> relationshipIdTransformer, NodeIdTransformer<Long> nodeIdTransformer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Relationship
produceEntity(Transaction tx)
Produce aEntity
from this representation.-
Methods inherited from class com.graphaware.common.json.JsonRelationship
getEndNodeGraphId, getGraphId, getStartNodeGraphId
-
Methods inherited from class com.graphaware.common.representation.SerializableRelationship
endNode, equals, getEndNodeId, getId, getStartNodeId, hashCode, produceEntity, setEndNodeId, setId, setStartNodeId, startNode
-
Methods inherited from class com.graphaware.common.representation.DetachedRelationship
checkCanCreate, checkCanFetch, create, fetch, getEndNode, getStartNode, getType, setEndNodeGraphId, setStartNodeGraphId, setType
-
Methods inherited from class com.graphaware.common.representation.DetachedEntity
getProperties, populate, propertyKeySetAsStringArray, putProperty, setGraphId, setProperties
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.graphaware.common.expression.DetachedRelationshipExpressions
isType
-
Methods inherited from interface com.graphaware.common.expression.EntityExpressions
getProperties, getProperty, getProperty, hasProperty
-
-
-
-
Constructor Detail
-
LongIdJsonRelationship
public LongIdJsonRelationship()
-
LongIdJsonRelationship
public LongIdJsonRelationship(Relationship relationship, RelationshipIdTransformer<Long> relationshipIdTransformer, NodeIdTransformer<Long> nodeIdTransformer)
-
LongIdJsonRelationship
public LongIdJsonRelationship(Relationship relationship)
-
LongIdJsonRelationship
public LongIdJsonRelationship(Relationship relationship, String[] properties, RelationshipIdTransformer<Long> relationshipIdTransformer, NodeIdTransformer<Long> nodeIdTransformer)
-
LongIdJsonRelationship
public LongIdJsonRelationship(Relationship relationship, String[] properties)
-
LongIdJsonRelationship
public LongIdJsonRelationship(long id)
-
LongIdJsonRelationship
public LongIdJsonRelationship(long id, long startNodeId, long endNodeId, String type, Map<String,Object> properties)
-
-
Method Detail
-
produceEntity
public Relationship produceEntity(Transaction tx)
Description copied from class:DetachedEntity
Produce aEntity
from this representation. This means either fetch the entity from the given tx (iff id is set), or create it.- Overrides:
produceEntity
in classDetachedEntity<Long,Relationship>
- Parameters:
tx
- to create/fetch entity in.- Returns:
- entity.
-
-