Class Configuration

java.lang.Object
org.neo4j.cypherdsl.core.renderer.Configuration

@API(status=STABLE, since="2021.0.1") public final class Configuration extends Object
This class provides some configuration settings for the Cypher-DSL, mainly around rendering of a statement. Instances of Configuration are threadsafe and can be reused. Please use the associated builder via newConfig() to create new variants.
Since:
2021.0.1
Author:
Michael J. Simons
  • Method Details

    • defaultConfig

      public static Configuration defaultConfig()
      Cypher is not pretty printed by default. No indentation settings apply.
      Returns:
      the default config
    • prettyPrinting

      public static Configuration prettyPrinting()
      Pretty printing with default indentation settings.
      Returns:
      a configuration enabling pretty printing.
    • newConfig

      public static Configuration.Builder newConfig()
      Returns a new builder. for creating a new configuration from scratch
      Returns:
      a new builder
    • isPrettyPrint

      public boolean isPrettyPrint()
      Returns:
      true if this configuration uses pretty printing
    • getIndentStyle

      public Configuration.IndentStyle getIndentStyle()
      Returns the indentation style. whether to use tabs or spaces to indent things
      Returns:
      the indentation style
    • getIndentSize

      public int getIndentSize()
      Returns:
      width of one indentation
    • isAlwaysEscapeNames

      public boolean isAlwaysEscapeNames()
      Returns:
      true when names should be always escaped
    • getGeneratedNames

      public Set<Configuration.GeneratedNames> getGeneratedNames()
      Returns:
      The set of object types for which generated names should be used
      Since:
      2023.2.0
    • isUseGeneratedNames

      public boolean isUseGeneratedNames()
      Returns:
      true when symbolic and parameter names should be replaced with generated names
      Since:
      2023.2.0
    • getDialect

      public Dialect getDialect()
      Returns:
      the target dialect
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object