Search in sources :

Example 1 with DeletedRelationshipEntityStatementBuilder

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

the class MultiStatementCypherCompiler method deleteRelationshipEntityStatements.

@Override
public List<Statement> deleteRelationshipEntityStatements() {
    assertStatementFactoryExists();
    // Group relationships by type
    Map<String, Set<Edge>> deletedRelsByType = groupRelationshipsByType(deletedRelationshipEntityBuilders);
    List<Statement> statements = new ArrayList<>();
    for (Set<Edge> edges : deletedRelsByType.values()) {
        DeletedRelationshipEntityStatementBuilder deletedRelationshipBuilder = new DeletedRelationshipEntityStatementBuilder(edges, statementFactory);
        statements.add(deletedRelationshipBuilder.build());
    }
    return statements;
}
Also used : Statement(org.neo4j.ogm.request.Statement) DeletedRelationshipEntityStatementBuilder(org.neo4j.ogm.cypher.compiler.builders.statement.DeletedRelationshipEntityStatementBuilder) Edge(org.neo4j.ogm.model.Edge)

Aggregations

DeletedRelationshipEntityStatementBuilder (org.neo4j.ogm.cypher.compiler.builders.statement.DeletedRelationshipEntityStatementBuilder)1 Edge (org.neo4j.ogm.model.Edge)1 Statement (org.neo4j.ogm.request.Statement)1