public class JooqFactory extends Object
Configuration objects.
Configuration Parameters
| Name | Default | Description |
|---|---|---|
| dialect | null |
Inferred from the JDBC url if absent. If present, any name
from the SQLDialect enumeration.
|
| logExecutedSql | false |
Whether to log generated SQL statements as they are executed. |
| renderSchema | true |
Whether any schema is rendered at all; disable for single-schema environments. |
| renderNameStyle | QUOTED | Whether rendered schema, table, column, etc. names should be quoted in rendered SQL, or transformed in any way. Valid values are QUOTED, UPPER, LOWER, and AS_IS. |
| renderKeywordStyle | UPPER | Whether SQL keywords should be rendered in upper or lower case. |
| renderFormatted | false |
Whether generated SQL should be pretty-printed. |
| paramType | INDEXED |
How rendered bind values should be rendered. Valid values are:
|
| statementType | PREPARED_STATEMENT | Whether to use prepared statements with bind values, or static SQL. Valid values are PREPARED_STATEMENT and STATIC_STATEMENT. |
| executeLogging | false |
Whether to enable jOOQ's built-in logging. |
| executeWithOptimisticLocking | false |
Whether store() and delete() should be executed
with optimistic locking.
|
| attachRecords | true |
Whether fetched records should be attached to the fetching configuration. |
| updatablePrimaryKeys | false |
Whether primary-key values are deemed "updatable" in jOOQ.
Setting this to true will allow for updating primary keys
through UpdatableRecord.store() and UpdatableRecord.update().
|
| Constructor and Description |
|---|
JooqFactory() |
| Modifier and Type | Method and Description |
|---|---|
org.jooq.Configuration |
build(io.dropwizard.setup.Environment environment,
io.dropwizard.db.DataSourceFactory factory) |
org.jooq.Configuration |
build(io.dropwizard.setup.Environment environment,
io.dropwizard.db.PooledDataSourceFactory factory,
String name) |
com.google.common.base.Optional<org.jooq.SQLDialect> |
getDialect() |
org.jooq.conf.ParamType |
getParamType() |
org.jooq.conf.RenderKeywordStyle |
getRenderKeywordStyle() |
org.jooq.conf.RenderNameStyle |
getRenderNameStyle() |
org.jooq.conf.StatementType |
getStatementType() |
boolean |
isAttachRecords() |
boolean |
isExecuteLogging() |
boolean |
isExecuteWithOptimisticLocking() |
boolean |
isFetchWarnings() |
boolean |
isLogExecutedSql() |
boolean |
isRenderFormatted() |
boolean |
isRenderSchema() |
boolean |
isUpdatablePrimaryKeys() |
void |
setAttachRecords(boolean attachRecords) |
void |
setDialect(com.google.common.base.Optional<org.jooq.SQLDialect> dialect) |
void |
setExecuteLogging(boolean executeLogging) |
void |
setExecuteWithOptimisticLocking(boolean executeWithOptimisticLocking) |
void |
setFetchWarnings(boolean fetchWarnings) |
void |
setLogExecutedSql(boolean logExecutedSql) |
void |
setParamType(org.jooq.conf.ParamType paramType) |
void |
setRenderFormatted(boolean renderFormatted) |
void |
setRenderKeywordStyle(org.jooq.conf.RenderKeywordStyle renderKeywordStyle) |
void |
setRenderNameStyle(org.jooq.conf.RenderNameStyle renderNameStyle) |
void |
setRenderSchema(boolean renderSchema) |
void |
setStatementType(org.jooq.conf.StatementType statementType) |
void |
setUpdatablePrimaryKeys(boolean updatablePrimaryKeys) |
public com.google.common.base.Optional<org.jooq.SQLDialect> getDialect()
public void setDialect(com.google.common.base.Optional<org.jooq.SQLDialect> dialect)
public boolean isLogExecutedSql()
public void setLogExecutedSql(boolean logExecutedSql)
public boolean isRenderSchema()
public void setRenderSchema(boolean renderSchema)
public org.jooq.conf.RenderNameStyle getRenderNameStyle()
public void setRenderNameStyle(org.jooq.conf.RenderNameStyle renderNameStyle)
public org.jooq.conf.RenderKeywordStyle getRenderKeywordStyle()
public void setRenderKeywordStyle(org.jooq.conf.RenderKeywordStyle renderKeywordStyle)
public boolean isRenderFormatted()
public void setRenderFormatted(boolean renderFormatted)
public org.jooq.conf.ParamType getParamType()
public void setParamType(org.jooq.conf.ParamType paramType)
public org.jooq.conf.StatementType getStatementType()
public void setStatementType(org.jooq.conf.StatementType statementType)
public boolean isExecuteLogging()
public void setExecuteLogging(boolean executeLogging)
public boolean isExecuteWithOptimisticLocking()
public void setExecuteWithOptimisticLocking(boolean executeWithOptimisticLocking)
public boolean isAttachRecords()
public void setAttachRecords(boolean attachRecords)
public boolean isUpdatablePrimaryKeys()
public void setUpdatablePrimaryKeys(boolean updatablePrimaryKeys)
public boolean isFetchWarnings()
public void setFetchWarnings(boolean fetchWarnings)
public org.jooq.Configuration build(io.dropwizard.setup.Environment environment,
io.dropwizard.db.DataSourceFactory factory)
throws ClassNotFoundException
ClassNotFoundExceptionpublic org.jooq.Configuration build(io.dropwizard.setup.Environment environment,
io.dropwizard.db.PooledDataSourceFactory factory,
String name)
throws ClassNotFoundException
ClassNotFoundExceptionCopyright © 2016. All rights reserved.