getConnection(String name, String username, String password) This method returns a Connecton using the given parameters.
You should only use this method if you need user based access to the
database!
Parameters: name - The database name. Parameters: username - The name of the database user. Parameters: password - The password of the database user.
getDatabases() Returns a Map containing all Databases registered to Torque.
The key of the Map is the name of the database, and the value is the
database instance.
getManager(String name, String defaultClassName) This methods returns either the Manager from the configuration file,
or the default one provided by the generated code.
getOrCreateDatabase(String databaseName) Returns the database for the key databaseName.
If no database is associated to the specified key,
a new database is created, mapped to the specified key, and returned.
Parameters: databaseName - the key to get the database for.
This method returns a Connection from the default pool.
The requested connection. throws: TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.
Parameters: name - The database name. a database connection throws: TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.
This method returns a Connecton using the given parameters.
You should only use this method if you need user based access to the
database!
Parameters: name - The database name. Parameters: username - The name of the database user. Parameters: password - The password of the database user. A Connection. throws: TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.
Returns database adapter for a specific connection pool.
Parameters: name - A pool name. The corresponding database adapter. throws: TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.
Returns the database for the key databaseName.
Parameters: databaseName - the key to get the database for. the database for the specified key, or null if the databasedoes not exist. throws: TorqueException - if Torque is not yet initialized.
Returns the default database map information.
A DatabaseMap. throws: TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.
Returns the database map information. Name relates to the name
of the connection pool to associate with the map.
Parameters: name - The name of the database corresponding to theDatabaseMap to retrieve. The named DatabaseMap. throws: TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.
Returns a Map containing all Databases registered to Torque.
The key of the Map is the name of the database, and the value is the
database instance.
Note that in the very special case where a new database which
is not configured in Torque's configuration gets known to Torque
at a later time, the returned map may change, and there is no way to
protect you against this.
a Map containing all Databases known to Torque, never null. throws: TorqueException - if Torque is not yet initialized.
This methods returns either the Manager from the configuration file,
or the default one provided by the generated code.
Parameters: name - name of the manager Parameters: defaultClassName - the class to use if name has not been configured a Manager
Returns the database for the key databaseName.
If no database is associated to the specified key,
a new database is created, mapped to the specified key, and returned.
Parameters: databaseName - the key to get the database for. the database associated with specified key, or the newly createddatabase, never null.
This method returns the current schema for a database connection
Parameters: name - The database name. The current schema name. Null means, no schema has been set. throws: TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.
Sets the current schema for a database connection
Parameters: name - The database name. Parameters: schema - The current schema name throws: TorqueException - Any exceptions caught during processing will berethrown wrapped into a TorqueException.