org.apache.openjpa.lib.jdbc
Class LoggingConnectionDecorator.LoggingConnection.LoggingCallableStatement

java.lang.Object
  extended by org.apache.openjpa.lib.jdbc.DelegatingCallableStatement
      extended by org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection.LoggingCallableStatement
All Implemented Interfaces:
CallableStatement, PreparedStatement, Statement, Wrapper, Closeable
Enclosing class:
LoggingConnectionDecorator.LoggingConnection

protected abstract class LoggingConnectionDecorator.LoggingConnection.LoggingCallableStatement
extends DelegatingCallableStatement

CallableStatement decorated with logging. Similar to LoggingConnectionDecorator.LoggingConnection.LoggingPreparedStatement but can not be extended due to the existing delegation hierarchy.


Field Summary
(package private)  int batchedRowsBaseIndex
           
 
Fields inherited from class org.apache.openjpa.lib.jdbc.DelegatingCallableStatement
concreteImpl
 
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
 
Constructor Summary
LoggingConnectionDecorator.LoggingConnection.LoggingCallableStatement(CallableStatement stmt, String sql)
           
 
Method Summary
 void addBatch()
           
protected  void appendInfo(StringBuffer buf)
           
 void cancel()
           
protected  void clearLogParameters(boolean batch)
           
 void clearParameters()
           
 boolean execute()
           
 boolean execute(String sql)
           
 int[] executeBatch()
           
protected  ResultSet executeQuery(boolean wrap)
          Execute the query, with the option of not wrapping it in a DelegatingResultSet, which is the default.
protected  ResultSet executeQuery(String sql, boolean wrap)
          Execute the query, with the option of not wrapping it in a DelegatingResultSet, which is the default.
 int executeUpdate()
           
 int executeUpdate(String sql)
           
 ResultSetMetaData getMetaData()
           
 void setArray(int i, Array a)
           
 void setAsciiStream(int i1, InputStream is, int i2)
           
 void setBigDecimal(int i, BigDecimal bd)
           
 void setBinaryStream(int i1, InputStream is, int i2)
           
 void setBlob(int i, Blob b)
           
 void setBoolean(int i, boolean b)
           
 void setByte(int i, byte b)
           
 void setBytes(int i, byte[] b)
           
 void setCharacterStream(int i1, Reader r, int i2)
           
 void setClob(int i, Clob c)
           
 void setDate(int i, Date d)
           
 void setDate(int i, Date d, Calendar c)
           
 void setDouble(int i, double d)
           
 void setFloat(int i, float f)
           
 void setInt(int i1, int i2)
           
 void setLong(int i, long l)
           
 void setNull(int i1, int i2)
           
 void setNull(int i1, int i2, String s)
           
 void setObject(int i, Object o)
           
 void setObject(int i1, Object o, int i2)
           
 void setObject(int i1, Object o, int i2, int i3)
           
 void setRef(int i, Ref r)
           
 void setShort(int i, short s)
           
 void setString(int i, String s)
           
 void setTime(int i, Time t)
           
 void setTime(int i, Time t, Calendar c)
           
 void setTimestamp(int i, Timestamp t)
           
 void setTimestamp(int i, Timestamp t, Calendar c)
           
 void setUnicodeStream(int i1, InputStream is, int i2)
          Deprecated. 
protected  ResultSet wrapResult(ResultSet rs, boolean wrap)
           
 
Methods inherited from class org.apache.openjpa.lib.jdbc.DelegatingCallableStatement
addBatch, clearBatch, clearWarnings, close, equals, execute, execute, execute, executeQuery, executeQuery, executeUpdate, executeUpdate, executeUpdate, getArray, getArray, getBigDecimal, getBigDecimal, getBigDecimal, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getClob, getClob, getConnection, getDate, getDate, getDate, getDate, getDelegate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getGeneratedKeys, getInnermostDelegate, getInt, getInt, getLong, getLong, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getObject, getObject, getObject, getObject, getParameterMetaData, getQueryTimeout, getRef, getRef, getResultSet, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getShort, getShort, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getUpdateCount, getURL, getURL, getWarnings, hashCode, isWrapperFor, newInstance, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, setAsciiStream, setBigDecimal, setBinaryStream, setBoolean, setByte, setBytes, setCharacterStream, setCursorName, setDate, setDate, setDouble, setEscapeProcessing, setFetchDirection, setFetchSize, setFloat, setInt, setLong, setMaxFieldSize, setMaxRows, setNull, setNull, setObject, setObject, setObject, setQueryTimeout, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setURL, setURL, toString, unwrap, wasNull, wrapResult
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.sql.CallableStatement
getCharacterStream, getCharacterStream, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getRowId, getRowId, getSQLXML, getSQLXML, setAsciiStream, setAsciiStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setRowId, setSQLXML
 
Methods inherited from interface java.sql.PreparedStatement
setAsciiStream, setAsciiStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setCharacterStream, setCharacterStream, setClob, setClob, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setRowId, setSQLXML
 
