public class EntityGraphMapper extends Object implements EntityMapper
EntityMapper
that is driven by an instance of MetaData
.Constructor and Description |
---|
EntityGraphMapper(MetaData metaData,
MappingContext mappingContext)
Constructs a new
EntityGraphMapper that uses the given MetaData . |
Modifier and Type | Method and Description |
---|---|
void |
addWriteProtection(BiFunction<WriteProtectionTarget,Class<?>,Predicate<Object>> writeProtectionSupplier) |
CompileContext |
compileContext()
Returns compile context after multiple
EntityMapper.map(Object) operations were called |
CompileContext |
map(Object entity)
Processes the given object and any of its composite persistent objects and produces Cypher queries to persist their state
in Neo4j.
|
CompileContext |
map(Object entity,
int horizon)
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.
|
public EntityGraphMapper(MetaData metaData, MappingContext mappingContext)
EntityGraphMapper
that uses the given MetaData
.metaData
- The MetaData
containing the mapping informationmappingContext
- The MappingContext
for the current sessionpublic void addWriteProtection(BiFunction<WriteProtectionTarget,Class<?>,Predicate<Object>> writeProtectionSupplier)
public CompileContext map(Object entity)
EntityMapper
EntityMapper.compileContext()
to get final CompileContext.map
in interface EntityMapper
entity
- The "root" node of the object graph to persistCompileContext
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 never null
public CompileContext map(Object entity, int horizon)
EntityMapper
EntityMapper.compileContext()
to get final CompileContext.map
in interface EntityMapper
entity
- The "root" node of the object graph to persisthorizon
- The number of objects away from the "root" to traverse when looking for objects to mapCompileContext
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 never null
public CompileContext compileContext()
EntityMapper
EntityMapper.map(Object)
operations were calledcompileContext
in interface EntityMapper
Copyright © 2015–2021 Neo Technology, Inc.. All rights reserved.