Search in sources :

Example 1 with NewNodeStatementBuilder

use of org.neo4j.ogm.cypher.compiler.builders.statement.NewNodeStatementBuilder in project neo4j-ogm by neo4j.

the class MultiStatementCypherCompiler method createNodesStatements.

public List<Statement> createNodesStatements() {
    assertStatementFactoryExists();
    Map<String, Set<Node>> newNodesByLabels = groupNodesByLabel(newNodeBuilders);
    List<Statement> statements = new ArrayList<>(newNodesByLabels.size());
    for (Set<Node> nodeModels : newNodesByLabels.values()) {
        NewNodeStatementBuilder newNodeBuilder = new NewNodeStatementBuilder(nodeModels, statementFactory);
        statements.add(newNodeBuilder.build());
    }
    return statements;
}
Also used : Statement(org.neo4j.ogm.request.Statement) Node(org.neo4j.ogm.model.Node) NewNodeStatementBuilder(org.neo4j.ogm.cypher.compiler.builders.statement.NewNodeStatementBuilder)

Aggregations

NewNodeStatementBuilder (org.neo4j.ogm.cypher.compiler.builders.statement.NewNodeStatementBuilder)1 Node (org.neo4j.ogm.model.Node)1 Statement (org.neo4j.ogm.request.Statement)1