Class Parameter<T>

java.lang.Object
org.neo4j.cypherdsl.core.Parameter<T>
Type Parameters:
T - The type of the parameter. Defaults to Object for a parameter without a value from which to derive the actual type.
All Implemented Interfaces:
Visitable, Expression

@API(status=STABLE, since="1.0") public final class Parameter<T> extends Object implements Expression
Represents a named parameter inside a Cypher statement.
Since:
1.0
Author:
Michael J. Simons, Andreas Berger
  • Method Details

    • isAnon

      @API(status=STABLE, since="2021.0.0") public boolean isAnon()
      Query method to check if this is an anonymous parameter.
      Returns:
      True if this is an anonymous parameter
      Since:
      2021.1.0
    • getName

      @API(status=STABLE, since="2023.1.0") public String getName()
      Returns:
      The name of this parameter.
      Since:
      2023.1.0
    • withValue

      @API(status=STABLE, since="2021.0.0") public Parameter<?> withValue(Object newValue)
      Parameters:
      newValue - The new value that should be bound by this parameter
      Returns:
      A new parameter with a bound value
      Since:
      2021.0.0
    • getValue

      @API(status=INTERNAL, since="2021.1.0") public T getValue()
      Returns:
      the value bound to this parameter
    • 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}
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object