Package org.neo4j.cypherdsl.core
Interface ForeignAdapter<FE>
-
- 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-DSLexpressions.- Since:
- 2021.1.0
- Author:
- Michael J. Simons
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull ConditionasCondition()Adapts a foreign expression into a Cypher-DSLCondition.@NotNull ExpressionasExpression()Adapts 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 to address it further down in queries.@NotNull RelationshipasRelationship()Adapts a foreign expression into a Cypher-DSLRelationship, that allows to to address it further down in queries.
-
-
-
Method Detail
-
asCondition
@NotNull @Contract(pure=true) @NotNull 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
@NotNull @Contract(pure=true) @NotNull Expression asExpression()
Adapts a foreign expression into a Cypher-DSLExpression.- Returns:
- A native expression
-
asNode
@NotNull @Contract(pure=true) @NotNull Node asNode()
Adapts a foreign expression into a Cypher-DSLNode, that allows to 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
@NotNull @Contract(pure=true) @NotNull Relationship asRelationship()
Adapts a foreign expression into a Cypher-DSLRelationship, that allows to 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
@NotNull @Contract(pure=true) @NotNull 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.
-
-