Top Description Fields Constructors Methods
org.jooq.conf

public final Class SettingsTools

extends Object
Class Inheritance
Static Imports
java.lang.Boolean.FALSE, .Boolean.TRUE, org.jooq.conf.FetchIntermediateResult.WHEN_EXECUTE_LISTENERS_PRESENT, .FetchIntermediateResult.WHEN_RESULT_REQUESTED, .ParamType.INDEXED, .ParamType.INLINED, .StatementType.PREPARED_STATEMENT, .StatementType.STATIC_STATEMENT, org.jooq.tools.StringUtils.defaultIfNull

Convenience methods for jOOQ runtime settings.
Author
Lukas Eder

Field Summary

Modifier and TypeField and Description
private static final Settings
private static final JooqLogger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static final Settings
clone(Settings settings)

Clone some settings.

public static final Settings
defaultSettings()

Retrieve the configured default settings.

public static final boolean
executePreparedStatements(Settings settings)

Whether a PreparedStatement should be executed.

public static final boolean
executeStaticStatements(Settings settings)

Whether static Statement should be executed.

public static final boolean
fetchIntermediateResult(Configuration configuration)

Return FetchIntermediateResult.

public static final BackslashEscaping
getBackslashEscaping(Settings settings)

Get the value BackslashEscaping value.

public static final int
getBatchSize(Settings settings)

Return the specified Settings#getBatchSize().

public static final ExecuteWithoutWhere
public static final ExecuteWithoutWhere
public static final int
getFetchServerOutputSize(int fetchServerOutputSize, Settings settings)

Return fetchServerOutputSize if it is not 0, or the specified Settings#getFetchServerOutputSize().

public static final int
getFetchSize(int fetchSize, Settings settings)

Return fetchSize if it is not 0, or the specified Settings#getFetchSize().

public static final int
getMaxRows(int maxRows, Settings settings)

Return maxRows if it is not 0, or the specified Settings#getMaxRows().

public static final ParamType
getParamType(Settings settings)

Get the parameter type from the settings.

public static final QueryPoolable
getQueryPoolable(QueryPoolable poolable, Settings settings)

Return poolable if it is not null, or the specified Settings#getQueryPoolable().

public static final int
getQueryTimeout(int timeout, Settings settings)

Return timeout if it is not 0, or the specified Settings#getQueryTimeout().

public static final RenderKeywordCase
getRenderKeywordCase(Settings settings)

Backwards compatible access to RenderKeywordCase and/or RenderKeywordStyle (the latter being deprecated).

public static final RenderMapping
getRenderMapping(Settings settings)

Lazy access to RenderMapping.

public static final RenderNameCase
getRenderNameCase(Settings settings)

Backwards compatible access to RenderNameCase and/or RenderNameStyle (the latter being deprecated).

public static final RenderQuotedNames
getRenderQuotedNames(Settings settings)

Backwards compatible access to RenderQuotedNames and/or RenderNameStyle (the latter being deprecated).

public static final RenderTable
getRenderTable(Settings settings)

Lazy access to RenderTable.

public static final StatementType
getStatementType(Settings settings)

Get the statement type from the settings.

public static final TransformUnneededArithmeticExpressions
public static final Locale
interpreterLocale(Settings settings)

The interpreter locale that is applicable, or the default locale if no such locale is configured.

public static final Locale
locale(Settings settings)

The render locale that is applicable, or the default locale if no such locale is configured.

public static final Locale
parseLocale(Settings settings)

The parser locale that is applicable, or the default locale if no such locale is configured.

public static final boolean
parsingConnectionCaching(Settings settings)

Whether parsing connection caching is active.

public static final boolean
recordMapperCaching(Settings settings)

Whether record mapper caching is active.

public static final boolean
reflectionCaching(Settings settings)

Whether reflection caching is active.

public static final Locale
renderLocale(Settings settings)

The render locale that is applicable, or the default locale if no such locale is configured.

public static final boolean
returnAnyNonIdentityOnUpdatableRecord(Settings settings)

Whether any non-identity value should be returned on an UpdatableRecord operation.

public static final boolean
returnAnyOnUpdatableRecord(Settings settings)

Whether any value should be returned on an UpdatableRecord operation.

public static final boolean
updatablePrimaryKeys(Settings settings)

Whether primary keys should be updatable.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_SETTINGSback to summary
private static final Settings DEFAULT_SETTINGS
logback to summary
private static final JooqLogger log

Constructor Detail

SettingsToolsback to summary
public SettingsTools()

Method Detail

cloneback to summary
public static final Settings clone(Settings settings)

Clone some settings.

defaultSettingsback to summary
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
executePreparedStatementsback to summary
public static final boolean executePreparedStatements(Settings settings)

