Search in sources :

Example 1 with DeletedRelationshipStatementBuilder

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

the class MultiStatementCypherCompiler method deleteRelationshipStatements.

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

Aggregations

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