public class Node extends NodeEntity
| Modifier and Type | Field and Description |
|---|---|
static String |
NODE_BY_PRIMARY_KEY_QUERY
Prefix for name of query to fetch node by primary key
|
| Constructor and Description |
|---|
Node(int model,
Node parent)
Create an empty Node object and attach to an existing graph
|
Node(NodeEntity nodeEntity,
Node parent)
Construct a Node from its persisted state.
|
| Modifier and Type | Method and Description |
|---|---|
List<Node> |
getChildren()
Returns children list
|
Map<String,Object> |
getProperties()
Returns properties
|
static String |
getProperty(Node node,
String key,
String defaultValue)
Returns property value as quote-delimited text for logging perposes
|
static Node |
marshall(NodeEntity nodeEntity)
Marshall a nodeEntity object into a graph fragment containing all ancestors and immediate children.
|
static Node |
rootNodeNewInstance()
Returns root Node object
|
void |
setProperties(Map<String,Object> properties)
Set properties
|
get_children, get_id, get_parent_id, getLevel, getModel, getName, getParent, getTitle, set_children, set_id, set_parent_id, setLevel, setModel, setName, setParent, setTitlepublic static final String NODE_BY_PRIMARY_KEY_QUERY
public Node(NodeEntity nodeEntity, Node parent)
nodeEntity - The persisted objectparent - The parent on the graph under construction or null if this is the first node of the graphpublic Node(int model,
Node parent)
model - Ordinal of model enum typeparent - Parent node - use Node.rootNodeNewInstance() for first Node in graphpublic void setProperties(Map<String,Object> properties)
properties - Map<String, Object*gt;public Map<String,Object> getProperties()
public static Node rootNodeNewInstance()
public static String getProperty(Node node, String key, String defaultValue)
node - Node from which to extract propertykey - Property namedefaultValue - Value to return if property not foundpublic static Node marshall(NodeEntity nodeEntity)
nodeEntity - The object to marshallThis documentation is licensed by Andrew Bowley under the GPLv3 License.