- 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 TypeMethodDescription@NotNull ConditionAdapts a foreign expression into a Cypher-DSLCondition.@NotNull ExpressionAdapts a foreign expression into a Cypher-DSLExpression.@NotNull SymbolicNameasName()Adapts a foreign expression into a Cypher-DSLSymbolicName.@NotNull NodeasNode()Adapts a foreign expression into a Cypher-DSLNode, that allows to address it further down in queries.@NotNull RelationshipAdapts a foreign expression into a Cypher-DSLRelationship, that allows to address it further down in queries.
-
Method Details
-
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
Adapts a foreign expression into a Cypher-DSLExpression.- Returns:
- A native expression
-
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
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
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.
-