Class SerializableNode<ID>

    • Constructor Detail

      • SerializableNode

        public SerializableNode()
        Public no-arg constructor (for Jackson et. al.)
      • SerializableNode

        public SerializableNode​(Node node,
                                NodeIdTransformer<ID> transformer)
        Create a Serializable DetachedNode from a Neo4j node. All properties will be included.
        Parameters:
        node - node to create the representation from.
        transformer - ID transformer.
      • SerializableNode

        public SerializableNode​(Node node,
                                String[] properties,
                                NodeIdTransformer<ID> transformer)
        Create a Serializable DetachedNode from a Neo4j node.
        Parameters:
        node - node to create the representation from. Must not be null.
        properties - keys of properties to be included in the representation. Can be null, which represents all. Empty array represents none.
        transformer - ID transformer.
      • SerializableNode

        public SerializableNode​(ID id)
        Create a Serializable DetachedNode from custom node ID.
        Parameters:
        id - custom ID of the node. Can be null to represent a new node.
      • SerializableNode

        public SerializableNode​(ID id,
                                String[] labels,
                                Map<String,​Object> properties)
        Construct Serializable DetachedNode of a node.
        Parameters:
        id - custom ID of the node. Can be null to represent a new node.
        labels - of the new node representation.
        properties - of the new node representation.
    • Method Detail

      • produceEntity

        public Node produceEntity​(Transaction tx,
                                  NodeIdTransformer<ID> transformer)
        Produce a Node from this representation. This means either fetch the node from the given tx (iff id is set), or create it.
        Parameters:
        tx - to create/fetch node in.
        transformer - ID transformer.
        Returns:
        node.
      • setId

        public void setId​(ID id)