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

CallableStatementWrapper30

public class CallableStatementWrapper30 extends com.sun.gjc.spi.base.CallableStatementWrapper
Wrapper for JDBC 3.0 CallableStatement

Fields Summary
Constructors Summary
public CallableStatementWrapper30(Connection con, CallableStatement statement)
Creates a new instance of CallableStatement wrapper for JDBC 3.0

param
con ConnectionWrapper
param
statement CallableStatement that is wrapped

        super(con, statement);
    
Methods Summary
public java.sql.ResultSetexecuteQuery()
Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.

return
a ResultSet object that contains the data produced by the query; never null
throws
java.sql.SQLException if a database access error occurs or the SQL statement does not return a ResultSet object

        ResultSet rs = callableStatement.executeQuery();
        if (rs == null)
            return null;
        return new ResultSetWrapper30(this, rs);
    
public java.sql.ResultSetexecuteQuery(java.lang.String sql)
Executes the given SQL statement, which returns a single ResultSet object.

param
sql an SQL statement to be sent to the database, typically a static SQL SELECT statement
return
a ResultSet object that contains the data produced by the given query; never null
exception
SQLException if a database access error occurs or the given SQL statement produces anything other than a single ResultSet object

        ResultSet rs = callableStatement.executeQuery(sql);
        if (rs == null)
            return null;
        return new ResultSetWrapper30(this, rs);
    
public java.sql.ResultSetgetGeneratedKeys()
Retrieves any auto-generated keys created as a result of executing this Statement object. If this Statement object did not generate any keys, an empty ResultSet object is returned.

return
a ResultSet object containing the auto-generated key(s) generated by the execution of this Statement object
exception
SQLException if a database access error occurs
since
1.4

        ResultSet rs = callableStatement.getGeneratedKeys();
        if (rs == null)
            return null;
        return new ResultSetWrapper30(this, rs);
    
public java.sql.ResultSetgetResultSet()
Retrieves the current result as a ResultSet object. This method should be called only once per result.

return
the current result as a ResultSet object or null if the result is an update count or there are no more results
exception
SQLException if a database access error occurs
see
#execute

        ResultSet rs = callableStatement.getResultSet();
        if (rs == null)
            return null;
        return new ResultSetWrapper30(this, rs);