public interface CypherCompiler
Modifier and Type | Method and Description |
---|---|
CypherContext |
compile()
Compiles the current request and returns the compile context, which
includes all the statements to be executed and related information
|
CypherContext |
context()
Returns this compiler's context
|
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)
Returns a
RelationshipBuilder to use for constructing Cypher to update an existing relationship in the database
that possesses the given ID. |
List<ParameterisedStatement> |
getStatements()
Retrieves the Cypher queries that have been built up through this
CypherCompiler . |
NodeBuilder |
newNode()
Returns
NodeBuilder that represents a new node to be created in the database. |
RelationshipBuilder |
newRelationship()
Returns a
RelationshipBuilder to use for constructing Cypher for writing a new relationship to the database. |
String |
nextIdentifier() |
void |
relate(String startNode,
String relationshipType,
Map<String,Object> relationshipProperties,
String endNode)
Deprecated.
Setting relationships should now be done through the
RelationshipBuilder |
void |
release(RelationshipBuilder relationshipBuilder)
Returns an unused relationship's reference to the ref pool
This is to ensure that references are only created when needed
|
void |
unrelate(String startNode,
String relationshipType,
String endNode)
Defines a relationship deletion between the specified start node to end node with the given relationship type and direction.
|
@Deprecated void relate(String startNode, String relationshipType, Map<String,Object> relationshipProperties, String endNode)
RelationshipBuilder
startNode
- The NodeBuilder
representation of the relationship start noderelationshipType
- The type of relationship to create between the nodesrelationshipProperties
- The (optional) Map
containing the properties of the relationshipendNode
- The NodeBuilder
representation of the relationship end nodevoid unrelate(String startNode, String relationshipType, String endNode)
startNode
- The NodeBuilder
representation of the relationship start noderelationshipType
- The type of relationship between the nodes to deleteendNode
- The NodeBuilder
representation of the relationship end nodeNodeBuilder newNode()
NodeBuilder
that represents a new node to be created in the database.NodeBuilder
representing a new nodeNodeBuilder 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 newRelationship()
RelationshipBuilder
to use for constructing Cypher for writing a new relationship to the database.RelationshipBuilder
RelationshipBuilder existingRelationship(Long existingRelationshipId)
RelationshipBuilder
to use for constructing Cypher to update an existing relationship in the database
that possesses the given ID.existingRelationshipId
- The ID of the relationship in the database, which shouldn't be null
RelationshipBuilder
bound to the identified relationshipList<ParameterisedStatement> getStatements()
CypherCompiler
.
Please node that there is no requirement that implementations of CypherCompiler
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.
List
of Cypher queries to be executed or an empty list if there aren't any, never null
void release(RelationshipBuilder relationshipBuilder)
relationshipBuilder
- String nextIdentifier()
CypherContext context()
CypherContext compile()
Copyright © 2011-2014–2015 Pivotal Software, Inc.. All rights reserved.