use of org.neo4j.ogm.cypher.compiler.builders.node.DefaultRelationshipBuilder in project neo4j-ogm by neo4j.
the class MultiStatementCypherCompiler method unrelate.
@Override
public RelationshipBuilder unrelate(Long startNode, String relationshipType, Long endNode, Long relId) {
RelationshipBuilder relationshipBuilder = new DefaultRelationshipBuilder(relationshipType, relId);
relationshipBuilder.relate(startNode, endNode);
if (!unmap(relationshipBuilder)) {
if (relId != null) {
deletedRelationshipEntityBuilders.add(relationshipBuilder);
} else {
deletedRelationshipBuilders.add(relationshipBuilder);
}
}
return relationshipBuilder;
}
use of org.neo4j.ogm.cypher.compiler.builders.node.DefaultRelationshipBuilder in project neo4j-ogm by neo4j.
the class MultiStatementCypherCompiler method existingRelationship.
@Override
public RelationshipBuilder existingRelationship(Long existingRelationshipId, Relationship.Direction direction, String type, boolean wasDirty) {
String key = existingRelationshipId + ";" + direction.name();
RelationshipBuilder relationshipBuilder = existingRelationshipBuilders.computeIfAbsent(key, k -> new DefaultRelationshipBuilder(type, existingRelationshipId));
relationshipBuilder.setDirty(wasDirty);
return relationshipBuilder;
}
use of org.neo4j.ogm.cypher.compiler.builders.node.DefaultRelationshipBuilder in project neo4j-ogm by neo4j.
the class MultiStatementCypherCompiler method newRelationship.
@Override
public RelationshipBuilder newRelationship(String type, boolean bidirectional) {
RelationshipBuilder relationshipBuilder = new DefaultRelationshipBuilder(type, bidirectional);
newRelationshipBuilders.add(relationshipBuilder);
return relationshipBuilder;
}
Aggregations