java.lang.Object
org.neo4j.cypherdsl.core.Hint
All Implemented Interfaces:
Visitable

public final class Hint extends Object implements Visitable
Visitable implementing hints. See ExposesHints.
Since:
2021.0.0
Author:
Michael J. Simons
  • Method Details

    • 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}
    • useIndexFor

      public static Hint useIndexFor(boolean seek, Property... properties)
      Creates an index hint. Mostly useful when building elements outside the fluent DSL.
      Parameters:
      seek - Set to true to use the index for seeks only
      properties - The properties to use in the index, must know their container
      Returns:
      A hint
      Since:
      2021.2.3
    • useScanFor

      public static Hint useScanFor(Node node)
      Creates an index scan hint. Mostly useful when building elements outside the fluent DSL.
      Parameters:
      node - The node who's label and name should be used to define the scan hint
      Returns:
      A hint
      Since:
      2021.2.3
    • useJoinOn

      public static Hint useJoinOn(SymbolicName... name)
      Creates a join hint on one or more symbolic names.
      Parameters:
      name - The names that are supposed to provide the join point
      Returns:
      A hint
      Since:
      2021.2.3
    • 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.