public interface Compiler extends LoadableService
| 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 |
void |
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 statementFactory)
|
NodeBuilder newNode(Long id)
NodeBuilder that represents a new node to be created in the database.NodeBuilder representing a new nodeRelationshipBuilder newRelationship(String type, boolean bidirectional)
RelationshipBuilder that represents a new relationship to be created in the databasetype - the relationship typebidirectional - true if the relationship must be created in both incoming and outgoing directions, false otherwiseRelationshipBuilder representing a new relationshipRelationshipBuilder newRelationship(String type)
RelationshipBuilder that represents a new relationship to be created in the databasetype - the relationship typeRelationshipBuilder representing a new relationshipNodeBuilder existingNode(Long existingNodeId)
NodeBuilder that represents a node that already exists in the database and matches the given ID.existingNodeId - The ID of the node in the databaseNodeBuilder representing the node in the database that corresponds to the given IDRelationshipBuilder existingRelationship(Long existingRelationshipId, String type)
RelationshipBuilder that represents and existing relationship entity to be modified in the databaseexistingRelationshipId - The ID of the relationship in the database, which shouldn't be nullRelationshipBuilder bound to the identified relationship entityvoid unrelate(Long startNode, String relationshipType, Long endNode, Long relId)
startNode - The reference of the relationship start noderelationshipType - The type of relationship between the nodes to deleteendNode - The reference of the relationship end noderelId - The id of the relationship to unrelatevoid unmap(NodeBuilder nodeBuilder)
NodeBuildernodeBuilder - The NodeBuilderList<Statement> createNodesStatements()
Compiler.List of Cypher queries to be executed or an empty list if there aren't any, never nullList<Statement> createRelationshipsStatements()
Compiler.List of Cypher queries to be executed or an empty list if there aren't any, never nullList<Statement> updateNodesStatements()
Compiler.List of Cypher queries to be executed or an empty list if there aren't any, never nullList<Statement> updateRelationshipStatements()
Compiler.List of Cypher queries to be executed or an empty list if there aren't any, never nullList<Statement> deleteRelationshipStatements()
Compiler.List of Cypher queries to be executed or an empty list if there aren't any, never nullList<Statement> deleteRelationshipEntityStatements()
Compiler.List of Cypher queries to be executed or an empty list if there aren't any, never nullList<Statement> getAllStatements()
Compiler.
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
List of Cypher queries to be executed or an empty list if there aren't any, never nullCompileContext context()
boolean hasStatementsDependentOnNewNodes()
void useStatementFactory(StatementFactory statementFactory)
statementFactory - The StatementFactoryCopyright © 2017 Neo Technology, Inc.. All rights reserved.