|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Torque
Avalon role interface for Torque.
| Field Summary | |
|---|---|
static java.lang.String |
ROLE
The avalon role. |
| Method Summary | |
|---|---|
void |
closeConnection(java.sql.Connection con)
Closes a connection. |
org.apache.commons.configuration.Configuration |
getConfiguration()
Get the configuration for this component. |
java.sql.Connection |
getConnection()
This method returns a Connection from the default pool. |
java.sql.Connection |
getConnection(java.lang.String name)
|
java.sql.Connection |
getConnection(java.lang.String name,
java.lang.String username,
java.lang.String password)
This method returns a Connecton using the given parameters. |
Database |
getDatabase(java.lang.String databaseName)
Returns the database for the key databaseName. |
DatabaseMap |
getDatabaseMap()
Returns the default database map information. |
DatabaseMap |
getDatabaseMap(java.lang.String name)
Returns the database map information. |
java.util.Map |
getDatabases()
Returns a Map containing all Databases registered to Torque. |
DB |
getDB(java.lang.String name)
Returns database adapter for a specific connection pool. |
java.lang.String |
getDefaultDB()
Returns the name of the default database. |
AbstractBaseManager |
getManager(java.lang.String name)
This method returns a Manager for the given name. |
AbstractBaseManager |
getManager(java.lang.String name,
java.lang.String defaultClassName)
This methods returns either the Manager from the configuration file, or the default one provided by the generated code. |
MapBuilder |
getMapBuilder(java.lang.String className)
Get a MapBuilder |
Database |
getOrCreateDatabase(java.lang.String databaseName)
Returns the database for the key databaseName. |
java.lang.String |
getSchema(java.lang.String name)
This method returns the current schema for a database connection |
boolean |
isInit()
Determine whether Torque has already been initialized. |
void |
registerMapBuilder(MapBuilder builder)
Register a MapBuilder |
void |
registerMapBuilder(java.lang.String className)
Register a MapBuilder |
void |
setSchema(java.lang.String name,
java.lang.String schema)
Sets the current schema for a database connection |
| Field Detail |
|---|
static final java.lang.String ROLE
| Method Detail |
|---|
boolean isInit()
org.apache.commons.configuration.Configuration getConfiguration()
AbstractBaseManager getManager(java.lang.String name)
name - name of the manager
AbstractBaseManager getManager(java.lang.String name,
java.lang.String defaultClassName)
name - name of the managerdefaultClassName - the class to use if name has not been configured
DatabaseMap getDatabaseMap()
throws TorqueException
TorqueException - Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.
DatabaseMap getDatabaseMap(java.lang.String name)
throws TorqueException
name - The name of the database corresponding to the
DatabaseMap to retrieve.
DatabaseMap.
TorqueException - Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.void registerMapBuilder(java.lang.String className)
className - the MapBuildervoid registerMapBuilder(MapBuilder builder)
builder - the instance of the MapBuilder
MapBuilder getMapBuilder(java.lang.String className)
throws TorqueException
className - of the MapBuilder
TorqueException - if the Map Builder cannot be instantiated
java.sql.Connection getConnection()
throws TorqueException
TorqueException - Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.
java.sql.Connection getConnection(java.lang.String name)
throws TorqueException
name - The database name.
TorqueException - Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.
java.sql.Connection getConnection(java.lang.String name,
java.lang.String username,
java.lang.String password)
throws TorqueException
name - The database name.username - The name of the database user.password - The password of the database user.
TorqueException - Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.
DB getDB(java.lang.String name)
throws TorqueException
name - A pool name.
TorqueException - Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.java.lang.String getDefaultDB()
void closeConnection(java.sql.Connection con)
con - A Connection to close.
void setSchema(java.lang.String name,
java.lang.String schema)
throws TorqueException
name - The database name.schema - The current schema name
TorqueException - Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.
java.lang.String getSchema(java.lang.String name)
throws TorqueException
name - The database name.
TorqueException - Any exceptions caught during processing will be
rethrown wrapped into a TorqueException.
Database getDatabase(java.lang.String databaseName)
throws TorqueException
databaseName.
databaseName - the key to get the database for.
TorqueException - if Torque is not yet initialized.
java.util.Map getDatabases()
throws TorqueException
TorqueException - if Torque is not yet initialized.Database getOrCreateDatabase(java.lang.String databaseName)
databaseName.
If no database is associated to the specified key,
a new database is created, mapped to the specified key, and returned.
databaseName - the key to get the database for.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||