org.jooq
Interface Configuration

All Superinterfaces:
Serializable
All Known Subinterfaces:
BindContext, Context<C>, ExecuteContext, FactoryOperations, RenderContext
All Known Implementing Classes:
ASEFactory, CUBRIDFactory, DB2Factory, DerbyFactory, Factory, H2Factory, HSQLDBFactory, IngresFactory, MySQLFactory, OracleFactory, PostgresFactory, SQLiteFactory, SQLServerFactory, SybaseFactory

public interface Configuration
extends Serializable

The Configuration holds data about sql dialects and connections

Author:
Lukas Eder

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).
 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 This is custom data that was previously set to the configuration using setData(String, Object).
 

Method Detail

getDialect

SQLDialect getDialect()
Retrieve the configured dialect


getConnection

Connection getConnection()
Retrieve the configured connection


setConnection

void setConnection(Connection connection)
Set the configured connection


getSchemaMapping

@Deprecated
SchemaMapping getSchemaMapping()
Deprecated. - 2.0.5 - Use getSettings() instead

Retrieve the configured schema mapping


getSettings

Settings getSettings()
Retrieve the runtime configuration settings


getData

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). 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.

Returns:
The custom data. This is never null
See Also:
ExecuteListener

getData

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). 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.

Parameters:
key - A key to identify the custom data
Returns:
The custom data or null if no such data is contained in this Configuration
See Also:
ExecuteListener

setData

Object setData(String key,
               Object value)
Set some custom data to this 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.

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.

Parameters:
key - A key to identify the custom data
value - The custom data or null to unset the custom data
Returns:
The previously set custom data or null if no data was previously set for the given key
See Also:
ExecuteListener


Copyright © 2012. All Rights Reserved.