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:
 AutoCloseable,PreparedStatement,Statement,Wrapper,Closeable
- Enclosing class:
 - LoggingConnectionDecorator.LoggingConnection
 
protected class LoggingConnectionDecorator.LoggingConnection.LoggingPreparedStatement extends DelegatingPreparedStatement
 
- 
- 
Field Summary
- 
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
Constructors Constructor Description LoggingPreparedStatement(PreparedStatement stmnt, String sql) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddBatch()protected voidappendInfo(StringBuffer buf)voidcancel()voidclearParameters()booleanexecute()booleanexecute(String sql)booleanexecute(String s, int i)booleanexecute(String s, int[] ia)booleanexecute(String s, String[] sa)int[]executeBatch()protected ResultSetexecuteQuery(boolean wrap)Execute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.protected ResultSetexecuteQuery(String sql, boolean wrap)Execute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.intexecuteUpdate()intexecuteUpdate(String sql)intexecuteUpdate(String s, int i)intexecuteUpdate(String s, int[] ia)intexecuteUpdate(String s, String[] sa)ResultSetMetaDatagetMetaData()voidsetArray(int i, Array a)voidsetAsciiStream(int i1, InputStream is, int i2)voidsetBigDecimal(int i, BigDecimal bd)voidsetBinaryStream(int i1, InputStream is)voidsetBinaryStream(int i1, InputStream is, int i2)voidsetBlob(int i, Blob b)voidsetBoolean(int i, boolean b)voidsetByte(int i, byte b)voidsetBytes(int i, byte[] b)voidsetCharacterStream(int i1, Reader r, int i2)voidsetClob(int i, Clob c)voidsetDate(int i, Date d)voidsetDate(int i, Date d, 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, String s)voidsetObject(int i, Object o)voidsetObject(int i1, Object o, int i2)voidsetObject(int i1, Object o, int i2, int i3)voidsetRef(int i, Ref r)voidsetShort(int i, short s)voidsetString(int i, String s)voidsetTime(int i, Time t)voidsetTime(int i, Time t, Calendar c)voidsetTimestamp(int i, Timestamp t)voidsetTimestamp(int i, Timestamp t, Calendar c)voidsetUnicodeStream(int i1, InputStream is, int i2)Deprecated.voidsetURL(int i, URL u)protected ResultSetwrapResult(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 
- 
Methods inherited from interface java.sql.PreparedStatement
executeLargeUpdate, setObject, setObject 
- 
Methods inherited from interface java.sql.Statement
enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRows 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
LoggingPreparedStatement
public LoggingPreparedStatement(PreparedStatement stmnt, String sql) throws SQLException
- Throws:
 SQLException
 
 - 
 
- 
Method Detail
- 
wrapResult
protected ResultSet wrapResult(ResultSet rs, boolean wrap)
- Overrides:
 wrapResultin classDelegatingPreparedStatement
 
- 
executeQuery
protected ResultSet executeQuery(String sql, boolean wrap) throws SQLException
Description copied from class:DelegatingPreparedStatementExecute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.- Overrides:
 executeQueryin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
executeUpdate
public int executeUpdate(String sql) throws SQLException
- Specified by:
 executeUpdatein interfaceStatement- Overrides:
 executeUpdatein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
execute
public boolean execute(String sql) throws SQLException
- Specified by:
 executein interfaceStatement- Overrides:
 executein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
executeQuery
protected ResultSet executeQuery(boolean wrap) throws SQLException
Description copied from class:DelegatingPreparedStatementExecute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.- Overrides:
 executeQueryin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
executeUpdate
public int executeUpdate() throws SQLException- Specified by:
 executeUpdatein interfacePreparedStatement- Overrides:
 executeUpdatein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
executeBatch
public int[] executeBatch() throws SQLException- Specified by:
 executeBatchin interfaceStatement- Overrides:
 executeBatchin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
execute
public boolean execute() throws SQLException- Specified by:
 executein interfacePreparedStatement- Overrides:
 executein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
executeUpdate
public int executeUpdate(String s, int i) throws SQLException
- Specified by:
 executeUpdatein interfaceStatement- Overrides:
 executeUpdatein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
executeUpdate
public int executeUpdate(String s, int[] ia) throws SQLException
- Specified by:
 executeUpdatein interfaceStatement- Overrides:
 executeUpdatein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
executeUpdate
public int executeUpdate(String s, String[] sa) throws SQLException
- Specified by:
 executeUpdatein interfaceStatement- Overrides:
 executeUpdatein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
execute
public boolean execute(String s, int i) throws SQLException
- Specified by:
 executein interfaceStatement- Overrides:
 executein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
execute
public boolean execute(String s, int[] ia) throws SQLException
- Specified by:
 executein interfaceStatement- Overrides:
 executein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
execute
public boolean execute(String s, String[] sa) throws SQLException
- Specified by:
 executein interfaceStatement- Overrides:
 executein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
cancel
public void cancel() throws SQLException- Specified by:
 cancelin interfaceStatement- Overrides:
 cancelin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setNull
public void setNull(int i1, int i2) throws SQLException- Specified by:
 setNullin interfacePreparedStatement- Overrides:
 setNullin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setBoolean
public void setBoolean(int i, boolean b) throws SQLException- Specified by:
 setBooleanin interfacePreparedStatement- Overrides:
 setBooleanin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setByte
public void setByte(int i, byte b) throws SQLException- Specified by:
 setBytein interfacePreparedStatement- Overrides:
 setBytein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setShort
public void setShort(int i, short s) throws SQLException- Specified by:
 setShortin interfacePreparedStatement- Overrides:
 setShortin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setInt
public void setInt(int i1, int i2) throws SQLException- Specified by:
 setIntin interfacePreparedStatement- Overrides:
 setIntin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setLong
public void setLong(int i, long l) throws SQLException- Specified by:
 setLongin interfacePreparedStatement- Overrides:
 setLongin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setFloat
public void setFloat(int i, float f) throws SQLException- Specified by:
 setFloatin interfacePreparedStatement- Overrides:
 setFloatin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setDouble
public void setDouble(int i, double d) throws SQLException- Specified by:
 setDoublein interfacePreparedStatement- Overrides:
 setDoublein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setBigDecimal
public void setBigDecimal(int i, BigDecimal bd) throws SQLException- Specified by:
 setBigDecimalin interfacePreparedStatement- Overrides:
 setBigDecimalin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setString
public void setString(int i, String s) throws SQLException- Specified by:
 setStringin interfacePreparedStatement- Overrides:
 setStringin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setBytes
public void setBytes(int i, byte[] b) throws SQLException- Specified by:
 setBytesin interfacePreparedStatement- Overrides:
 setBytesin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setDate
public void setDate(int i, Date d) throws SQLException- Specified by:
 setDatein interfacePreparedStatement- Overrides:
 setDatein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setTime
public void setTime(int i, Time t) throws SQLException- Specified by:
 setTimein interfacePreparedStatement- Overrides:
 setTimein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setTimestamp
public void setTimestamp(int i, Timestamp t) throws SQLException- Specified by:
 setTimestampin interfacePreparedStatement- Overrides:
 setTimestampin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setAsciiStream
public void setAsciiStream(int i1, InputStream is, int i2) throws SQLException- Specified by:
 setAsciiStreamin interfacePreparedStatement- Overrides:
 setAsciiStreamin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setUnicodeStream
@Deprecated public void setUnicodeStream(int i1, InputStream is, int i2) throws SQLException
Deprecated.- Specified by:
 setUnicodeStreamin interfacePreparedStatement- Overrides:
 setUnicodeStreamin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setBinaryStream
public void setBinaryStream(int i1, InputStream is, int i2) throws SQLException- Specified by:
 setBinaryStreamin interfacePreparedStatement- Overrides:
 setBinaryStreamin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setBinaryStream
public void setBinaryStream(int i1, InputStream is) throws SQLException- Specified by:
 setBinaryStreamin interfacePreparedStatement- Overrides:
 setBinaryStreamin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
clearParameters
public void clearParameters() throws SQLException- Specified by:
 clearParametersin interfacePreparedStatement- Overrides:
 clearParametersin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setObject
public void setObject(int i1, Object o, int i2, int i3) throws SQLException- Specified by:
 setObjectin interfacePreparedStatement- Overrides:
 setObjectin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setObject
public void setObject(int i1, Object o, int i2) throws SQLException- Specified by:
 setObjectin interfacePreparedStatement- Overrides:
 setObjectin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setObject
public void setObject(int i, Object o) throws SQLException- Specified by:
 setObjectin interfacePreparedStatement- Overrides:
 setObjectin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
addBatch
public void addBatch() throws SQLException- Specified by:
 addBatchin interfacePreparedStatement- Overrides:
 addBatchin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setCharacterStream
public void setCharacterStream(int i1, Reader r, int i2) throws SQLException- Specified by:
 setCharacterStreamin interfacePreparedStatement- Overrides:
 setCharacterStreamin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setRef
public void setRef(int i, Ref r) throws SQLException- Specified by:
 setRefin interfacePreparedStatement- Overrides:
 setRefin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setBlob
public void setBlob(int i, Blob b) throws SQLException- Specified by:
 setBlobin interfacePreparedStatement- Overrides:
 setBlobin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setClob
public void setClob(int i, Clob c) throws SQLException- Specified by:
 setClobin interfacePreparedStatement- Overrides:
 setClobin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setArray
public void setArray(int i, Array a) throws SQLException- Specified by:
 setArrayin interfacePreparedStatement- Overrides:
 setArrayin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
getMetaData
public ResultSetMetaData getMetaData() throws SQLException
- Specified by:
 getMetaDatain interfacePreparedStatement- Overrides:
 getMetaDatain classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setDate
public void setDate(int i, Date d, Calendar c) throws SQLException- Specified by:
 setDatein interfacePreparedStatement- Overrides:
 setDatein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setTime
public void setTime(int i, Time t, Calendar c) throws SQLException- Specified by:
 setTimein interfacePreparedStatement- Overrides:
 setTimein classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setTimestamp
public void setTimestamp(int i, Timestamp t, Calendar c) throws SQLException- Specified by:
 setTimestampin interfacePreparedStatement- Overrides:
 setTimestampin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setNull
public void setNull(int i1, int i2, String s) throws SQLException- Specified by:
 setNullin interfacePreparedStatement- Overrides:
 setNullin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
setURL
public void setURL(int i, URL u) throws SQLException- Specified by:
 setURLin interfacePreparedStatement- Overrides:
 setURLin classDelegatingPreparedStatement- Throws:
 SQLException
 
- 
appendInfo
protected void appendInfo(StringBuffer buf)
- Overrides:
 appendInfoin classDelegatingPreparedStatement
 
 - 
 
 -