java.lang.Object
org.neo4j.cypherdsl.core.renderer.Configuration
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classUse this builder to create newConfigurationinstances.static enumEnum for configuring name rewriting.static enumEnum for the available indent styles.static final recordSimple definition of a known / schema relationship. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigurationCypher is not pretty printed by default.booleanReturns the target dialect.Returns the set of object types for which generated names should be used.intReturns width of one indentation.Returns the indentation style.Returns a map of predefined relationships.inthashCode()booleanReturnstruewhen names should be always escaped.booleanReturns true if dynamic labels are disabled.booleanReturns true if a schema should be enforced.booleanReturnstrueif this configuration uses pretty printing.booleanReturns true when symbolic and parameter names should be replaced with * generated names.static Configuration.BuilderReturns a new builder.static ConfigurationPretty printing with default indentation settings.relationshipDefinition(String definition) Creates a new relationship definition from a string in the form(sourceLabel, TYPE, targetLabel).toString()
-
Method Details
-
relationshipDefinition
Creates a new relationship definition from a string in the form(sourceLabel, TYPE, targetLabel).- Parameters:
definition- the literal definition of the relationship- Returns:
- a new relationship definition
-
defaultConfig
Cypher is not pretty printed by default. No indentation settings apply.- Returns:
- the default config
-
prettyPrinting
Pretty printing with default indentation settings.- Returns:
- a configuration enabling pretty printing.
-
newConfig
Returns a new builder. for creating a new configuration from scratch- Returns:
- a new builder
-
isPrettyPrint
public boolean isPrettyPrint()Returnstrueif this configuration uses pretty printing.- Returns:
trueif this configuration uses pretty printing
-
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.- Returns:
- width of one indentation
-
isAlwaysEscapeNames
public boolean isAlwaysEscapeNames()Returnstruewhen names should be always escaped.- Returns:
truewhen names should be always escaped
-
getGeneratedNames
Returns the set of object types for which generated names should be used.- 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.- Returns:
- true when symbolic and parameter names should be replaced with generated names
- Since:
- 2023.2.0
-
getDialect
Returns the target dialect.- Returns:
- the target dialect
-
isEnforceSchema
@API(status=EXPERIMENTAL, since="2023.7.0") public boolean isEnforceSchema()Returns true if a schema should be enforced.- Returns:
- true if a schema should be enforced
- Since:
- 2023.7.0
-
getRelationshipDefinitions
@API(status=EXPERIMENTAL, since="2023.7.0") public Map<String,List<Configuration.RelationshipDefinition>> getRelationshipDefinitions()Returns a map of predefined relationships.- Returns:
- a map of predefined relationships
- Since:
- 2023.7.0
-
isDisableDynamicLabels
public boolean isDisableDynamicLabels()Returns true if dynamic labels are disabled.- Returns:
- true if dynamic labels are disabled
- Since:
- 2025.0.3
-
equals
-
hashCode
public int hashCode() -
toString
-