- Type Parameters:
FE- the type of the foreign expression.
@API(status=STABLE,
since="2021.1.0")
public interface ForeignAdapter<FE>
Represents an adapter that allows to turn foreign expressions into Cypher-DSL
expressions.- Since:
- 2021.1.0
- Author:
- Michael J. Simons
-
Method Summary
Modifier and TypeMethodDescriptionAdapts a foreign expression into a Cypher-DSLCondition.Adapts a foreign expression into a Cypher-DSLExpression.asName()Adapts a foreign expression into a Cypher-DSLSymbolicName.asNode()Adapts a foreign expression into a Cypher-DSLNode, that allows to address it further down in queries.Adapts a foreign expression into a Cypher-DSLRelationship, that allows to address it further down in queries.
-
Method Details
-
asCondition
Condition asCondition()Adapts a foreign expression into a Cypher-DSLCondition. The memoized expression should be something that can be evaluated into something boolean.- Returns:
- a condition
- Throws:
IllegalArgumentException- if the expression doesn't resolve into something boolean
-
asExpression
Expression asExpression()Adapts a foreign expression into a Cypher-DSLExpression.- Returns:
- a native expression
-
asNode
Node asNode()Adapts a foreign expression into a Cypher-DSLNode, that allows to address it further down in queries.- Returns:
- a node
- Throws:
IllegalArgumentException- if the expression doesn't describe something that can be used to describe a node
-
asRelationship
Relationship asRelationship()Adapts a foreign expression into a Cypher-DSLRelationship, that allows to address it further down in queries.- Returns:
- a node
- Throws:
IllegalArgumentException- if the expression doesn't describe something that can be used to describe a node
-
asName
SymbolicName asName()Adapts a foreign expression into a Cypher-DSLSymbolicName. The memoized expression should ideally be something that is named or resolves to an alias.- Returns:
- a symbolic name
- Throws:
IllegalArgumentException- if a name cannot be derived from the expression.
-