|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.solarmetric.datasource.ConnectionWrapper
Wrapper around an existing connection. Subclasses can override the methods whose behavior they mean to change. The equals and hashcode methods pass through to the base underlying data store connection.
Inner Class Summary | |
static class |
ConnectionWrapper.Statistics
|
Fields inherited from interface java.sql.Connection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Constructor Summary | |
ConnectionWrapper(DataSourceImpl ds,
Connection conn)
|
Method Summary | |
void |
addError(Exception e)
|
protected void |
checkClosed()
|
(package private) void |
clearNeedsRollback()
|
void |
clearWarnings()
|
void |
close()
|
void |
commit()
|
int |
compareTo(Object other)
A subclass of this method might want to override this in order to appear at a higher position on the sorted pool. |
Statement |
createStatement()
|
Statement |
createStatement(int type,
int concurrency)
|
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
boolean |
equals(Object other)
Two ConnectionWrapper instances are equals if and
only if their embedded connections are equal or identical. |
protected void |
finalize()
|
boolean |
getAutoCommit()
|
Connection |
getBaseConnection()
Return the base underlying data store connection. |
String |
getCatalog()
|
Connection |
getConnection()
Return the wrapped connection. |
DataSourceImpl |
getDataSource()
|
int |
getErrorCount()
|
int |
getHoldability()
|
long |
getLastConnectionTestTime()
The time in milliseconds when this connection was last tested. |
DatabaseMetaData |
getMetaData()
|
int |
getTransactionIsolation()
|
Map |
getTypeMap()
|
SQLWarning |
getWarnings()
|
int |
hashCode()
The hashCode() is the hashCode() of the embedded connection. |
boolean |
isClosed()
|
protected boolean |
isFinalized()
|
boolean |
isReadOnly()
|
String |
nativeSQL(String str)
|
(package private) boolean |
needsRollback()
|
CallableStatement |
prepareCall(String str)
|
CallableStatement |
prepareCall(String str,
int i1,
int i2)
|
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
PreparedStatement |
prepareStatement(String sql)
|
PreparedStatement |
prepareStatement(String sql,
int autoGeneratedKeys)
|
PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes)
|
PreparedStatement |
prepareStatement(String sql,
int type,
int concur)
|
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
PreparedStatement |
prepareStatement(String sql,
String[] columnNames)
|
void |
releaseSavepoint(Savepoint savepoint)
|
void |
rollback()
|
void |
rollback(Savepoint savepoint)
|
void |
setAutoCommit(boolean bool)
|
void |
setCatalog(String str)
|
void |
setHoldability(int holdability)
|
void |
setLastConnectionTestTime(long time)
The time in milliseconds when this connection was last tested. |
void |
setNeedsRollback()
Indicate that a rollback should occur on this connection prior to re-pooling. |
void |
setReadOnly(boolean bool)
|
Savepoint |
setSavepoint()
|
Savepoint |
setSavepoint(String savepoint)
|
void |
setTransactionIsolation(int i)
|
void |
setTypeMap(Map map)
|
String |
toString()
|
StringBuffer |
toString(StringBuffer buffer)
|
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public ConnectionWrapper(DataSourceImpl ds, Connection conn)
Method Detail |
protected void finalize() throws Throwable
finalize
in class Object
protected boolean isFinalized()
public DataSourceImpl getDataSource()
public long getLastConnectionTestTime()
DataSourceImpl.getConnectionTestTimeout()
to implement an
efficient mechanism to ensure that a wrapped connection really
is open.public void setLastConnectionTestTime(long time)
DataSourceImpl.getConnectionTestTimeout()
to implement an
efficient mechanism to ensure that a wrapped connection really
is open.public void addError(Exception e)
public int getErrorCount()
public Connection getConnection()
setNeedsRollback()
must also be invoked.public Connection getBaseConnection()
setNeedsRollback()
must also be invoked.public int hashCode()
hashCode
in class Object
public boolean equals(Object other)
ConnectionWrapper
instances are equals if and
only if their embedded connections are equal or identical.equals
in class Object
public void setNeedsRollback()
boolean needsRollback()
void clearNeedsRollback()
public Statement createStatement() throws SQLException
createStatement
in interface Connection
public PreparedStatement prepareStatement(String sql) throws SQLException
prepareStatement
in interface Connection
public CallableStatement prepareCall(String str) throws SQLException
prepareCall
in interface Connection
public String nativeSQL(String str) throws SQLException
nativeSQL
in interface Connection
public void setAutoCommit(boolean bool) throws SQLException
setAutoCommit
in interface Connection
public boolean getAutoCommit() throws SQLException
getAutoCommit
in interface Connection
public void commit() throws SQLException
commit
in interface Connection
public void rollback() throws SQLException
rollback
in interface Connection
public void close() throws SQLException
close
in interface Connection
public boolean isClosed() throws SQLException
isClosed
in interface Connection
protected void checkClosed() throws SQLException
public DatabaseMetaData getMetaData() throws SQLException
getMetaData
in interface Connection
public void setReadOnly(boolean bool) throws SQLException
setReadOnly
in interface Connection
public boolean isReadOnly() throws SQLException
isReadOnly
in interface Connection
public void setCatalog(String str) throws SQLException
setCatalog
in interface Connection
public String getCatalog() throws SQLException
getCatalog
in interface Connection
public void setTransactionIsolation(int i) throws SQLException
setTransactionIsolation
in interface Connection
public int getTransactionIsolation() throws SQLException
getTransactionIsolation
in interface Connection
public SQLWarning getWarnings() throws SQLException
getWarnings
in interface Connection
public void clearWarnings() throws SQLException
clearWarnings
in interface Connection
public Statement createStatement(int type, int concurrency) throws SQLException
createStatement
in interface Connection
public PreparedStatement prepareStatement(String sql, int type, int concur) throws SQLException
prepareStatement
in interface Connection
public CallableStatement prepareCall(String str, int i1, int i2) throws SQLException
prepareCall
in interface Connection
public Map getTypeMap() throws SQLException
getTypeMap
in interface Connection
public void setTypeMap(Map map) throws SQLException
setTypeMap
in interface Connection
public void setHoldability(int holdability) throws SQLException
public int getHoldability() throws SQLException
public Savepoint setSavepoint() throws SQLException
public Savepoint setSavepoint(String savepoint) throws SQLException
public void rollback(Savepoint savepoint) throws SQLException
public void releaseSavepoint(Savepoint savepoint) throws SQLException
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
public int compareTo(Object other)
compareTo
in interface Comparable
public StringBuffer toString(StringBuffer buffer)
public String toString()
toString
in class Object
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |