Package org.apache.openjpa.lib.jdbc
Class LoggingConnectionDecorator.LoggingConnection.LoggingPreparedStatement
- java.lang.Object
-
- org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement
-
- org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.LoggingConnection.LoggingPreparedStatement
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.sql.PreparedStatement,java.sql.Statement,java.sql.Wrapper,Closeable
- Enclosing class:
- LoggingConnectionDecorator.LoggingConnection
protected class LoggingConnectionDecorator.LoggingConnection.LoggingPreparedStatement extends DelegatingPreparedStatement
-
-
Constructor Summary
Constructors Constructor Description LoggingPreparedStatement(java.sql.PreparedStatement stmnt, java.lang.String sql)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddBatch()protected voidappendInfo(java.lang.StringBuffer buf)voidcancel()voidclearParameters()booleanexecute()booleanexecute(java.lang.String sql)booleanexecute(java.lang.String s, int i)booleanexecute(java.lang.String s, int[] ia)booleanexecute(java.lang.String s, java.lang.String[] sa)int[]executeBatch()protected java.sql.ResultSetexecuteQuery(boolean wrap)Execute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.protected java.sql.ResultSetexecuteQuery(java.lang.String sql, boolean wrap)Execute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.intexecuteUpdate()intexecuteUpdate(java.lang.String sql)intexecuteUpdate(java.lang.String s, int i)intexecuteUpdate(java.lang.String s, int[] ia)intexecuteUpdate(java.lang.String s, java.lang.String[] sa)java.sql.ResultSetMetaDatagetMetaData()voidsetArray(int i, java.sql.Array a)voidsetAsciiStream(int i1, java.io.InputStream is, int i2)voidsetBigDecimal(int i, java.math.BigDecimal bd)voidsetBinaryStream(int i1, java.io.InputStream is)voidsetBinaryStream(int i1, java.io.InputStream is, int i2)voidsetBlob(int i, java.sql.Blob b)voidsetBoolean(int i, boolean b)voidsetByte(int i, byte b)voidsetBytes(int i, byte[] b)voidsetCharacterStream(int i1, java.io.Reader r, int i2)voidsetClob(int i, java.sql.Clob c)voidsetDate(int i, java.sql.Date d)voidsetDate(int i, java.sql.Date d, java.util.Calendar c)voidsetDouble(int i, double d)voidsetFloat(int i, float f)voidsetInt(int i1, int i2)voidsetLong(int i, long l)voidsetNull(int i1, int i2)voidsetNull(int i1, int i2, java.lang.String s)voidsetObject(int i, java.lang.Object o)voidsetObject(int i1, java.lang.Object o, int i2)voidsetObject(int i1, java.lang.Object o, int i2, int i3)voidsetRef(int i, java.sql.Ref r)voidsetShort(int i, short s)voidsetString(int i, java.lang.String s)voidsetTime(int i, java.sql.Time t)voidsetTime(int i, java.sql.Time t, java.util.Calendar c)voidsetTimestamp(int i, java.sql.Timestamp t)voidsetTimestamp(int i, java.sql.Timestamp t, java.util.Calendar c)voidsetUnicodeStream(int i1, java.io.InputStream is, int i2)Deprecated.voidsetURL(int i, java.net.URL u)protected java.sql.ResultSetwrapResult(java.sql.ResultSet rs, boolean wrap)-
Methods inherited from class org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement
addBatch, clearBatch, clearWarnings, close, closeOnCompletion, equals, executeQuery, executeQuery, getConnection, getDelegate, getFetchDirection, getFetchSize, getGeneratedKeys, getInnermostDelegate, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getParameterMetaData, getQueryTimeout, getResultSet, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, hashCode, initialize, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, setAsciiStream, setAsciiStream, setBinaryStream, setBlob, setBlob, setCharacterStream, setCharacterStream, setClob, setClob, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setPoolable, setQueryTimeout, setRowId, setSQLXML, toString, unwrap
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
wrapResult
protected java.sql.ResultSet wrapResult(java.sql.ResultSet rs, boolean wrap)- Overrides:
wrapResultin classDelegatingPreparedStatement
-
executeQuery
protected java.sql.ResultSet executeQuery(java.lang.String sql, boolean wrap) throws java.sql.SQLExceptionDescription copied from class:DelegatingPreparedStatementExecute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.- Overrides:
executeQueryin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.Statement- Overrides:
executeUpdatein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql) throws java.sql.SQLException- Specified by:
executein interfacejava.sql.Statement- Overrides:
executein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
executeQuery
protected java.sql.ResultSet executeQuery(boolean wrap) throws java.sql.SQLExceptionDescription copied from class:DelegatingPreparedStatementExecute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.- Overrides:
executeQueryin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate() throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.PreparedStatement- Overrides:
executeUpdatein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
executeBatch
public int[] executeBatch() throws java.sql.SQLException- Specified by:
executeBatchin interfacejava.sql.Statement- Overrides:
executeBatchin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
execute
public boolean execute() throws java.sql.SQLException- Specified by:
executein interfacejava.sql.PreparedStatement- Overrides:
executein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String s, int i) throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.Statement- Overrides:
executeUpdatein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String s, int[] ia) throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.Statement- Overrides:
executeUpdatein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String s, java.lang.String[] sa) throws java.sql.SQLException- Specified by:
executeUpdatein interfacejava.sql.Statement- Overrides:
executeUpdatein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String s, int i) throws java.sql.SQLException- Specified by:
executein interfacejava.sql.Statement- Overrides:
executein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String s, int[] ia) throws java.sql.SQLException- Specified by:
executein interfacejava.sql.Statement- Overrides:
executein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String s, java.lang.String[] sa) throws java.sql.SQLException- Specified by:
executein interfacejava.sql.Statement- Overrides:
executein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
cancel
public void cancel() throws java.sql.SQLException- Specified by:
cancelin interfacejava.sql.Statement- Overrides:
cancelin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setNull
public void setNull(int i1, int i2) throws java.sql.SQLException- Specified by:
setNullin interfacejava.sql.PreparedStatement- Overrides:
setNullin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setBoolean
public void setBoolean(int i, boolean b) throws java.sql.SQLException- Specified by:
setBooleanin interfacejava.sql.PreparedStatement- Overrides:
setBooleanin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setByte
public void setByte(int i, byte b) throws java.sql.SQLException- Specified by:
setBytein interfacejava.sql.PreparedStatement- Overrides:
setBytein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setShort
public void setShort(int i, short s) throws java.sql.SQLException- Specified by:
setShortin interfacejava.sql.PreparedStatement- Overrides:
setShortin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setInt
public void setInt(int i1, int i2) throws java.sql.SQLException- Specified by:
setIntin interfacejava.sql.PreparedStatement- Overrides:
setIntin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setLong
public void setLong(int i, long l) throws java.sql.SQLException- Specified by:
setLongin interfacejava.sql.PreparedStatement- Overrides:
setLongin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setFloat
public void setFloat(int i, float f) throws java.sql.SQLException- Specified by:
setFloatin interfacejava.sql.PreparedStatement- Overrides:
setFloatin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setDouble
public void setDouble(int i, double d) throws java.sql.SQLException- Specified by:
setDoublein interfacejava.sql.PreparedStatement- Overrides:
setDoublein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setBigDecimal
public void setBigDecimal(int i, java.math.BigDecimal bd) throws java.sql.SQLException- Specified by:
setBigDecimalin interfacejava.sql.PreparedStatement- Overrides:
setBigDecimalin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setString
public void setString(int i, java.lang.String s) throws java.sql.SQLException- Specified by:
setStringin interfacejava.sql.PreparedStatement- Overrides:
setStringin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setBytes
public void setBytes(int i, byte[] b) throws java.sql.SQLException- Specified by:
setBytesin interfacejava.sql.PreparedStatement- Overrides:
setBytesin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setDate
public void setDate(int i, java.sql.Date d) throws java.sql.SQLException- Specified by:
setDatein interfacejava.sql.PreparedStatement- Overrides:
setDatein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setTime
public void setTime(int i, java.sql.Time t) throws java.sql.SQLException- Specified by:
setTimein interfacejava.sql.PreparedStatement- Overrides:
setTimein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setTimestamp
public void setTimestamp(int i, java.sql.Timestamp t) throws java.sql.SQLException- Specified by:
setTimestampin interfacejava.sql.PreparedStatement- Overrides:
setTimestampin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setAsciiStream
public void setAsciiStream(int i1, java.io.InputStream is, int i2) throws java.sql.SQLException- Specified by:
setAsciiStreamin interfacejava.sql.PreparedStatement- Overrides:
setAsciiStreamin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setUnicodeStream
@Deprecated public void setUnicodeStream(int i1, java.io.InputStream is, int i2) throws java.sql.SQLExceptionDeprecated.- Specified by:
setUnicodeStreamin interfacejava.sql.PreparedStatement- Overrides:
setUnicodeStreamin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setBinaryStream
public void setBinaryStream(int i1, java.io.InputStream is, int i2) throws java.sql.SQLException- Specified by:
setBinaryStreamin interfacejava.sql.PreparedStatement- Overrides:
setBinaryStreamin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setBinaryStream
public void setBinaryStream(int i1, java.io.InputStream is) throws java.sql.SQLException- Specified by:
setBinaryStreamin interfacejava.sql.PreparedStatement- Overrides:
setBinaryStreamin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
clearParameters
public void clearParameters() throws java.sql.SQLException- Specified by:
clearParametersin interfacejava.sql.PreparedStatement- Overrides:
clearParametersin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setObject
public void setObject(int i1, java.lang.Object o, int i2, int i3) throws java.sql.SQLException- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Overrides:
setObjectin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setObject
public void setObject(int i1, java.lang.Object o, int i2) throws java.sql.SQLException- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Overrides:
setObjectin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setObject
public void setObject(int i, java.lang.Object o) throws java.sql.SQLException- Specified by:
setObjectin interfacejava.sql.PreparedStatement- Overrides:
setObjectin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
addBatch
public void addBatch() throws java.sql.SQLException- Specified by:
addBatchin interfacejava.sql.PreparedStatement- Overrides:
addBatchin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setCharacterStream
public void setCharacterStream(int i1, java.io.Reader r, int i2) throws java.sql.SQLException- Specified by:
setCharacterStreamin interfacejava.sql.PreparedStatement- Overrides:
setCharacterStreamin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setRef
public void setRef(int i, java.sql.Ref r) throws java.sql.SQLException- Specified by:
setRefin interfacejava.sql.PreparedStatement- Overrides:
setRefin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setBlob
public void setBlob(int i, java.sql.Blob b) throws java.sql.SQLException- Specified by:
setBlobin interfacejava.sql.PreparedStatement- Overrides:
setBlobin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setClob
public void setClob(int i, java.sql.Clob c) throws java.sql.SQLException- Specified by:
setClobin interfacejava.sql.PreparedStatement- Overrides:
setClobin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setArray
public void setArray(int i, java.sql.Array a) throws java.sql.SQLException- Specified by:
setArrayin interfacejava.sql.PreparedStatement- Overrides:
setArrayin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
getMetaData
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException- Specified by:
getMetaDatain interfacejava.sql.PreparedStatement- Overrides:
getMetaDatain classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setDate
public void setDate(int i, java.sql.Date d, java.util.Calendar c) throws java.sql.SQLException- Specified by:
setDatein interfacejava.sql.PreparedStatement- Overrides:
setDatein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setTime
public void setTime(int i, java.sql.Time t, java.util.Calendar c) throws java.sql.SQLException- Specified by:
setTimein interfacejava.sql.PreparedStatement- Overrides:
setTimein classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setTimestamp
public void setTimestamp(int i, java.sql.Timestamp t, java.util.Calendar c) throws java.sql.SQLException- Specified by:
setTimestampin interfacejava.sql.PreparedStatement- Overrides:
setTimestampin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setNull
public void setNull(int i1, int i2, java.lang.String s) throws java.sql.SQLException- Specified by:
setNullin interfacejava.sql.PreparedStatement- Overrides:
setNullin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
setURL
public void setURL(int i, java.net.URL u) throws java.sql.SQLException- Specified by:
setURLin interfacejava.sql.PreparedStatement- Overrides:
setURLin classDelegatingPreparedStatement- Throws:
java.sql.SQLException
-
appendInfo
protected void appendInfo(java.lang.StringBuffer buf)
- Overrides:
appendInfoin classDelegatingPreparedStatement
-
-