- java.lang.Object
-
- org.jooq.conf.SettingsTools
-
public final class SettingsTools extends Object
Convenience methods for jOOQ runtime settings.- Author:
- Lukas Eder
-
-
Constructor Summary
Constructors Constructor Description SettingsTools()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Settings
clone(Settings settings)
Clone some settings.static Settings
defaultSettings()
Retrieve the configured default settings.static boolean
executePreparedStatements(Settings settings)
Whether aPreparedStatement
should be executed.static boolean
executeStaticStatements(Settings settings)
Whether staticStatement
should be executed.static BackslashEscaping
getBackslashEscaping(Settings settings)
Get the value BackslashEscaping value.static ExecuteWithoutWhere
getExecuteDeleteWithoutWhere(Settings settings)
Lazy access toSettings.getExecuteDeleteWithoutWhere()
.static ExecuteWithoutWhere
getExecuteUpdateWithoutWhere(Settings settings)
Lazy access toSettings.getExecuteUpdateWithoutWhere()
.static int
getFetchServerOutputSize(int fetchServerOutputSize, Settings settings)
static int
getFetchSize(int fetchSize, Settings settings)
static int
getMaxRows(int maxRows, Settings settings)
static ParamType
getParamType(Settings settings)
Get the parameter type from the settings.static QueryPoolable
getQueryPoolable(QueryPoolable poolable, Settings settings)
static int
getQueryTimeout(int timeout, Settings settings)
static RenderKeywordCase
getRenderKeywordCase(Settings settings)
Backwards compatible access toRenderKeywordCase
and/orRenderKeywordStyle
(the latter being deprecated).static RenderMapping
getRenderMapping(Settings settings)
Lazy access toRenderMapping
.static RenderNameCase
getRenderNameCase(Settings settings)
Backwards compatible access toRenderNameCase
and/orRenderNameStyle
(the latter being deprecated).static RenderQuotedNames
getRenderQuotedNames(Settings settings)
Backwards compatible access toRenderQuotedNames
and/orRenderNameStyle
(the latter being deprecated).static StatementType
getStatementType(Settings settings)
Get the statement type from the settings.static Locale
interpreterLocale(Settings settings)
The interpreter locale that is applicable, or the default locale if no such locale is configured.static Locale
locale(Settings settings)
The render locale that is applicable, or the default locale if no such locale is configured.static Locale
parseLocale(Settings settings)
The parser locale that is applicable, or the default locale if no such locale is configured.static boolean
reflectionCaching(Settings settings)
Whether primary keys should be updatable.static Locale
renderLocale(Settings settings)
The render locale that is applicable, or the default locale if no such locale is configured.static boolean
updatablePrimaryKeys(Settings settings)
Whether primary keys should be updatable.
-
-
-
Method Detail
-
getParamType
public static final ParamType getParamType(Settings settings)
Get the parameter type from the settings.The
ParamType
can be overridden by theStatementType
. If the latter is set toStatementType.STATIC_STATEMENT
, then the former defaults toParamType.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 aPreparedStatement
should be executed.
-
executeStaticStatements
public static final boolean executeStaticStatements(Settings settings)
Whether staticStatement
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 primary keys should be updatable.
-
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 toRenderMapping
.
-
getRenderKeywordCase
public static final RenderKeywordCase getRenderKeywordCase(Settings settings)
Backwards compatible access toRenderKeywordCase
and/orRenderKeywordStyle
(the latter being deprecated).
-
getRenderNameCase
public static final RenderNameCase getRenderNameCase(Settings settings)
Backwards compatible access toRenderNameCase
and/orRenderNameStyle
(the latter being deprecated).
-
getRenderQuotedNames
public static final RenderQuotedNames getRenderQuotedNames(Settings settings)
Backwards compatible access toRenderQuotedNames
and/orRenderNameStyle
(the latter being deprecated).
-
getExecuteUpdateWithoutWhere
public static final ExecuteWithoutWhere getExecuteUpdateWithoutWhere(Settings settings)
Lazy access toSettings.getExecuteUpdateWithoutWhere()
.
-
getExecuteDeleteWithoutWhere
public static final ExecuteWithoutWhere getExecuteDeleteWithoutWhere(Settings settings)
Lazy access toSettings.getExecuteDeleteWithoutWhere()
.
-
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
- If the JVM flag
-
getQueryTimeout
public static final int getQueryTimeout(int timeout, Settings settings)
-
getQueryPoolable
public static final QueryPoolable getQueryPoolable(QueryPoolable poolable, Settings settings)
-
getMaxRows
public static final int getMaxRows(int maxRows, Settings settings)
-
getFetchSize
public static final int getFetchSize(int fetchSize, Settings settings)
-
getFetchServerOutputSize
public static final int getFetchServerOutputSize(int fetchServerOutputSize, Settings settings)
-
-