public class JDBCConnectionInfo
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private java.sql.Connection |
ivConnection
The JDBC connection.
|
private java.util.Hashtable<java.lang.String,JDBCObjectController<? extends JDBCObject<?>>> |
ivControllers
A cache of JDBC object controllers associated with this connection.
|
private JDBCConnectionPool |
ivPool
The connection pool this object belongs to.
|
private static long |
serialVersionUID
The class' serialization version id.
|
| Constructor and Description |
|---|
JDBCConnectionInfo(JDBCConnectionPool pool,
java.sql.Connection conn)
Constructs a new
JDBCConnectionInfo object. |
| Modifier and Type | Method and Description |
|---|---|
void |
freeConnection()
Returns this JDBC connection info object back to its pool.
|
java.sql.Connection |
getConnection()
Returns the information object's JDBC connection.
|
JDBCConnectionPool |
getConnectionPool()
Returns the information object's JDBC connection pool.
|
<DBOBJCTLR extends JDBCObjectController<? extends JDBCObject<?>>> |
getController(java.lang.Class<DBOBJCTLR> ctlrcls)
Returns the JDBC object controller for the given controller class.
|
<DBOBJ extends JDBCObject<?>> |
getObject(java.lang.Class<DBOBJ> objcls)
Returns the JDBC object for the given object class.
|
java.lang.String |
getRevisedSQL(java.lang.String sqlstmt)
Returns the given sql statement with revisions based on the current rules
for revising sql statements (sql collection name, etc.).
|
boolean |
isDB2e()
Answers if this connection uses an IBM DB2 Everyplace database.
|
boolean |
isDB2i()
Answers if this connection uses an IBM DB2 System i (AS/400) database.
|
boolean |
isDB2iNative()
Answers if this connection uses an IBM DB2 System i (AS/400) database
in native mode (i.e.
|
boolean |
isDB2w()
Answers if this connection uses an IBM DB2 Windows database.
|
boolean |
isDerby()
Answers if this connection uses an Apache Derby (IBM Cloudscape) database.
|
void |
setConnection(java.sql.Connection conn)
Sets the information object's JDBC connection.
|
<DBOBJCTLR extends JDBCObjectController<? extends JDBCObject<?>>> |
setController(DBOBJCTLR objctlr)
Caches the given JDBC object controller instance.
|
private static final long serialVersionUID
private JDBCConnectionPool ivPool
private java.sql.Connection ivConnection
private java.util.Hashtable<java.lang.String,JDBCObjectController<? extends JDBCObject<?>>> ivControllers
public JDBCConnectionInfo(JDBCConnectionPool pool, java.sql.Connection conn)
JDBCConnectionInfo object.pool - (JDBCConnectionPool) The connection pool that this
connection information object belongs to.conn - (Connection) A JDBC connection.public java.sql.Connection getConnection()
public void setConnection(java.sql.Connection conn)
conn - (Connection) The JDBC connection.public void freeConnection()
public JDBCConnectionPool getConnectionPool()
public <DBOBJCTLR extends JDBCObjectController<? extends JDBCObject<?>>> DBOBJCTLR getController(java.lang.Class<DBOBJCTLR> ctlrcls)
ctlrcls - (Class) The class for the desired controller.public <DBOBJCTLR extends JDBCObjectController<? extends JDBCObject<?>>> void setController(DBOBJCTLR objctlr)
objctlr - (JDBCObjectController) The controller to cache.public <DBOBJ extends JDBCObject<?>> DBOBJ getObject(java.lang.Class<DBOBJ> objcls)
objcls - (Class) The class for the desired object.public java.lang.String getRevisedSQL(java.lang.String sqlstmt)
sqlstmt - (String) The sql statement that is to be revised.public boolean isDB2e()
true if this is a DB2 Everyplace database,
otherwise false.public boolean isDB2i()
true if this is a DB2 System i database,
otherwise false.public boolean isDB2iNative()
true if this is a DB2 System i native database,
otherwise false.public boolean isDB2w()
true if this is a DB2 Windows database,
otherwise false.public boolean isDerby()
true if this is an Apache Derby database,
otherwise false.