Whether a PreparedStatement should be executed.

executeStaticStatementsback to summary
public static final boolean executeStaticStatements(Settings settings)

Whether static Statement should be executed.

fetchIntermediateResultback to summary
public static final boolean fetchIntermediateResult(Configuration configuration)

Return FetchIntermediateResult.

getBackslashEscapingback to summary
public static final BackslashEscaping getBackslashEscaping(Settings settings)

Get the value BackslashEscaping value.

getBatchSizeback to summary
public static final int getBatchSize(Settings settings)

Return the specified Settings#getBatchSize().

getExecuteDeleteWithoutWhereback to summary
public static final ExecuteWithoutWhere getExecuteDeleteWithoutWhere(Settings settings)

Lazy access to Settings#getExecuteDeleteWithoutWhere().

getExecuteUpdateWithoutWhereback to summary
public static final ExecuteWithoutWhere getExecuteUpdateWithoutWhere(Settings settings)

Lazy access to Settings#getExecuteUpdateWithoutWhere().

getFetchServerOutputSizeback to summary
public static final int getFetchServerOutputSize(int fetchServerOutputSize, Settings settings)

Return fetchServerOutputSize if it is not 0, or the specified Settings#getFetchServerOutputSize().

getFetchSizeback to summary
public static final int getFetchSize(int fetchSize, Settings settings)

Return fetchSize if it is not 0, or the specified Settings#getFetchSize().

getMaxRowsback to summary
public static final int getMaxRows(int maxRows, Settings settings)

Return maxRows if it is not 0, or the specified Settings#getMaxRows().

getParamTypeback to summary
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.

getQueryPoolableback to summary
public static final QueryPoolable getQueryPoolable(QueryPoolable poolable, Settings settings)

Return poolable if it is not null, or the specified Settings#getQueryPoolable().

getQueryTimeoutback to summary
public static final int getQueryTimeout(int timeout, Settings settings)

Return timeout if it is not 0, or the specified Settings#getQueryTimeout().

getRenderKeywordCaseback to summary
public static final RenderKeywordCase getRenderKeywordCase(Settings settings)

Backwards compatible access to RenderKeywordCase and/or RenderKeywordStyle (the latter being deprecated).

getRenderMappingback to summary
public static final RenderMapping getRenderMapping(Settings settings)

Lazy access to RenderMapping.

getRenderNameCaseback to summary
public static final RenderNameCase getRenderNameCase(Settings settings)

Backwards compatible access to RenderNameCase and/or RenderNameStyle (the latter being deprecated).

getRenderQuotedNamesback to summary
public static final RenderQuotedNames getRenderQuotedNames(Settings settings)

Backwards compatible access to RenderQuotedNames and/or RenderNameStyle (the latter being deprecated).

getRenderTableback to summary
public static final RenderTable getRenderTable(Settings settings)

Lazy access to RenderTable.

getStatementTypeback to summary
public static final StatementType getStatementType(Settings settings)

Get the statement type from the settings.

getTransformUnneededArithmeticExpressionsback to summary
public static final TransformUnneededArithmeticExpressions getTransformUnneededArithmeticExpressions(Settings settings)

Lazy access to Settings#getTransformUnneededArithmeticExpressions().

interpreterLocaleback to summary
public static final Locale interpreterLocale(Settings settings)

The interpreter locale that is applicable, or the default locale if no such locale is configured.

localeback to summary
public static final Locale locale(Settings settings)

The render locale that is applicable, or the default locale if no such locale is configured.

parseLocaleback to summary
public static final Locale parseLocale(Settings settings)

The parser locale that is applicable, or the default locale if no such locale is configured.

parsingConnectionCachingback to summary
public static final boolean parsingConnectionCaching(Settings settings)

Whether parsing connection caching is active.

recordMapperCachingback to summary
public static final boolean recordMapperCaching(Settings settings)

Whether record mapper caching is active.

reflectionCachingback to summary
public static final boolean reflectionCaching(Settings settings)

Whether reflection caching is active.

renderLocaleback to summary
public static final Locale renderLocale(Settings settings)

The render locale that is applicable, or the default locale if no such locale is configured.

returnAnyNonIdentityOnUpdatableRecordback to summary
public static final boolean returnAnyNonIdentityOnUpdatableRecord(Settings settings)

Whether any non-identity value should be returned on an UpdatableRecord operation.

returnAnyOnUpdatableRecordback to summary
public static final boolean returnAnyOnUpdatableRecord(Settings settings)

Whether any value should be returned on an UpdatableRecord operation.

updatablePrimaryKeysback to summary
public static final boolean updatablePrimaryKeys(Settings settings)

Whether primary keys should be updatable.