Search in sources :

Example 1 with EntityMapper

use of org.neo4j.ogm.context.EntityMapper in project neo4j-ogm by neo4j.

the class CompilerTest method mapAndCompile.

private static Compiler mapAndCompile(Object object, int depth) {
    EntityMapper mapper = new EntityGraphMapper(mappingMetadata, mappingContext);
    CompileContext context = mapper.map(object, depth);
    Compiler compiler = context.getCompiler();
    compiler.useStatementFactory(new RowStatementFactory());
    return compiler;
}
Also used : EntityGraphMapper(org.neo4j.ogm.context.EntityGraphMapper) RowStatementFactory(org.neo4j.ogm.session.request.RowStatementFactory) EntityMapper(org.neo4j.ogm.context.EntityMapper)

Example 2 with EntityMapper

use of org.neo4j.ogm.context.EntityMapper in project neo4j-ogm by neo4j.

the class CyclicStructureTest method mapAndCompile.

private static Compiler mapAndCompile(Neo4jSession session, Object object, int depth) {
    final MetaData metaData = session.metaData();
    final MappingContext mappingContext = new MappingContext(metaData);
    EntityMapper mapper = new EntityGraphMapper(metaData, mappingContext);
    CompileContext context = mapper.map(object, depth);
    Compiler compiler = context.getCompiler();
    compiler.useStatementFactory(new RowStatementFactory());
    return compiler;
}
Also used : MappingContext(org.neo4j.ogm.context.MappingContext) EntityGraphMapper(org.neo4j.ogm.context.EntityGraphMapper) MetaData(org.neo4j.ogm.metadata.MetaData) RowStatementFactory(org.neo4j.ogm.session.request.RowStatementFactory) EntityMapper(org.neo4j.ogm.context.EntityMapper)

Aggregations

EntityGraphMapper (org.neo4j.ogm.context.EntityGraphMapper)2 EntityMapper (org.neo4j.ogm.context.EntityMapper)2 RowStatementFactory (org.neo4j.ogm.session.request.RowStatementFactory)2 MappingContext (org.neo4j.ogm.context.MappingContext)1 MetaData (org.neo4j.ogm.metadata.MetaData)1