public final class DBConnection extends Object implements DBBackend
| Modifier | Constructor and Description |
|---|---|
protected |
DBConnection(DBClassifier dbc,
DBConnectionPool.CheckConnection connectionChecker)
Creates a new DBConnection object.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
charToBool(char bool)
DOCUMENT ME!
|
void |
close()
DOCUMENT ME!
|
static void |
closeConnections(Connection... cons)
Closes all given
Connections and logs a warning message if an error occurs while closing. |
static void |
closeResultSets(ResultSet... sets)
Closes all given
ResultSets and logs a warning message if an error occurs while closing. |
static void |
closeStatements(Statement... stmts)
Closes all given
Statements and logs a warning message if an error occurs while closing. |
Connection |
getConnection()
The
Connection used by this DBConnection. |
DBConnectionPool.CheckConnection |
getConnectionChecker()
DOCUMENT ME!
|
String |
getDriver()
The driver class of the jdbc driver.
|
String |
getPassword()
The password of the currently logged-in db user.
|
long |
getPoolLeftTime()
DOCUMENT ME!
|
int |
getRetriesOnError()
Always returns
0 as retries are not supported. |
StatementCache |
getStatementCache()
DOCUMENT ME!
|
String |
getURL()
The URL of the jdbc driver connection.
|
String |
getUser()
The currently logged-in db username.
|
boolean |
isClosed()
Returns the current closed state of the connection.
|
boolean |
isDown()
Simply calls
isClosed(). |
boolean |
isValid()
Returns the current closed state of the connection.
|
void |
setConnectionChecker(DBConnectionPool.CheckConnection connectionChecker)
DOCUMENT ME!
|
void |
setPoolLeftTime(long poolLeftTime)
DOCUMENT ME!
|
void |
setRetriesOnError(int noOfRetries)
Calls to this operation will to nothing since retries are not supported.
|
void |
shutdown()
Simply calls
close(). |
static boolean |
stringToBool(String bool)
DOCUMENT ME!
|
ResultSet |
submitInternalQuery(String descriptor,
Object... parameters)
This operation shall be used to execute queries that related to the tables of the underlying cids system (cs_*).
|
int |
submitInternalUpdate(String descriptor,
Object... parameters)
This operation shall be used to execute updates that related to the tables of the underlying cids system (cs_*).
|
ResultSet |
submitQuery(int sqlID,
Object... parameters)
DOCUMENT ME!
This operation shall throw a SQLException if the Shutdownable.shutdown() has already been
called. |
ResultSet |
submitQuery(String descriptor,
Object... parameters)
DOCUMENT ME!
This operation shall throw a SQLException if the Shutdownable.shutdown() has already been
called. |
int |
submitUpdate(int sqlID,
Object... parameters)
DOCUMENT ME!
This operation shall throw a SQLException if the Shutdownable.shutdown() has already been
called. |
int |
submitUpdate(String descriptor,
Object... parameters)
DOCUMENT ME!
This operation shall throw a SQLException if the Shutdownable.shutdown() has already been
called. |
public static final String SQL_CODE_ALREADY_CLOSED
public static final String SQL_CODE_INVALID_DESC
public static final String DESC_VERIFY_USER_PW
public static final String IS_USER_DEACTIVATED
public static final String DESC_FETCH_DOMAIN_ID_FROM_DOMAIN_STRING
public static final String DESC_FETCH_CONFIG_ATTR_KEY_ID
public static final String DESC_FETCH_CONFIG_ATTR_USER_VALUE
public static final String DESC_FETCH_CONFIG_ATTR_UG_VALUE
public static final String DESC_FETCH_CONFIG_ATTR_DOMAIN_VALUE
public static final String DESC_FETCH_CONFIG_ATTR_EXEMPT_VALUE
public static final String DESC_FETCH_HISTORY
public static final String DESC_FETCH_HISTORY_LIMIT
public static final String DESC_INSERT_HISTORY_ENTRY
public static final String DESC_HAS_HISTORY
public static final String DESC_TABLE_HAS_COLUMN
public static final String DESC_DELETE_CACHEENTRY
public static final String DESC_INSERT_CACHEENTRY
public static final String DESC_UPDATE_CACHEENTRY
public static final String DESC_GET_ALL_USERGROUPS
public static final String DESC_GET_ALL_CLASSES
public static final String DESC_GET_ALL_CLASS_ATTRIBUTES
public static final String DESC_GET_ALL_METHODS
public static final String DESC_GET_ALL_IMAGES
public static final String DESC_GET_ALL_USERS
public static final String DESC_GET_ALL_MEMBERSHIPS
public static final String DESC_CHANGE_USER_PASSWORD
public static final String DESC_GET_ALL_CLASS_PERMS
public static final String DESC_GET_ALL_METHOD_PERMS
public static final String DESC_GET_ATTRIBUTE_INFO
public static final String DESC_SUPPORTS_SCHEDULED_SERVER_ACTIONS
public static final String UPDATE_CS_CHANGED_OBJECT_ENTRY
public static final String UPDATE_CS_CHANGED_CLASS_ENTRY
public static final String INSERT_CS_CHANGED_OBJECT_ENTRY
public static final String INSERT_CS_CHANGED_CLASS_ENTRY
public static final String GET_ALL_CS_CONFIG_ATTR
public static final String GET_ALL_CS_CONFIG_ATTR_EXEMPT
protected final DBClassifier dbc
protected DBConnection(DBClassifier dbc, DBConnectionPool.CheckConnection connectionChecker) throws ServerExitError
dbc - DOCUMENT ME!connectionChecker - DOCUMENT ME!ServerExitError - DOCUMENT ME!public long getPoolLeftTime()
public void setPoolLeftTime(long poolLeftTime)
poolLeftTime - the poolLeftTime to setpublic void setConnectionChecker(DBConnectionPool.CheckConnection connectionChecker)
connectionChecker - the connectionChecker to setpublic DBConnectionPool.CheckConnection getConnectionChecker()
public static boolean charToBool(char bool)
bool - DOCUMENT ME!public static boolean stringToBool(String bool)
bool - DOCUMENT ME!public String getUser()
public String getPassword()
public String getURL()
public String getDriver()
public Connection getConnection()
Connection used by this DBConnection.getConnection in interface DBBackendConnection used by this DBConnectionpublic void close()
public ResultSet submitInternalQuery(String descriptor, Object... parameters) throws SQLException
DBBackendSQLException.SQLException is thrown.SQLException if the Shutdownable.shutdown() has already been
called.submitInternalQuery in interface DBBackenddescriptor - one of the descriptors defined in this interfaceparameters - the parameters the underlying query will takeResultSet of the executed querySQLException - public int submitInternalUpdate(String descriptor, Object... parameters) throws SQLException
DBBackendSQLException.SQLException is thrown.SQLException if the Shutdownable.shutdown() has already been
called.submitInternalUpdate in interface DBBackenddescriptor - one of the descriptors defined in this interfaceparameters - the parameters the underlying query will takeSQLException - public ResultSet submitQuery(String descriptor, Object... parameters) throws SQLException
DBBackendSQLException if the Shutdownable.shutdown() has already been
called.submitQuery in interface DBBackenddescriptor - DOCUMENT ME!parameters - DOCUMENT ME!SQLException - DOCUMENT ME!public ResultSet submitQuery(int sqlID, Object... parameters) throws SQLException
DBBackendSQLException if the Shutdownable.shutdown() has already been
called.submitQuery in interface DBBackendsqlID - DOCUMENT ME!parameters - DOCUMENT ME!SQLException - DOCUMENT ME!public int submitUpdate(String descriptor, Object... parameters) throws SQLException
DBBackendSQLException if the Shutdownable.shutdown() has already been
called.submitUpdate in interface DBBackenddescriptor - DOCUMENT ME!parameters - DOCUMENT ME!SQLException - DOCUMENT ME!public int submitUpdate(int sqlID,
Object... parameters)
throws SQLException
DBBackendSQLException if the Shutdownable.shutdown() has already been
called.submitUpdate in interface DBBackendsqlID - DOCUMENT ME!parameters - DOCUMENT ME!SQLException - DOCUMENT ME!public StatementCache getStatementCache()
public static void closeConnections(Connection... cons)
Connections and logs a warning message if an error occurs while closing.
null objects are ignored.cons - sets the statements to closepublic static void closeResultSets(ResultSet... sets)
ResultSets and logs a warning message if an error occurs while closing.
null objects are ignored.sets - the statements to closepublic static void closeStatements(Statement... stmts)
Statements and logs a warning message if an error occurs while closing.
null objects are ignored.stmts - the statements to closepublic void setRetriesOnError(int noOfRetries)
setRetriesOnError in interface DBBackendnoOfRetries - DOCUMENT ME!DBBackend.getRetriesOnError()public int getRetriesOnError()
0 as retries are not supported.getRetriesOnError in interface DBBackend0public void shutdown()
throws ServerExitError
close().shutdown in interface ShutdownableServerExitError - neverpublic boolean isClosed()
public boolean isValid()
public boolean isDown()
isClosed().isDown in interface ShutdownableisClosed()Copyright © 2012–2026 cismet GmbH. All rights reserved.