Package com.graphaware.common.json
Class LongIdJsonNode
- java.lang.Object
-
- com.graphaware.common.representation.DetachedEntity<ID,Node>
-
- com.graphaware.common.representation.DetachedNode<ID>
-
- com.graphaware.common.representation.SerializableNode<ID>
-
- com.graphaware.common.json.JsonNode<Long>
-
- com.graphaware.common.json.LongIdJsonNode
-
- All Implemented Interfaces:
DetachedNodeExpressions
,EntityExpressions
,Serializable
public class LongIdJsonNode extends JsonNode<Long>
JsonNode
withLong
custom ID. Can be easily used to directly represent Neo4j nodes by using constructors without supplyingNodeIdTransformer
. In these cases,TrivialNodeIdTransformer
is used and custom node ID becomes the internal Neo4j node ID. 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 LongIdJsonNode()
LongIdJsonNode(long id)
LongIdJsonNode(long id, String[] labels, Map<String,Object> properties)
LongIdJsonNode(String[] labels, Map<String,Object> properties)
LongIdJsonNode(Node node)
LongIdJsonNode(Node node, NodeIdTransformer<Long> transformer)
LongIdJsonNode(Node node, String[] properties)
LongIdJsonNode(Node node, String[] properties, NodeIdTransformer<Long> transformer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Node
produceEntity(Transaction tx)
Produce aEntity
from this representation.-
Methods inherited from class com.graphaware.common.json.JsonNode
getGraphId
-
Methods inherited from class com.graphaware.common.representation.SerializableNode
equals, getId, hashCode, produceEntity, setId
-
Methods inherited from class com.graphaware.common.representation.DetachedNode
checkCanFetch, create, fetch, getLabels, populate, setLabels
-
Methods inherited from class com.graphaware.common.representation.DetachedEntity
checkCanCreate, getProperties, 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.DetachedNodeExpressions
hasLabel
-
Methods inherited from interface com.graphaware.common.expression.EntityExpressions
getProperties, getProperty, getProperty, hasProperty
-
-
-
-
Constructor Detail
-
LongIdJsonNode
public LongIdJsonNode()
-
LongIdJsonNode
public LongIdJsonNode(Node node)
-
LongIdJsonNode
public LongIdJsonNode(Node node, NodeIdTransformer<Long> transformer)
-
LongIdJsonNode
public LongIdJsonNode(Node node, String[] properties, NodeIdTransformer<Long> transformer)
-
LongIdJsonNode
public LongIdJsonNode(long id)
-
-
Method Detail
-
produceEntity
public Node 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,Node>
- Parameters:
tx
- to create/fetch entity in.- Returns:
- entity.
-
-