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 void
addBatch()
protected void
appendInfo(java.lang.StringBuffer buf)
void
cancel()
void
clearParameters()
boolean
execute()
boolean
execute(java.lang.String sql)
boolean
execute(java.lang.String s, int i)
boolean
execute(java.lang.String s, int[] ia)
boolean
execute(java.lang.String s, java.lang.String[] sa)
int[]
executeBatch()
protected java.sql.ResultSet
executeQuery(boolean wrap)
Execute the query, with the option of not wrapping it in aDelegatingResultSet
, which is the default.protected java.sql.ResultSet
executeQuery(java.lang.String sql, boolean wrap)
Execute the query, with the option of not wrapping it in aDelegatingResultSet
, which is the default.int
executeUpdate()
int
executeUpdate(java.lang.String sql)
int
executeUpdate(java.lang.String s, int i)
int
executeUpdate(java.lang.String s, int[] ia)
int
executeUpdate(java.lang.String s, java.lang.String[] sa)
java.sql.ResultSetMetaData
getMetaData()
void
setArray(int i, java.sql.Array a)
void
setAsciiStream(int i1, java.io.InputStream is, int i2)
void
setBigDecimal(int i, java.math.BigDecimal bd)
void
setBinaryStream(int i1, java.io.InputStream is)
void
setBinaryStream(int i1, java.io.InputStream is, int i2)
void
setBlob(int i, java.sql.Blob b)
void
setBoolean(int i, boolean b)
void
setByte(int i, byte b)
void
setBytes(int i, byte[] b)
void
setCharacterStream(int i1, java.io.Reader r, int i2)
void
setClob(int i, java.sql.Clob c)
void
setDate(int i, java.sql.Date d)
void
setDate(int i, java.sql.Date d, java.util.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, java.lang.String s)
void
setObject(int i, java.lang.Object o)
void
setObject(int i1, java.lang.Object o, int i2)
void
setObject(int i1, java.lang.Object o, int i2, int i3)
void
setRef(int i, java.sql.Ref r)
void
setShort(int i, short s)
void
setString(int i, java.lang.String s)
void
setTime(int i, java.sql.Time t)
void
setTime(int i, java.sql.Time t, java.util.Calendar c)
void
setTimestamp(int i, java.sql.Timestamp t)
void
setTimestamp(int i, java.sql.Timestamp t, java.util.Calendar c)
void
setUnicodeStream(int i1, java.io.InputStream is, int i2)
Deprecated.void
setURL(int i, java.net.URL u)
protected java.sql.ResultSet
wrapResult(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:
wrapResult
in classDelegatingPreparedStatement
-
executeQuery
protected java.sql.ResultSet executeQuery(java.lang.String sql, boolean wrap) throws java.sql.SQLException
Description copied from class:DelegatingPreparedStatement
Execute the query, with the option of not wrapping it in aDelegatingResultSet
, which is the default.- Overrides:
executeQuery
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Overrides:
executeUpdate
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql) throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.Statement
- Overrides:
execute
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
executeQuery
protected java.sql.ResultSet executeQuery(boolean wrap) throws java.sql.SQLException
Description copied from class:DelegatingPreparedStatement
Execute the query, with the option of not wrapping it in aDelegatingResultSet
, which is the default.- Overrides:
executeQuery
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate() throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.PreparedStatement
- Overrides:
executeUpdate
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
executeBatch
public int[] executeBatch() throws java.sql.SQLException
- Specified by:
executeBatch
in interfacejava.sql.Statement
- Overrides:
executeBatch
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
execute
public boolean execute() throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.PreparedStatement
- Overrides:
execute
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String s, int i) throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Overrides:
executeUpdate
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String s, int[] ia) throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Overrides:
executeUpdate
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String s, java.lang.String[] sa) throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Overrides:
executeUpdate
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String s, int i) throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.Statement
- Overrides:
execute
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String s, int[] ia) throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.Statement
- Overrides:
execute
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String s, java.lang.String[] sa) throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.Statement
- Overrides:
execute
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
cancel
public void cancel() throws java.sql.SQLException
- Specified by:
cancel
in interfacejava.sql.Statement
- Overrides:
cancel
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setNull
public void setNull(int i1, int i2) throws java.sql.SQLException
- Specified by:
setNull
in interfacejava.sql.PreparedStatement
- Overrides:
setNull
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setBoolean
public void setBoolean(int i, boolean b) throws java.sql.SQLException
- Specified by:
setBoolean
in interfacejava.sql.PreparedStatement
- Overrides:
setBoolean
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setByte
public void setByte(int i, byte b) throws java.sql.SQLException
- Specified by:
setByte
in interfacejava.sql.PreparedStatement
- Overrides:
setByte
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setShort
public void setShort(int i, short s) throws java.sql.SQLException
- Specified by:
setShort
in interfacejava.sql.PreparedStatement
- Overrides:
setShort
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setInt
public void setInt(int i1, int i2) throws java.sql.SQLException
- Specified by:
setInt
in interfacejava.sql.PreparedStatement
- Overrides:
setInt
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setLong
public void setLong(int i, long l) throws java.sql.SQLException
- Specified by:
setLong
in interfacejava.sql.PreparedStatement
- Overrides:
setLong
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setFloat
public void setFloat(int i, float f) throws java.sql.SQLException
- Specified by:
setFloat
in interfacejava.sql.PreparedStatement
- Overrides:
setFloat
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setDouble
public void setDouble(int i, double d) throws java.sql.SQLException
- Specified by:
setDouble
in interfacejava.sql.PreparedStatement
- Overrides:
setDouble
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setBigDecimal
public void setBigDecimal(int i, java.math.BigDecimal bd) throws java.sql.SQLException
- Specified by:
setBigDecimal
in interfacejava.sql.PreparedStatement
- Overrides:
setBigDecimal
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setString
public void setString(int i, java.lang.String s) throws java.sql.SQLException
- Specified by:
setString
in interfacejava.sql.PreparedStatement
- Overrides:
setString
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setBytes
public void setBytes(int i, byte[] b) throws java.sql.SQLException
- Specified by:
setBytes
in interfacejava.sql.PreparedStatement
- Overrides:
setBytes
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setDate
public void setDate(int i, java.sql.Date d) throws java.sql.SQLException
- Specified by:
setDate
in interfacejava.sql.PreparedStatement
- Overrides:
setDate
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setTime
public void setTime(int i, java.sql.Time t) throws java.sql.SQLException
- Specified by:
setTime
in interfacejava.sql.PreparedStatement
- Overrides:
setTime
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setTimestamp
public void setTimestamp(int i, java.sql.Timestamp t) throws java.sql.SQLException
- Specified by:
setTimestamp
in interfacejava.sql.PreparedStatement
- Overrides:
setTimestamp
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setAsciiStream
public void setAsciiStream(int i1, java.io.InputStream is, int i2) throws java.sql.SQLException
- Specified by:
setAsciiStream
in interfacejava.sql.PreparedStatement
- Overrides:
setAsciiStream
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setUnicodeStream
@Deprecated public void setUnicodeStream(int i1, java.io.InputStream is, int i2) throws java.sql.SQLException
Deprecated.- Specified by:
setUnicodeStream
in interfacejava.sql.PreparedStatement
- Overrides:
setUnicodeStream
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setBinaryStream
public void setBinaryStream(int i1, java.io.InputStream is, int i2) throws java.sql.SQLException
- Specified by:
setBinaryStream
in interfacejava.sql.PreparedStatement
- Overrides:
setBinaryStream
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setBinaryStream
public void setBinaryStream(int i1, java.io.InputStream is) throws java.sql.SQLException
- Specified by:
setBinaryStream
in interfacejava.sql.PreparedStatement
- Overrides:
setBinaryStream
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
clearParameters
public void clearParameters() throws java.sql.SQLException
- Specified by:
clearParameters
in interfacejava.sql.PreparedStatement
- Overrides:
clearParameters
in 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:
setObject
in interfacejava.sql.PreparedStatement
- Overrides:
setObject
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setObject
public void setObject(int i1, java.lang.Object o, int i2) throws java.sql.SQLException
- Specified by:
setObject
in interfacejava.sql.PreparedStatement
- Overrides:
setObject
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setObject
public void setObject(int i, java.lang.Object o) throws java.sql.SQLException
- Specified by:
setObject
in interfacejava.sql.PreparedStatement
- Overrides:
setObject
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
addBatch
public void addBatch() throws java.sql.SQLException
- Specified by:
addBatch
in interfacejava.sql.PreparedStatement
- Overrides:
addBatch
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setCharacterStream
public void setCharacterStream(int i1, java.io.Reader r, int i2) throws java.sql.SQLException
- Specified by:
setCharacterStream
in interfacejava.sql.PreparedStatement
- Overrides:
setCharacterStream
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setRef
public void setRef(int i, java.sql.Ref r) throws java.sql.SQLException
- Specified by:
setRef
in interfacejava.sql.PreparedStatement
- Overrides:
setRef
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setBlob
public void setBlob(int i, java.sql.Blob b) throws java.sql.SQLException
- Specified by:
setBlob
in interfacejava.sql.PreparedStatement
- Overrides:
setBlob
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setClob
public void setClob(int i, java.sql.Clob c) throws java.sql.SQLException
- Specified by:
setClob
in interfacejava.sql.PreparedStatement
- Overrides:
setClob
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setArray
public void setArray(int i, java.sql.Array a) throws java.sql.SQLException
- Specified by:
setArray
in interfacejava.sql.PreparedStatement
- Overrides:
setArray
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
getMetaData
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException
- Specified by:
getMetaData
in interfacejava.sql.PreparedStatement
- Overrides:
getMetaData
in 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:
setDate
in interfacejava.sql.PreparedStatement
- Overrides:
setDate
in 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:
setTime
in interfacejava.sql.PreparedStatement
- Overrides:
setTime
in 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:
setTimestamp
in interfacejava.sql.PreparedStatement
- Overrides:
setTimestamp
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setNull
public void setNull(int i1, int i2, java.lang.String s) throws java.sql.SQLException
- Specified by:
setNull
in interfacejava.sql.PreparedStatement
- Overrides:
setNull
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
setURL
public void setURL(int i, java.net.URL u) throws java.sql.SQLException
- Specified by:
setURL
in interfacejava.sql.PreparedStatement
- Overrides:
setURL
in classDelegatingPreparedStatement
- Throws:
java.sql.SQLException
-
appendInfo
protected void appendInfo(java.lang.StringBuffer buf)
- Overrides:
appendInfo
in classDelegatingPreparedStatement
-
-