public class Node extends Object implements NodeStateContext
| Modifier and Type | Class and Description |
|---|---|
private static class |
Node.EntityEvent |
| Modifier and Type | Field and Description |
|---|---|
private Map<NodeLink,Node> |
children |
private Client |
client
Client for this node
|
private NodeState |
currentNodeState |
private Object |
data |
private Class<?> |
dataClass |
private boolean |
dirty |
private Object |
entityId |
private EntityEventDispatcher |
eventDispatcher |
private boolean |
isGraphCompleted |
private boolean |
isProcessed |
private boolean |
isUpdate |
private String |
nodeId |
private Node |
originalNode |
private Map<NodeLink,Node> |
parents |
private PersistenceDelegator |
pd |
private PersistenceCache |
persistenceCache |
private boolean |
traversed |
| Modifier | Constructor and Description |
|---|---|
|
Node(String nodeId,
Class<?> nodeDataClass,
NodeState initialNodeState,
PersistenceCache pc,
Object primaryKey,
PersistenceDelegator pd) |
(package private) |
Node(String nodeId,
Object data,
NodeState initialNodeState,
PersistenceCache pc,
Object primaryKey,
PersistenceDelegator pd) |
private |
Node(String nodeId,
Object data,
PersistenceCache pc,
Object primaryKey,
PersistenceDelegator pd) |
private String nodeId
private Object entityId
private Object data
private NodeState currentNodeState
private Class<?> dataClass
private boolean traversed
private boolean dirty
private boolean isUpdate
private Client client
private PersistenceCache persistenceCache
private boolean isGraphCompleted
private PersistenceDelegator pd
private Node originalNode
private boolean isProcessed
private EntityEventDispatcher eventDispatcher
private Node(String nodeId, Object data, PersistenceCache pc, Object primaryKey, PersistenceDelegator pd)
Node(String nodeId, Object data, NodeState initialNodeState, PersistenceCache pc, Object primaryKey, PersistenceDelegator pd)
public Node(String nodeId, Class<?> nodeDataClass, NodeState initialNodeState, PersistenceCache pc, Object primaryKey, PersistenceDelegator pd)
private void initializeNode(String nodeId, Object data, Object primaryKey, PersistenceDelegator pd)
public String getNodeId()
getNodeId in interface NodeStateContextpublic void setNodeId(String nodeId)
setNodeId in interface NodeStateContextnodeId - the nodeId to setpublic Object getData()
getData in interface NodeStateContextpublic void setData(Object data)
setData in interface NodeStateContextdata - the data to setpublic Class getDataClass()
getDataClass in interface NodeStateContextpublic void setDataClass(Class dataClass)
setDataClass in interface NodeStateContextdataClass - the dataClass to setpublic NodeState getCurrentNodeState()
getCurrentNodeState in interface NodeStateContextpublic void setCurrentNodeState(NodeState currentNodeState)
setCurrentNodeState in interface NodeStateContextcurrentNodeState - the currentNodeState to setpublic Map<NodeLink,Node> getParents()
getParents in interface NodeStateContextpublic void setParents(Map<NodeLink,Node> parents)
setParents in interface NodeStateContextparents - the parents to setpublic Map<NodeLink,Node> getChildren()
getChildren in interface NodeStateContextpublic void setChildren(Map<NodeLink,Node> children)
setChildren in interface NodeStateContextchildren - the children to setpublic boolean isHeadNode()
isHeadNode in interface NodeStateContextpublic Node getParentNode(String parentNodeId)
getParentNode in interface NodeStateContextpublic Node getChildNode(String childNodeId)
getChildNode in interface NodeStateContextpublic void addParentNode(NodeLink nodeLink, Node node)
addParentNode in interface NodeStateContextpublic void addChildNode(NodeLink nodeLink, Node node)
addChildNode in interface NodeStateContextpublic boolean isTraversed()
isTraversed in interface NodeStateContextpublic void setTraversed(boolean traversed)
setTraversed in interface NodeStateContexttraversed - the traversed to setpublic boolean isDirty()
isDirty in interface NodeStateContextpublic void setDirty(boolean dirty)
setDirty in interface NodeStateContextdirty - the dirty to setpublic Client getClient()
getClient in interface NodeStateContextpublic void setClient(Client client)
setClient in interface NodeStateContextclient - the client to setpublic PersistenceDelegator getPersistenceDelegator()
getPersistenceDelegator in interface NodeStateContextpublic void setPersistenceDelegator(PersistenceDelegator pd)
setPersistenceDelegator in interface NodeStateContextpublic void persist()
persist in interface NodeStateContextpublic void remove()
remove in interface NodeStateContextpublic void refresh()
refresh in interface NodeStateContextpublic void merge()
merge in interface NodeStateContextpublic void detach()
detach in interface NodeStateContextpublic void close()
close in interface NodeStateContextpublic void lock()
lock in interface NodeStateContextpublic void commit()
commit in interface NodeStateContextpublic void rollback()
rollback in interface NodeStateContextpublic void find()
find in interface NodeStateContextpublic void getReference()
getReference in interface NodeStateContextpublic void contains()
contains in interface NodeStateContextpublic void clear()
clear in interface NodeStateContextpublic void flush()
flush in interface NodeStateContextpublic boolean isInState(Class<?> stateClass)
isInState in interface NodeStateContextpublic PersistenceCache getPersistenceCache()
getPersistenceCache in interface NodeStateContextpublic void setPersistenceCache(PersistenceCache persistenceCache)
setPersistenceCache in interface NodeStateContextboolean isGraphCompleted()
void setGraphCompleted(boolean isGraphCompleted)
isGraphCompleted - the isGraphCompleted to setpublic Node getOriginalNode()
public void setOriginalNode(Node originalNode)
originalNode - the originalNode to setpublic boolean isProcessed()
public boolean isUpdate()
public void setUpdate(boolean isUpdate)
isUpdate - the isUpdate to setpublic Object getEntityId()
getEntityId in interface NodeStateContextpublic void setEntityId(Object id)
public void handlePreEvent()
public void handlePostEvent()
private void onPreEvent(EntityMetadata metadata, Node.EntityEvent event)
private void onPostEvent(EntityMetadata metadata, Node.EntityEvent event)
Copyright © 2015. All Rights Reserved.