FileDocCategorySizeDatePackage
ConnectionWrapper30.javaAPI DocGlassfish v2 API10493Fri May 04 22:36:06 BST 2007com.sun.gjc.spi.jdbc30

ConnectionWrapper30

public class ConnectionWrapper30 extends ConnectionHolder30
Wrapper class that aids to provide wrapper for the following JDBC objects :
Statement, PreparedStatement, CallableStatement, DatabaseMetaData

Fields Summary
Constructors Summary
public ConnectionWrapper30(Connection con, com.sun.gjc.spi.ManagedConnection mc, javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
Instantiates connection wrapper to wrap JDBC objects.

param
con Connection that is wrapped
param
mc Managed Connection
param
cxRequestInfo Connection Request Info

        super(con, mc, cxRequestInfo);
    
Methods Summary
public java.sql.StatementcreateStatement()
Creates a statement from the underlying Connection

return
Statement object.
throws
java.sql.SQLException In case of a database error.

        return new StatementWrapper30(this, super.createStatement());
    
public java.sql.StatementcreateStatement(int resultSetType, int resultSetConcurrency)
Creates a statement from the underlying Connection.

param
resultSetType Type of the ResultSet
param
resultSetConcurrency ResultSet Concurrency.
return
Statement object.
throws
SQLException In case of a database error.

        return new StatementWrapper30(this, super.createStatement(resultSetType,
                resultSetConcurrency));
    
public java.sql.StatementcreateStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
Creates a statement from the underlying Connection.

param
resultSetType Type of the ResultSet
param
resultSetConcurrency ResultSet Concurrency.
param
resultSetHoldability ResultSet Holdability.
return
Statement object.
throws
SQLException In case of a database error.

        return new StatementWrapper30(this, super.createStatement(resultSetType,
                resultSetConcurrency, resultSetHoldability));
    
public java.sql.DatabaseMetaDatagetMetaData()
Retrieves the DatabaseMetaDataobject from the underlying Connection object.

return
DatabaseMetaData object.
throws
SQLException In case of a database error.

        return new DatabaseMetaDataWrapper30(this, super.getMetaData());
    
public java.sql.CallableStatementprepareCall(java.lang.String sql)
Creates a CallableStatement object for calling database stored procedures.

param
sql SQL Statement
return
CallableStatement object.
throws
java.sql.SQLException In case of a database error.

        return new CallableStatementWrapper30(this, super.prepareCall(sql));
    
public java.sql.CallableStatementprepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency)
Creates a CallableStatement object for calling database stored procedures.

param
sql SQL Statement
param
resultSetType Type of the ResultSet
param
resultSetConcurrency ResultSet Concurrency.
return
CallableStatement object.
throws
SQLException In case of a database error.

        return new CallableStatementWrapper30(this, super.prepareCall(sql,
                resultSetType, resultSetConcurrency));
    
public java.sql.CallableStatementprepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
Creates a CallableStatement object for calling database stored procedures.

param
sql SQL Statement
param
resultSetType Type of the ResultSet
param
resultSetConcurrency ResultSet Concurrency.
param
resultSetHoldability ResultSet Holdability.
return
CallableStatement object.
throws
SQLException In case of a database error.

        return new CallableStatementWrapper30(this, super.prepareCall(sql,
                resultSetType, resultSetConcurrency, resultSetHoldability));
    
public java.sql.PreparedStatementprepareStatement(java.lang.String sql, int autoGeneratedKeys)
Creates a PreparedStatement object for sending paramterized SQL statements to database

param
sql SQL Statement
param
autoGeneratedKeys a flag indicating AutoGeneratedKeys need to be returned.
return
PreparedStatement object.
throws
SQLException In case of a database error.

        return new PreparedStatementWrapper30(this, super.prepareStatement(sql, autoGeneratedKeys));
    
public java.sql.PreparedStatementprepareStatement(java.lang.String sql, int[] columnIndexes)
Creates a PreparedStatement object for sending paramterized SQL statements to database

param
sql SQL Statement
param
columnIndexes an array of column indexes indicating the columns that should be returned from the inserted row or rows.
return
PreparedStatement object.
throws
SQLException In case of a database error.

        return new PreparedStatementWrapper30(this, super.prepareStatement(sql,
                columnIndexes));
    
public java.sql.PreparedStatementprepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency)
Creates a PreparedStatement object for sending paramterized SQL statements to database

param
sql SQL Statement
param
resultSetType Type of the ResultSet
param
resultSetConcurrency ResultSet Concurrency.
return
PreparedStatement object.
throws
SQLException In case of a database error.

        return new PreparedStatementWrapper30(this, super.prepareStatement(sql,
                resultSetType, resultSetConcurrency));
    
public java.sql.PreparedStatementprepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
Creates a PreparedStatement object for sending paramterized SQL statements to database

param
sql SQL Statement
param
resultSetType Type of the ResultSet
param
resultSetConcurrency ResultSet Concurrency.
param
resultSetHoldability ResultSet Holdability.
return
PreparedStatement object.
throws
SQLException In case of a database error.

        return new PreparedStatementWrapper30(this, super.prepareStatement(sql,
                resultSetType, resultSetConcurrency, resultSetHoldability));
    
public java.sql.PreparedStatementprepareStatement(java.lang.String sql, java.lang.String[] columnNames)
Creates a PreparedStatement object for sending paramterized SQL statements to database

param
sql SQL Statement
param
columnNames Name of bound columns.
return
PreparedStatement object.
throws
SQLException In case of a database error.

        return new PreparedStatementWrapper30(this, super.prepareStatement(sql,
                columnNames));
    
public java.sql.PreparedStatementprepareStatement(java.lang.String sql)
Creates a PreparedStatement object for sending paramterized SQL statements to database

param
sql SQL Statement
return
PreparedStatement object.
throws
SQLException In case of a database error.

        return new PreparedStatementWrapper30(this, super.prepareStatement(sql));