|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Configuration
The Configuration holds data about sql dialects, connections / data sources, and custom settings as well as custom data.
Essentially, the lifecycle of all objects in Configuration is the
same. It corresponds to the lifecycle of a single Query and its
rendering, variable binding, execution, and data fetching phases. This is
also reflected in the fact that ExecuteListener objects are
re-created every time a Query is executed
However, Configuration / Factory may be reused for several
consecutive queries in a single thread, if the supplied
Connection / DataSource allows this and if client
code can live with the possibility of stale state in
getData() between executions
| Method Summary | |
|---|---|
Connection |
getConnection()
Retrieve the configured connection |
Map<String,Object> |
getData()
Get all custom data from this Configuration
This is custom data that was previously set to the configuration using
setData(String, Object). |
Object |
getData(String key)
Get some custom data from this Configuration
This is custom data that was previously set to the configuration using
setData(String, Object). |
DataSource |
getDataSource()
Retrieve the configured data source |
SQLDialect |
getDialect()
Retrieve the configured dialect |
SchemaMapping |
getSchemaMapping()
Deprecated. - 2.0.5 - Use getSettings() instead |
Settings |
getSettings()
Retrieve the runtime configuration settings |
void |
setConnection(Connection connection)
Set the configured connection |
Object |
setData(String key,
Object value)
Set some custom data to this Configuration
Use custom data if you want to pass data to your custom QueryPart
or ExecuteListener objects to be made available at render, bind,
execution, fetch time. |
void |
setDataSource(DataSource datasource)
Set the configured data source |
| Method Detail |
|---|
SQLDialect getDialect()
DataSource getDataSource()
void setDataSource(DataSource datasource)
Connection getConnection()
void setConnection(Connection connection)
@Deprecated SchemaMapping getSchemaMapping()
getSettings() instead
Settings getSettings()
Map<String,Object> getData()
Configuration
This is custom data that was previously set to the configuration using
setData(String, Object). Use custom data if you want to pass
data to your custom QueryPart or ExecuteListener objects
to be made available at render, bind, execution, fetch time.
See ExecuteListener for more details.
nullExecuteListenerObject getData(String key)
Configuration
This is custom data that was previously set to the configuration using
setData(String, Object). Use custom data if you want to pass
data to your custom QueryPart or ExecuteListener objects
to be made available at render, bind, execution, fetch time.
See ExecuteListener for more details.
key - A key to identify the custom data
null if no such data is contained
in this ConfigurationExecuteListener
Object setData(String key,
Object value)
Configuration
Use custom data if you want to pass data to your custom QueryPart
or ExecuteListener objects to be made available at render, bind,
execution, fetch time.
Be sure that your custom data implements Serializable if you want
to serialise this Configuration or objects referencing this
Configuration, e.g. your Record types.
See ExecuteListener for more details.
key - A key to identify the custom datavalue - The custom data or null to unset the custom
data
null if no data
was previously set for the given keyExecuteListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||