| Constructor and Description |
|---|
MultiStatementCypherCompiler(Function<Object,Long> nativeIdProvider) |
| Modifier and Type | Method and Description |
|---|---|
CompileContext |
context()
Returns this compiler's context
|
List<Statement> |
createNodesStatements()
Retrieves the Cypher statements that create nodes built up through this
Compiler. |
List<Statement> |
createRelationshipsStatements()
Retrieves the Cypher statements that create relationships built up through this
Compiler. |
List<Statement> |
deleteRelationshipEntityStatements()
Retrieves the Cypher statements that delete relationship entities built up through this
Compiler. |
List<Statement> |
deleteRelationshipStatements()
Retrieves the Cypher statements that delete relationships built up through this
Compiler. |
NodeBuilder |
existingNode(Long existingNodeId)
Returns a
NodeBuilder that represents a node that already exists in the database and matches the given ID. |
RelationshipBuilder |
existingRelationship(Long existingRelationshipId,
String type)
Returns a
RelationshipBuilder that represents and existing relationship entity to be modified in the database |
List<Statement> |
getAllStatements()
Retrieves the Cypher statements that have been built up through this
Compiler. |
boolean |
hasStatementsDependentOnNewNodes()
Whether there new relationships to be created that depend on nodes being created first
|
NodeBuilder |
newNode(Long id)
Returns
NodeBuilder that represents a new node to be created in the database. |
RelationshipBuilder |
newRelationship(String type)
Returns a
RelationshipBuilder that represents a new relationship to be created in the database |
RelationshipBuilder |
newRelationship(String type,
boolean bidirectional)
Returns a
RelationshipBuilder that represents a new relationship to be created in the database |
void |
unmap(NodeBuilder nodeBuilder)
Remove a
NodeBuilder |
RelationshipBuilder |
unrelate(Long startNode,
String relationshipType,
Long endNode,
Long relId)
Defines a relationship deletion between the specified start node to end node with the given relationship type and direction.
|
List<Statement> |
updateNodesStatements()
Retrieves the Cypher statements that update nodes built up through this
Compiler. |
List<Statement> |
updateRelationshipStatements()
Retrieves the Cypher statements that update relationships built up through this
Compiler. |
void |
useStatementFactory(StatementFactory newStatementFactory)
|
public NodeBuilder newNode(Long id)
CompilerNodeBuilder that represents a new node to be created in the database.newNode in interface CompilerNodeBuilder representing a new nodepublic RelationshipBuilder newRelationship(String type, boolean bidirectional)
CompilerRelationshipBuilder that represents a new relationship to be created in the databasenewRelationship in interface Compilertype - the relationship typebidirectional - true if the relationship must be created in both incoming and outgoing directions, false otherwiseRelationshipBuilder representing a new relationshippublic RelationshipBuilder newRelationship(String type)
CompilerRelationshipBuilder that represents a new relationship to be created in the databasenewRelationship in interface Compilertype - the relationship typeRelationshipBuilder representing a new relationshippublic NodeBuilder existingNode(Long existingNodeId)
CompilerNodeBuilder that represents a node that already exists in the database and matches the given ID.existingNode in interface CompilerexistingNodeId - The ID of the node in the databaseNodeBuilder representing the node in the database that corresponds to the given IDpublic RelationshipBuilder existingRelationship(Long existingRelationshipId, String type)
CompilerRelationshipBuilder that represents and existing relationship entity to be modified in the databaseexistingRelationship in interface CompilerexistingRelationshipId - The ID of the relationship in the database, which shouldn't be nullRelationshipBuilder bound to the identified relationship entitypublic RelationshipBuilder unrelate(Long startNode, String relationshipType, Long endNode, Long relId)
Compilerpublic void unmap(NodeBuilder nodeBuilder)
CompilerNodeBuilderunmap in interface CompilernodeBuilder - The NodeBuilderpublic List<Statement> createNodesStatements()
CompilerCompiler.createNodesStatements in interface CompilerList of Cypher queries to be executed or an empty list if there aren't any, never nullpublic List<Statement> createRelationshipsStatements()
CompilerCompiler.createRelationshipsStatements in interface CompilerList of Cypher queries to be executed or an empty list if there aren't any, never nullpublic List<Statement> updateNodesStatements()
CompilerCompiler.updateNodesStatements in interface CompilerList of Cypher queries to be executed or an empty list if there aren't any, never nullpublic List<Statement> updateRelationshipStatements()
CompilerCompiler.updateRelationshipStatements in interface CompilerList of Cypher queries to be executed or an empty list if there aren't any, never nullpublic List<Statement> deleteRelationshipStatements()
CompilerCompiler.deleteRelationshipStatements in interface CompilerList of Cypher queries to be executed or an empty list if there aren't any, never nullpublic List<Statement> deleteRelationshipEntityStatements()
CompilerCompiler.deleteRelationshipEntityStatements in interface CompilerList of Cypher queries to be executed or an empty list if there aren't any, never nullpublic List<Statement> getAllStatements()
CompilerCompiler.
Please node that there is no requirement that implementations of Compiler provide an idempotent or
even deterministic implementation of this method. Therefore, it's recommended to only call this method once
after all query building has been completed and to be aware that some statements may depend upon results of previous statements
getAllStatements in interface CompilerList of Cypher queries to be executed or an empty list if there aren't any, never nullpublic CompileContext context()
Compilerpublic boolean hasStatementsDependentOnNewNodes()
CompilerhasStatementsDependentOnNewNodes in interface Compilerpublic void useStatementFactory(StatementFactory newStatementFactory)
CompileruseStatementFactory in interface CompilernewStatementFactory - The StatementFactoryCopyright © 2015–2020 Neo Technology, Inc.. All rights reserved.