Methods inherited from interface java.sql.Statement
isClosed, isPoolable, setPoolable
 

Field Detail

batchedRowsBaseIndex

int batchedRowsBaseIndex
Constructor Detail

LoggingConnectionDecorator.LoggingConnection.LoggingCallableStatement

public LoggingConnectionDecorator.LoggingConnection.LoggingCallableStatement(CallableStatement stmt,
                                                                             String sql)
                                                                      throws SQLException
Throws:
SQLException
Method Detail

wrapResult

protected ResultSet wrapResult(ResultSet rs,
                               boolean wrap)

executeQuery

protected ResultSet executeQuery(String sql,
                                 boolean wrap)
                          throws SQLException
Description copied from class: DelegatingCallableStatement
Execute the query, with the option of not wrapping it in a DelegatingResultSet, which is the default.

Overrides:
executeQuery in class DelegatingCallableStatement
Throws:
SQLException

executeUpdate

public int executeUpdate(String sql)
                  throws SQLException
Specified by:
executeUpdate in interface Statement
Overrides:
executeUpdate in class DelegatingCallableStatement
Throws:
SQLException

execute

public boolean execute(String sql)
                throws SQLException
Specified by:
execute in interface Statement
Overrides:
execute in class DelegatingCallableStatement
Throws:
SQLException

executeQuery

protected ResultSet executeQuery(boolean wrap)
                          throws SQLException
Description copied from class: DelegatingCallableStatement
Execute the query, with the option of not wrapping it in a DelegatingResultSet, which is the default.

Overrides:
executeQuery in class DelegatingCallableStatement
Throws:
SQLException

executeUpdate

public int executeUpdate()
                  throws SQLException
Specified by:
executeUpdate in interface PreparedStatement
Overrides:
executeUpdate in class DelegatingCallableStatement
Throws:
SQLException

executeBatch

public int[] executeBatch()
                   throws SQLException
Specified by:
executeBatch in interface Statement
Overrides:
executeBatch in class DelegatingCallableStatement
Throws:
SQLException

execute

public boolean execute()
                throws SQLException
Specified by:
execute in interface PreparedStatement
Overrides:
execute in class DelegatingCallableStatement
Throws:
SQLException

cancel

public void cancel()
            throws SQLException
Specified by:
cancel in interface Statement
Overrides:
cancel in class DelegatingCallableStatement
Throws:
SQLException

setNull

public void setNull(int i1,
                    int i2)
             throws SQLException
Specified by:
setNull in interface PreparedStatement
Overrides:
setNull in class DelegatingCallableStatement
Throws:
SQLException

setBoolean

public void setBoolean(int i,
                       boolean b)
                throws SQLException
Specified by:
setBoolean in interface PreparedStatement
Overrides:
setBoolean in class DelegatingCallableStatement
Throws:
SQLException

setByte

public void setByte(int i,
                    byte b)
             throws SQLException
Specified by:
setByte in interface PreparedStatement
Overrides:
setByte in class DelegatingCallableStatement
Throws:
SQLException

setShort

public void setShort(int i,
                     short s)
              throws SQLException
Specified by:
setShort in interface PreparedStatement
Overrides:
setShort in class DelegatingCallableStatement
Throws:
SQLException

setInt

public void setInt(int i1,
                   int i2)
            throws SQLException
Specified by:
setInt in interface PreparedStatement
Overrides:
setInt in class DelegatingCallableStatement
Throws:
SQLException

setLong

public void setLong(int i,
                    long l)
             throws SQLException
Specified by:
setLong in interface PreparedStatement
Overrides:
setLong in class DelegatingCallableStatement
Throws:
SQLException

setFloat

public void setFloat(int i,
                     float f)
              throws SQLException
Specified by:
setFloat in interface PreparedStatement
Overrides:
setFloat in class DelegatingCallableStatement
Throws:
SQLException

setDouble

public void setDouble(int i,
                      double d)
               throws SQLException
Specified by:
setDouble in interface PreparedStatement
Overrides:
setDouble in class DelegatingCallableStatement
Throws:
SQLException

setBigDecimal

public void setBigDecimal(int i,
                          BigDecimal bd)
                   throws SQLException
Specified by:
setBigDecimal in interface PreparedStatement
Overrides:
setBigDecimal in class DelegatingCallableStatement
Throws:
SQLException

setString

public void setString(int i,
                      String s)
               throws SQLException
Specified by:
setString in interface PreparedStatement
Overrides:
setString in class DelegatingCallableStatement
Throws:
SQLException

setBytes

public void setBytes(int i,
                     byte[] b)
              throws SQLException
Specified by:
setBytes in interface PreparedStatement
Overrides:
setBytes in class DelegatingCallableStatement
Throws:
SQLException

setDate

public void setDate(int i,
                    Date d)
             throws SQLException
Specified by:
setDate in interface PreparedStatement
Overrides:
setDate in class DelegatingCallableStatement
Throws:
SQLException

