public class CrossStoreNodeEntityInstantiator extends Object implements EntityInstantiator<org.neo4j.graphdb.Node>
Constructor and Description |
---|
CrossStoreNodeEntityInstantiator(NodeEntityInstantiator delegate,
javax.persistence.EntityManagerFactory entityManagerFactory) |
Modifier and Type | Method and Description |
---|---|
<T> T |
createEntityFromState(org.neo4j.graphdb.Node n,
Class<T> entityClass,
MappingPolicy mappingPolicy)
Takes the JPA id stored in the "FOREIGN_ID" property of the node for a
EntityManager.find(Class, Object) operation. |
public CrossStoreNodeEntityInstantiator(NodeEntityInstantiator delegate, javax.persistence.EntityManagerFactory entityManagerFactory)
public <T> T createEntityFromState(org.neo4j.graphdb.Node n, Class<T> entityClass, MappingPolicy mappingPolicy)
EntityManager.find(Class, Object)
operation.
If the entity is found its instance is associated with the graph node and returned otherwise a new node entity instance for
this node is created by the original EntityInstantiator
.createEntityFromState
in interface EntityInstantiator<org.neo4j.graphdb.Node>
T
- generic type of the entityn
- Node to instantiate an entity forentityClass
- type of the entityCopyright © 2012 SpringSource. All Rights Reserved.