com.p6spy.engine.spy

Class P6Connection

Implemented Interfaces:
Connection
Known Direct Subclasses:
P6LogConnection, P6OutageConnection

public class P6Connection
extends P6Base
implements Connection

Description: Wrapper class for Connection $Author: cheechq $ $Revision: 1.4 $ $Date: 2003/06/03 19:20:25 $ $Id: P6Connection.java,v 1.4 2003/06/03 19:20:25 cheechq Exp $ $Log: P6Connection.java,v $ Revision 1.4 2003/06/03 19:20:25 cheechq removed unused imports Revision 1.3 2003/01/03 20:33:42 aarvesen Added getJDBC() method to return the underlying jdbc object. Revision 1.2 2002/12/06 22:40:50 aarvesen Extend P6Base. New factory registration in the constructor. Some jdk 1.4. hacks Revision 1.1 2002/05/24 07:31:13 jeffgoke version 1 rewrite Revision 1.7 2002/05/18 06:39:52 jeffgoke Peter Laird added Outage detection. Added junit tests for outage detection. Fixed multi-driver tests. Revision 1.6 2002/05/16 04:58:40 jeffgoke Viktor Szathmary added multi-driver support. Rewrote P6SpyOptions to be easier to manage. Fixed several bugs. Revision 1.5 2002/04/27 20:24:01 jeffgoke added logging of commit statements and rollback statements Revision 1.4 2002/04/11 04:18:03 jeffgoke fixed bug where callable & prepared were not passing their ancestors the correct constructor information Revision 1.3 2002/04/10 04:24:26 jeffgoke added support for callable statements and fixed numerous bugs that allowed the real class to be returned Revision 1.2 2002/04/07 20:43:59 jeffgoke fixed bug that caused null connection to return an empty connection instead of null. added an option allowing the user to truncate. added a release target to the build to create the release files. Revision 1.1.1.1 2002/04/07 04:52:25 jeffgoke no message Revision 1.2 2001-08-02 07:52:43-05 andy <> Revision 1.1 2001-07-30 23:03:31-05 andy <> Revision 1.0 2001-07-30 17:46:22-05 andy Initial revision

Field Summary

protected static int
counter
protected int
id
protected Connection
passthru

Fields inherited from class com.p6spy.engine.spy.P6Base

factory

Constructor Summary

P6Connection(P6Factory factory, Connection conn)

Method Summary

void
clearWarnings()
void
close()
void
commit()
Statement
createStatement()
Statement
createStatement(int p0, int p1)
Statement
createStatement(int p0, int p1, int p2)
boolean
getAutoCommit()
String
getCatalog()
int
getHoldability()
int
getId()
Connection
getJDBC()
Returns the underlying JDBC object (in this case, a java.sql.Connection)
DatabaseMetaData
getMetaData()
int
getTransactionIsolation()
Map
getTypeMap()
SQLWarning
getWarnings()
boolean
isClosed()
boolean
isReadOnly()
String
nativeSQL(String p0)
CallableStatement
prepareCall(String p0)
CallableStatement
prepareCall(String p0, int p1, int p2)
CallableStatement
prepareCall(String p0, int p1, int p2, int p3)
PreparedStatement
prepareStatement(String p0)
PreparedStatement
prepareStatement(String p0, int p1)
PreparedStatement
prepareStatement(String p0, int p1, int p2)
PreparedStatement
prepareStatement(String p0, int p1, int p2, int p3)
PreparedStatement
prepareStatement(String p0, p1[] )
PreparedStatement
prepareStatement(String p0, p1[] )
void
releaseSavepoint(Savepoint p0)
void
rollback()
void
rollback(Savepoint p0)
void
setAutoCommit(boolean p0)
void
setCatalog(String p0)
void
setHoldability(int p0)
void
setReadOnly(boolean p0)
Savepoint
setSavepoint()
Savepoint
setSavepoint(String p0)
void
setTransactionIsolation(int p0)
void
setTypeMap(Map p0)

Methods inherited from class com.p6spy.engine.spy.P6Base

getP6Factory, setP6Factory

Field Details

counter

protected static int counter


id

protected int id


passthru

protected Connection passthru

Constructor Details

P6Connection

public P6Connection(P6Factory factory,
                    Connection conn)
            throws SQLException

Method Details

clearWarnings

public void clearWarnings()
            throws SQLException


close

public void close()
            throws SQLException


commit

public void commit()
            throws SQLException


createStatement

public Statement createStatement()
            throws SQLException


createStatement

public Statement createStatement(int p0,
                                 int p1)
            throws SQLException


createStatement

public Statement createStatement(int p0,
                                 int p1,
                                 int p2)
            throws SQLException


getAutoCommit

public boolean getAutoCommit()
            throws SQLException


getCatalog

public String getCatalog()
            throws SQLException


getHoldability

public int getHoldability()
            throws SQLException


getId

public int getId()


getJDBC

public Connection getJDBC()
Returns the underlying JDBC object (in this case, a java.sql.Connection)

Returns:
the wrapped JDBC object


getMetaData

public DatabaseMetaData getMetaData()
            throws SQLException


getTransactionIsolation

public int getTransactionIsolation()
            throws SQLException


getTypeMap

public Map getTypeMap()
            throws SQLException


getWarnings

public SQLWarning getWarnings()
            throws SQLException


isClosed

public boolean isClosed()
            throws SQLException


isReadOnly

public boolean isReadOnly()
            throws SQLException


nativeSQL

public String nativeSQL(String p0)
            throws SQLException


prepareCall

public CallableStatement prepareCall(String p0)
            throws SQLException


prepareCall

public CallableStatement prepareCall(String p0,
                                     int p1,
                                     int p2)
            throws SQLException


prepareCall

public CallableStatement prepareCall(String p0,
                                     int p1,
                                     int p2,
                                     int p3)
            throws SQLException


prepareStatement

public PreparedStatement prepareStatement(String p0)
            throws SQLException


prepareStatement

public PreparedStatement prepareStatement(String p0,
                                          int p1)
            throws SQLException


prepareStatement

public PreparedStatement prepareStatement(String p0,
                                          int p1,
                                          int p2)
            throws SQLException


prepareStatement

public PreparedStatement prepareStatement(String p0,
                                          int p1,
                                          int p2,
                                          int p3)
            throws SQLException


prepareStatement

public PreparedStatement prepareStatement(String p0,
                                          p1[] )
            throws SQLException


prepareStatement

public PreparedStatement prepareStatement(String p0,
                                          p1[] )
            throws SQLException


releaseSavepoint

public void releaseSavepoint(Savepoint p0)
            throws SQLException


rollback

public void rollback()
            throws SQLException


rollback

public void rollback(Savepoint p0)
            throws SQLException


setAutoCommit

public void setAutoCommit(boolean p0)
            throws SQLException


setCatalog

public void setCatalog(String p0)
            throws SQLException


setHoldability

public void setHoldability(int p0)
            throws SQLException


setReadOnly

public void setReadOnly(boolean p0)
            throws SQLException


setSavepoint

public Savepoint setSavepoint()
            throws SQLException


setSavepoint

public Savepoint setSavepoint(String p0)
            throws SQLException


setTransactionIsolation

public void setTransactionIsolation(int p0)
            throws SQLException


setTypeMap

public void setTypeMap(Map p0)
            throws SQLException