setTime

public void setTime(int i,
                    Time t)
             throws SQLException
Specified by:
setTime in interface PreparedStatement
Overrides:
setTime in class DelegatingCallableStatement
Throws:
SQLException

setTimestamp

public void setTimestamp(int i,
                         Timestamp t)
                  throws SQLException
Specified by:
setTimestamp in interface PreparedStatement
Overrides:
setTimestamp in class DelegatingCallableStatement
Throws:
SQLException

setAsciiStream

public void setAsciiStream(int i1,
                           InputStream is,
                           int i2)
                    throws SQLException
Specified by:
setAsciiStream in interface PreparedStatement
Overrides:
setAsciiStream in class DelegatingCallableStatement
Throws:
SQLException

setUnicodeStream

@Deprecated
public void setUnicodeStream(int i1,
                                        InputStream is,
                                        int i2)
                      throws SQLException
Deprecated. 

Specified by:
setUnicodeStream in interface PreparedStatement
Overrides:
setUnicodeStream in class DelegatingCallableStatement
Throws:
SQLException

setBinaryStream

public void setBinaryStream(int i1,
                            InputStream is,
                            int i2)
                     throws SQLException
Specified by:
setBinaryStream in interface PreparedStatement
Overrides:
setBinaryStream in class DelegatingCallableStatement
Throws:
SQLException

clearParameters

public void clearParameters()
                     throws SQLException
Specified by:
clearParameters in interface PreparedStatement
Overrides:
clearParameters in class DelegatingCallableStatement
Throws:
SQLException

setObject

public void setObject(int i1,
                      Object o,
                      int i2,
                      int i3)
               throws SQLException
Specified by:
setObject in interface PreparedStatement
Overrides:
setObject in class DelegatingCallableStatement
Throws:
SQLException

setObject

public void setObject(int i1,
                      Object o,
                      int i2)
               throws SQLException
Specified by:
setObject in interface PreparedStatement
Overrides:
setObject in class DelegatingCallableStatement
Throws:
SQLException

setObject

public void setObject(int i,
                      Object o)
               throws SQLException
Specified by:
setObject in interface PreparedStatement
Overrides:
setObject in class DelegatingCallableStatement
Throws:
SQLException

addBatch

public void addBatch()
              throws SQLException
Specified by:
addBatch in interface PreparedStatement
Overrides:
addBatch in class DelegatingCallableStatement
Throws:
SQLException

setCharacterStream

public void setCharacterStream(int i1,
                               Reader r,
                               int i2)
                        throws SQLException
Specified by:
setCharacterStream in interface PreparedStatement
Overrides:
setCharacterStream in class DelegatingCallableStatement
Throws:
SQLException

setRef

public void setRef(int i,
                   Ref r)
            throws SQLException
Specified by:
setRef in interface PreparedStatement
Overrides:
setRef in class DelegatingCallableStatement
Throws:
SQLException

setBlob

public void setBlob(int i,
                    Blob b)
             throws SQLException
Specified by:
setBlob in interface PreparedStatement
Overrides:
setBlob in class DelegatingCallableStatement
Throws:
SQLException

setClob

public void setClob(int i,
                    Clob c)
             throws SQLException
Specified by:
setClob in interface PreparedStatement
Overrides:
setClob in class DelegatingCallableStatement
Throws:
SQLException

setArray

public void setArray(int i,
                     Array a)
              throws SQLException
Specified by:
setArray in interface PreparedStatement
Overrides:
setArray in class DelegatingCallableStatement
Throws:
SQLException

getMetaData

public ResultSetMetaData getMetaData()
                              throws SQLException
Specified by:
getMetaData in interface PreparedStatement
Overrides:
getMetaData in class DelegatingCallableStatement
Throws:
SQLException

setDate

public void setDate(int i,
                    Date d,
                    Calendar c)
             throws SQLException
Specified by:
setDate in interface PreparedStatement
Overrides:
setDate in class DelegatingCallableStatement
Throws:
SQLException

setTime

public void setTime(int i,
                    Time t,
                    Calendar c)
             throws SQLException
Specified by:
setTime in interface PreparedStatement
Overrides:
setTime in class DelegatingCallableStatement
Throws:
SQLException

setTimestamp

public void setTimestamp(int i,
                         Timestamp t,
                         Calendar c)
                  throws SQLException
Specified by:
setTimestamp in interface PreparedStatement
Overrides:
setTimestamp in class DelegatingCallableStatement
Throws:
SQLException

setNull

public void setNull(int i1,
                    int i2,
                    String s)
             throws SQLException
Specified by:
setNull in interface PreparedStatement
Overrides:
setNull in class DelegatingCallableStatement
Throws:
SQLException

appendInfo

protected void appendInfo(StringBuffer buf)
Overrides:
appendInfo in class DelegatingCallableStatement

clearLogParameters

protected void clearLogParameters(boolean batch)


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.