Module org.jooq
Package org.jooq.conf

Class SettingsTools

java.lang.Object
org.jooq.conf.SettingsTools

public final class SettingsTools extends Object
Convenience methods for jOOQ runtime settings.
Author:
Lukas Eder
  • Constructor Details

    • SettingsTools

      public SettingsTools()
  • Method Details

    • getParamType

      public static final ParamType getParamType(Settings settings)
      Get the parameter type from the settings.

      The ParamType can be overridden by the StatementType. If the latter is set to StatementType.STATIC_STATEMENT, then the former defaults to ParamType.INLINED.

    • getStatementType

      public static final StatementType getStatementType(Settings settings)
      Get the statement type from the settings.
    • getBackslashEscaping

      public static final BackslashEscaping getBackslashEscaping(Settings settings)
      Get the value BackslashEscaping value.
    • executePreparedStatements

      public static final boolean executePreparedStatements(Settings settings)
      Whether a PreparedStatement should be executed.
    • executeStaticStatements

      public static final boolean executeStaticStatements(Settings settings)
      Whether static Statement should be executed.
    • updatablePrimaryKeys

      public static final boolean updatablePrimaryKeys(Settings settings)
      Whether primary keys should be updatable.
    • reflectionCaching

      public static final boolean reflectionCaching(Settings settings)
      Whether reflection caching is active.
    • recordMapperCaching

      public static final boolean recordMapperCaching(Settings settings)
      Whether record mapper caching is active.
    • parsingConnectionCaching

      public static final boolean parsingConnectionCaching(Settings settings)
      Whether parsing connection caching is active.
    • locale

      public static final Locale locale(Settings settings)
      The render locale that is applicable, or the default locale if no such locale is configured.
    • renderLocale

      public static final Locale renderLocale(Settings settings)
      The render locale that is applicable, or the default locale if no such locale is configured.
    • parseLocale

      public static final Locale parseLocale(Settings settings)
      The parser locale that is applicable, or the default locale if no such locale is configured.
    • interpreterLocale

      public static final Locale interpreterLocale(Settings settings)
      The interpreter locale that is applicable, or the default locale if no such locale is configured.
    • getRenderMapping

      public static final RenderMapping getRenderMapping(Settings settings)
      Lazy access to RenderMapping.
    • getRenderKeywordCase

      public static final RenderKeywordCase getRenderKeywordCase(Settings settings)
      Backwards compatible access to RenderKeywordCase and/or RenderKeywordStyle (the latter being deprecated).
    • getRenderNameCase

      public static final RenderNameCase getRenderNameCase(Settings settings)
      Backwards compatible access to RenderNameCase and/or RenderNameStyle (the latter being deprecated).
    • getRenderQuotedNames

      public static final RenderQuotedNames getRenderQuotedNames(Settings settings)
      Backwards compatible access to RenderQuotedNames and/or RenderNameStyle (the latter being deprecated).
    • getExecuteUpdateWithoutWhere

      public static final ExecuteWithoutWhere getExecuteUpdateWithoutWhere(Settings settings)
    • getExecuteDeleteWithoutWhere

      public static final ExecuteWithoutWhere getExecuteDeleteWithoutWhere(Settings settings)
    • getTransformUnneededArithmeticExpressions

      public static final TransformUnneededArithmeticExpressions getTransformUnneededArithmeticExpressions(Settings settings)
    • defaultSettings

      public static final Settings defaultSettings()
      Retrieve the configured default settings.

      • If the JVM flag -Dorg.jooq.settings points to a valid settings file on the classpath, this will be loaded
      • If the JVM flag -Dorg.jooq.settings points to a valid settings file on the file system, this will be loaded
      • If a valid settings file is found on the classpath at /jooq-settings.xml, this will be loaded
      • Otherwise, a new Settings object is created with its defaults
    • clone

      public static final Settings clone(Settings settings)
      Clone some settings.
    • getQueryTimeout

      public static final int getQueryTimeout(int timeout, Settings settings)
      Return timeout if it is not 0, or the specified Settings.getQueryTimeout().
    • getQueryPoolable

      public static final QueryPoolable getQueryPoolable(QueryPoolable poolable, Settings settings)
      Return poolable if it is not null, or the specified Settings.getQueryPoolable().
    • getMaxRows

      public static final int getMaxRows(int maxRows, Settings settings)
      Return maxRows if it is not 0, or the specified Settings.getMaxRows().
    • fetchIntermediateResult

      public static final boolean fetchIntermediateResult(Configuration configuration)
      Return FetchIntermediateResult.
    • getFetchSize

      public static final int getFetchSize(int fetchSize, Settings settings)
      Return fetchSize if it is not 0, or the specified Settings.getFetchSize().
    • getBatchSize

      public static final int getBatchSize(Settings settings)
      Return the specified Settings.getBatchSize().
    • getFetchServerOutputSize

      public static final int getFetchServerOutputSize(int fetchServerOutputSize, Settings settings)
      Return fetchServerOutputSize if it is not 0, or the specified Settings.getFetchServerOutputSize().