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-DSL expressions.
Since:
2021.1.0
Author:
Michael J. Simons
  • Method Details

    • asCondition

      @NotNull @Contract(pure=true) @NotNull Condition asCondition()
      Adapts a foreign expression into a Cypher-DSL Condition. 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-DSL Expression.
      Returns:
      A native expression
    • asNode

      @NotNull @Contract(pure=true) @NotNull Node asNode()
      Adapts a foreign expression into a Cypher-DSL Node, 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

      @NotNull @Contract(pure=true) @NotNull Relationship asRelationship()
      Adapts a foreign expression into a Cypher-DSL Relationship, 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

      @NotNull @Contract(pure=true) @NotNull SymbolicName asName()
      Adapts a foreign expression into a Cypher-DSL SymbolicName. 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.