Class AliasedExpression

java.lang.Object
org.neo4j.cypherdsl.core.AliasedExpression
All Implemented Interfaces:
Aliased, Visitable, Expression, IdentifiableElement

@API(status=STABLE, since="1.0") public final class AliasedExpression extends Object implements Aliased, Expression, IdentifiableElement
An aliased expression, that deals with named expressions when accepting visitors.
Since:
1.0
Author:
Michael J. Simons
  • Method Details

    • getAlias

      @NotNull public @NotNull String getAlias()
      Specified by:
      getAlias in interface Aliased
      Returns:
      the alias.
    • as

      @NotNull public @NotNull AliasedExpression as(String newAlias)
      This takes the originally aliased expression and re-aliases it. Aliases are not nested.
      Specified by:
      as in interface Expression
      Parameters:
      newAlias - The new alias to use
      Returns:
      A new aliased, expression.
    • accept

      public void accept(Visitor visitor)
      Description copied from interface: Visitable
      Accept a Visitor visiting this Visitable and its nested Visitables if applicable.
      Specified by:
      accept in interface Visitable
      Parameters:
      visitor - the visitor to notify, must not be null.
    • asExpression

      @NotNull public @NotNull Expression asExpression()
      Description copied from interface: IdentifiableElement
      Transform this element into an expression
      Specified by:
      asExpression in interface IdentifiableElement
      Returns:
      this element as an expression. Will return the same instance if it is already an expression.
    • toString

      public String toString()
      Description copied from interface: Visitable
      Most visitables will render themselves into a Cypher fragment preceded with the actual classname. The representation however is not cached - in contrast to the ones for full statements. Using toString is recommended for debugging purposes mainly, and not for production use.

      The concrete classname has been prepended to help debugging and actually to discourage using fragments to build queries without explicitly rendering them, either as statement or going through the renderer on purpose.

      Specified by:
      toString in interface Visitable
      Overrides:
      toString in class Object
      Returns:
      A string representation of this visitable formatted as Classname{cypher=value}