Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.turbine.services.db
Class TurbineDB  view TurbineDB download TurbineDB.java

java.lang.Object
  extended byorg.apache.turbine.services.db.TurbineDB

Deprecated. As of Turbine 2.2, use org.apache.torque.Torque

public abstract class TurbineDB
extends java.lang.Object

This class provides a common front end to all database - related services in Turbine. This class contains static methods that you can call to access the methods of system's configured service implementations.

This class is deprecated you should use org.apache.torque.Torque Connection dbConn = null; try { dbConn = Torque.getConnection(); // Do something with the connection here... } catch (Exception e) { // Either from obtaining the connection or from your application code. } finally { Torque.closeConnection(dbConn); }

Version:
$Id: TurbineDB.java 264148 2005-08-29 14:21:04Z henning $

Constructor Summary
TurbineDB()
          Deprecated.  
 
Method Summary
static java.sql.Connection getConnection()
          Deprecated. This method returns a DBConnection from the default pool.
static java.sql.Connection getConnection(java.lang.String name)
          Deprecated. This method returns a DBConnection from the pool with the specified name.
static org.apache.torque.map.DatabaseMap getDatabaseMap()
          Deprecated. Returns the default database map information.
static org.apache.torque.map.DatabaseMap getDatabaseMap(java.lang.String name)
          Deprecated. Returns the database map information.
static org.apache.torque.adapter.DB getDB()
          Deprecated. Returns the database adapter for the default connection pool.
static org.apache.torque.adapter.DB getDB(java.lang.String name)
          Deprecated. Returns database adapter for a specific connection pool.
static java.lang.String getDefaultDB()
          Deprecated. Returns the pool name for the default database.
static java.lang.String getDefaultMap()
          Deprecated. Returns the map name for the default database.
static void releaseConnection(java.sql.Connection dbconn)
          Deprecated. Release a connection back to the database pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TurbineDB

public TurbineDB()
Deprecated. 
Method Detail

getDefaultMap

public static java.lang.String getDefaultMap()
Deprecated. 
Returns the map name for the default database.


getDatabaseMap

public static org.apache.torque.map.DatabaseMap getDatabaseMap()
                                                        throws org.apache.turbine.util.TurbineException
Deprecated. 
Returns the default database map information.


getDatabaseMap

public static org.apache.torque.map.DatabaseMap getDatabaseMap(java.lang.String name)
                                                        throws org.apache.turbine.util.TurbineException
Deprecated. 
Returns the database map information. Name relates to the name of the connection pool to associate with the map.


getDefaultDB

public static java.lang.String getDefaultDB()
Deprecated. 
Returns the pool name for the default database.


getConnection

public static java.sql.Connection getConnection()
                                         throws java.lang.Exception
Deprecated. 
This method returns a DBConnection from the default pool.


getConnection

public static java.sql.Connection getConnection(java.lang.String name)
                                         throws java.lang.Exception
Deprecated. 
This method returns a DBConnection from the pool with the specified name. The pool must be specified in the property file using the following syntax:
 database.[name].driver
 database.[name].url
 database.[name].username
 database.[name].password
 


releaseConnection

public static void releaseConnection(java.sql.Connection dbconn)
                              throws java.lang.Exception
Deprecated. 
Release a connection back to the database pool.


getDB

public static org.apache.torque.adapter.DB getDB()
                                          throws java.lang.Exception
Deprecated. 
Returns the database adapter for the default connection pool.


getDB

public static org.apache.torque.adapter.DB getDB(java.lang.String name)
                                          throws java.lang.Exception
Deprecated. 
Returns database adapter for a specific connection pool.