public class ObjectGraphBuilder extends Object
ObjectGraph of nodes from a given entity| Modifier and Type | Field and Description |
|---|---|
private IdGenerator |
idGenerator |
private PersistenceDelegator |
pd |
private PersistenceCache |
persistenceCache |
private PersistenceValidator |
validator |
| Constructor and Description |
|---|
ObjectGraphBuilder(PersistenceCache pcCache,
PersistenceDelegator pd) |
| Modifier and Type | Method and Description |
|---|---|
private void |
addChildNodesToGraph(ObjectGraph graph,
Node node,
Relation relation,
Object childObject,
NodeState initialNodeState) |
private NodeState |
getChildNodeState(EntityMetadata metadata,
Object childObj) |
private Map<NodeLink.LinkProperty,Object> |
getLinkProperties(EntityMetadata metadata,
Relation relation) |
private Node |
getNode(Object entity,
ObjectGraph graph,
NodeState initialNodeState)
Constructs and returns
Node representation for a given entity
object. |
ObjectGraph |
getObjectGraph(Object entity,
NodeState initialNodeState) |
private boolean |
isIdSet(Object id) |
private PersistenceCache persistenceCache
private PersistenceDelegator pd
private IdGenerator idGenerator
private PersistenceValidator validator
public ObjectGraphBuilder(PersistenceCache pcCache, PersistenceDelegator pd)
public ObjectGraph getObjectGraph(Object entity, NodeState initialNodeState)
private Node getNode(Object entity, ObjectGraph graph, NodeState initialNodeState)
Node representation for a given entity
object. Output is fully constructed graph with relationships embedded.
Each node is put into graph once it is constructed.entity - private NodeState getChildNodeState(EntityMetadata metadata, Object childObj)
private void addChildNodesToGraph(ObjectGraph graph, Node node, Relation relation, Object childObject, NodeState initialNodeState)
graph - node - relation - childObject - private Map<NodeLink.LinkProperty,Object> getLinkProperties(EntityMetadata metadata, Relation relation)
metadata - Entity metadata of the parent noderelation - private boolean isIdSet(Object id)
Copyright © 2015. All Rights Reserved.