public final class SqlStatements extends Object implements JdbiConfig<SqlStatements>
SqlStatements.| Constructor and Description |
|---|
SqlStatements() |
| Modifier and Type | Method and Description |
|---|---|
SqlStatements |
createCopy()
Returns a copy of this configuration object.
|
SqlStatements |
define(String key,
Object value)
Define an attribute for
StatementContext for statements executed by Jdbi. |
SqlStatements |
defineMap(Map<String,?> values)
Defines attributes for each key/value pair in the Map.
|
Object |
getAttribute(String key)
Obtain the value of an attribute
|
Map<String,Object> |
getAttributes()
Returns the attributes which will be applied to
SQL statements created by Jdbi. |
SqlParser |
getSqlParser() |
TemplateEngine |
getTemplateEngine() |
TimingCollector |
getTimingCollector() |
SqlStatements |
setSqlParser(SqlParser sqlParser)
Sets the
SqlParser used to parse parameters in SQL statements
executed by Jdbi. |
SqlStatements |
setTemplateEngine(TemplateEngine templateEngine)
Sets the
TemplateEngine used to render SQL for all
SQL statements executed by Jdbi. |
SqlStatements |
setTimingCollector(TimingCollector timingCollector)
Sets the
TimingCollector used to collect timing about the SQL statements executed
by Jdbi. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetRegistrypublic SqlStatements createCopy()
JdbiConfigcreateCopy in interface JdbiConfig<SqlStatements>public SqlStatements define(String key, Object value)
StatementContext for statements executed by Jdbi.key - the key for the attributevalue - the value for the attributepublic SqlStatements defineMap(Map<String,?> values)
values - map of attributes to define.public Object getAttribute(String key)
key - the name of the attributepublic Map<String,Object> getAttributes()
SQL statements created by Jdbi.public SqlParser getSqlParser()
public TemplateEngine getTemplateEngine()
public TimingCollector getTimingCollector()
public SqlStatements setSqlParser(SqlParser sqlParser)
SqlParser used to parse parameters in SQL statements
executed by Jdbi. The default parses colon-prefixed named parameter
tokens, e.g. :name.sqlParser - the new SQL parser.public SqlStatements setTemplateEngine(TemplateEngine templateEngine)
TemplateEngine used to render SQL for all
SQL statements executed by Jdbi. The default
engine replaces <name>-style tokens
with attributes defined
on the statement context.templateEngine - the new template engine.public SqlStatements setTimingCollector(TimingCollector timingCollector)
TimingCollector used to collect timing about the SQL statements executed
by Jdbi. The default collector does nothing.timingCollector - the new timing collectorCopyright © 2017. All rights reserved.