public class CmsSqlManager extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
CmsSqlManager()
Protected constructor to allow only subclassing.
|
protected |
CmsSqlManager(CmsDriverManager driverManager)
Creates a new SQL manager from the provided driver manager.
|
Modifier and Type | Method and Description |
---|---|
int |
getActiveConnections(java.lang.String dbPoolUrl)
Returns the number of active connections managed by a pool.
|
java.sql.Connection |
getConnection(java.lang.String dbPoolName)
Returns a connection to the database using the given pool identified by its name.
|
java.sql.Connection |
getConnectionByUrl(java.lang.String dbPoolUrl)
Returns a connection to the database using the given pool identified by its full url.
|
java.util.List<java.lang.String> |
getDbPoolUrls()
Returns a list of available database connection pool names.
|
java.lang.String |
getDefaultDbPoolName()
Returns the name of the default database connection pool.
|
int |
getIdleConnections(java.lang.String dbPoolUrl)
Returns the number of idle connections managed by a pool.
|
protected CmsSqlManager()
protected CmsSqlManager(CmsDriverManager driverManager)
driverManager
- the low level database driver managerpublic int getActiveConnections(java.lang.String dbPoolUrl) throws CmsDbException
dbPoolUrl
- the url of a poolCmsDbException
- if something goes wrongpublic java.sql.Connection getConnection(java.lang.String dbPoolName) throws java.sql.SQLException
dbPoolName
- the pool namejava.sql.SQLException
- if something goes wrongpublic java.sql.Connection getConnectionByUrl(java.lang.String dbPoolUrl) throws java.sql.SQLException
dbPoolUrl
- the pool urljava.sql.SQLException
- if something goes wrongpublic java.util.List<java.lang.String> getDbPoolUrls()
public java.lang.String getDefaultDbPoolName()
public int getIdleConnections(java.lang.String dbPoolUrl) throws CmsDbException
dbPoolUrl
- the url of a poolCmsDbException
- if something goes wrong