org.opencms.db
Class CmsSqlManager

java.lang.Object
  extended by org.opencms.db.CmsSqlManager
Direct Known Subclasses:
CmsSqlManager

public class CmsSqlManager
extends Object

Superclass for all SQL manager implementations.

Since:
6.0.0
Version:
$Revision: 1.8 $
Author:
Carsten Weinholz

Constructor Summary
protected CmsSqlManager()
          Protected constructor to allow only subclassing.
protected CmsSqlManager(CmsDriverManager driverManager)
          Creates a new SQL manager from the provided driver manager.
 
Method Summary
 Connection getConnection(String dbPoolName)
          Returns a connection to the database using the given pool identified by its name.
 Connection getConnectionByUrl(String dbPoolUrl)
          Returns a connection to the database using the given pool identified by its full url.
protected  List getDbPoolNames()
          Returns a list of available database connection pool names.
protected  String getDefaultDbPoolName()
          Returns the name of the default database connection pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsSqlManager

protected CmsSqlManager()
Protected constructor to allow only subclassing.


CmsSqlManager

protected CmsSqlManager(CmsDriverManager driverManager)
Creates a new SQL manager from the provided driver manager.

Parameters:
driverManager - the low level database driver manager
Method Detail

getConnection

public Connection getConnection(String dbPoolName)
                         throws SQLException
Returns a connection to the database using the given pool identified by its name.

Parameters:
dbPoolName - the pool name
Returns:
a database connection
Throws:
SQLException - if something goes wrong

getConnectionByUrl

public Connection getConnectionByUrl(String dbPoolUrl)
                              throws SQLException
Returns a connection to the database using the given pool identified by its full url.

Parameters:
dbPoolUrl - the pool url
Returns:
a database connection
Throws:
SQLException - if something goes wrong

getDbPoolNames

protected List getDbPoolNames()
Returns a list of available database connection pool names.

Returns:
a list of database connection pool names

getDefaultDbPoolName

protected String getDefaultDbPoolName()
Returns the name of the default database connection pool.

Returns:
the name of the default database connection pool