Package org.neo4j.ogm.context
Interface EntityMapper
- All Known Implementing Classes:
EntityGraphMapper
public interface EntityMapper
Specification for an object-graph mapper, which can map arbitrary Java objects onto Cypher data manipulation queries.
- Author:
- Adam George
-
Method Summary
Modifier and TypeMethodDescriptionReturns compile context after multiplemap(Object)
operations were calledProcesses the given object and any of its composite persistent objects and produces Cypher queries to persist their state in Neo4j.Processes the given object and any of its composite persistent objects to the specified depth and produces Cypher queries to persist their state in Neo4j.
-
Method Details
-
map
Processes the given object and any of its composite persistent objects and produces Cypher queries to persist their state in Neo4j. NOTE: multiple map calls from same EntityMapper instance return same CompileContext with accumulated results. You can also usecompileContext()
to get final CompileContext.- Parameters:
entity
- The "root" node of the object graph to persist- Returns:
- A
CompileContext
object containing the statements required to persist the given object to Neo4j, along with a representation of the changes to be made by the Cypher statements nevernull
- Throws:
NullPointerException
- if invoked withnull
-
map
Processes the given object and any of its composite persistent objects to the specified depth and produces Cypher queries to persist their state in Neo4j. NOTE: multiple map calls from same EntityMapper instance return same CompileContext with accumulated results. You can also usecompileContext()
to get final CompileContext.- Parameters:
entity
- The "root" node of the object graph to persistdepth
- The number of objects away from the "root" to traverse when looking for objects to map- Returns:
- A
CompileContext
object containing the statements required to persist the given object to Neo4j, along with a representation of the changes to be made by the Cypher statements nevernull
- Throws:
NullPointerException
- if invoked withnull
-
compileContext
CompileContext compileContext()Returns compile context after multiplemap(Object)
operations were called- Returns:
- CompileContext
-