com.p6spy.engine.spy
Class P6PreparedStatement
java.lang.Object
com.p6spy.engine.spy.P6Base
com.p6spy.engine.spy.P6Statement
com.p6spy.engine.spy.P6PreparedStatement
- All Implemented Interfaces:
- java.sql.PreparedStatement, java.sql.Statement
- Direct Known Subclasses:
- P6CallableStatement, P6LogPreparedStatement, P6OutagePreparedStatement
- public class P6PreparedStatement
- extends P6Statement
- implements java.sql.PreparedStatement
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 |
Method Summary |
void |
addBatch()
|
void |
clearParameters()
|
boolean |
execute()
|
java.sql.ResultSet |
executeQuery()
|
int |
executeUpdate()
|
java.sql.Statement |
getJDBC()
Returns the underlying JDBC object (in this case, a
java.sql.PreparedStatement). |
java.sql.ResultSetMetaData |
getMetaData()
|
java.sql.ParameterMetaData |
getParameterMetaData()
|
java.lang.String |
getQueryFromPreparedStatement()
|
java.sql.ResultSet |
getResultSet()
|
int |
getValuesLength()
|
protected void |
growValues(int newMax)
|
protected void |
initValues()
|
void |
setArray(int p0,
java.sql.Array p1)
|
void |
setAsciiStream(int p0,
java.io.InputStream p1,
int p2)
|
void |
setBigDecimal(int p0,
java.math.BigDecimal p1)
|
void |
setBinaryStream(int p0,
java.io.InputStream p1,
int p2)
|
void |
setBlob(int p0,
java.sql.Blob p1)
|
void |
setBoolean(int p0,
boolean p1)
|
void |
setByte(int p0,
byte p1)
|
void |
setBytes(int p0,
byte[] p1)
|
void |
setCharacterStream(int p0,
java.io.Reader p1,
int p2)
|
void |
setClob(int p0,
java.sql.Clob p1)
|
void |
setDate(int p0,
java.sql.Date p1)
|
void |
setDate(int p0,
java.sql.Date p1,
java.util.Calendar p2)
|
void |
setDouble(int p0,
double p1)
|
void |
setFloat(int p0,
float p1)
|
void |
setInt(int p0,
int p1)
|
void |
setLong(int p0,
long p1)
|
void |
setNull(int p0,
int p1)
|
void |
setNull(int p0,
int p1,
java.lang.String p2)
|
void |
setObject(int p0,
java.lang.Object p1)
|
void |
setObject(int p0,
java.lang.Object p1,
int p2)
|
void |
setObject(int p0,
java.lang.Object p1,
int p2,
int p3)
|
protected void |
setObjectAsInt(int i,
java.lang.Object o)
|
protected void |
setObjectAsString(int i,
java.lang.Object o)
|
void |
setRef(int p0,
java.sql.Ref p1)
|
void |
setShort(int p0,
short p1)
|
void |
setString(int p0,
java.lang.String p1)
|
void |
setTime(int p0,
java.sql.Time p1)
|
void |
setTime(int p0,
java.sql.Time p1,
java.util.Calendar p2)
|
void |
setTimestamp(int p0,
java.sql.Timestamp p1)
|
void |
setTimestamp(int p0,
java.sql.Timestamp p1,
java.util.Calendar p2)
|
void |
setUnicodeStream(int p0,
java.io.InputStream p1,
int p2)
|
void |
setURL(int p0,
java.net.URL p1)
|
Methods inherited from class com.p6spy.engine.spy.P6Statement |
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.sql.Statement |
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout |
P6_MAX_FIELDS
public static final int P6_MAX_FIELDS
- See Also:
- Constant Field Values
P6_GROW_MAX
public static int P6_GROW_MAX
prepStmtPassthru
protected java.sql.PreparedStatement prepStmtPassthru
preparedQuery
protected java.lang.String preparedQuery
values
protected java.lang.Object[] values
isString
protected boolean[] isString
P6PreparedStatement
public P6PreparedStatement(P6Factory factory,
java.sql.PreparedStatement statement,
P6Connection conn,
java.lang.String query)
initValues
protected void initValues()
addBatch
public void addBatch()
throws java.sql.SQLException
- Specified by:
addBatch
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
clearParameters
public void clearParameters()
throws java.sql.SQLException
- Specified by:
clearParameters
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
execute
public boolean execute()
throws java.sql.SQLException
- Specified by:
execute
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
executeQuery
public java.sql.ResultSet executeQuery()
throws java.sql.SQLException
- Specified by:
executeQuery
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
executeUpdate
public int executeUpdate()
throws java.sql.SQLException
- Specified by:
executeUpdate
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
getMetaData
public java.sql.ResultSetMetaData getMetaData()
throws java.sql.SQLException
- Specified by:
getMetaData
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setArray
public void setArray(int p0,
java.sql.Array p1)
throws java.sql.SQLException
- Specified by:
setArray
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setAsciiStream
public void setAsciiStream(int p0,
java.io.InputStream p1,
int p2)
throws java.sql.SQLException
- Specified by:
setAsciiStream
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setBigDecimal
public void setBigDecimal(int p0,
java.math.BigDecimal p1)
throws java.sql.SQLException
- Specified by:
setBigDecimal
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setBinaryStream
public void setBinaryStream(int p0,
java.io.InputStream p1,
int p2)
throws java.sql.SQLException
- Specified by:
setBinaryStream
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setBlob
public void setBlob(int p0,
java.sql.Blob p1)
throws java.sql.SQLException
- Specified by:
setBlob
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setBoolean
public void setBoolean(int p0,
boolean p1)
throws java.sql.SQLException
- Specified by:
setBoolean
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setByte
public void setByte(int p0,
byte p1)
throws java.sql.SQLException
- Specified by:
setByte
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setBytes
public void setBytes(int p0,
byte[] p1)
throws java.sql.SQLException
- Specified by:
setBytes
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setCharacterStream
public void setCharacterStream(int p0,
java.io.Reader p1,
int p2)
throws java.sql.SQLException
- Specified by:
setCharacterStream
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setClob
public void setClob(int p0,
java.sql.Clob p1)
throws java.sql.SQLException
- Specified by:
setClob
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setDate
public void setDate(int p0,
java.sql.Date p1)
throws java.sql.SQLException
- Specified by:
setDate
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setDate
public void setDate(int p0,
java.sql.Date p1,
java.util.Calendar p2)
throws java.sql.SQLException
- Specified by:
setDate
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setDouble
public void setDouble(int p0,
double p1)
throws java.sql.SQLException
- Specified by:
setDouble
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setFloat
public void setFloat(int p0,
float p1)
throws java.sql.SQLException
- Specified by:
setFloat
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setInt
public void setInt(int p0,
int p1)
throws java.sql.SQLException
- Specified by:
setInt
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setLong
public void setLong(int p0,
long p1)
throws java.sql.SQLException
- Specified by:
setLong
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setNull
public void setNull(int p0,
int p1,
java.lang.String p2)
throws java.sql.SQLException
- Specified by:
setNull
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setNull
public void setNull(int p0,
int p1)
throws java.sql.SQLException
- Specified by:
setNull
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setObject
public void setObject(int p0,
java.lang.Object p1,
int p2,
int p3)
throws java.sql.SQLException
- Specified by:
setObject
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setObject
public void setObject(int p0,
java.lang.Object p1,
int p2)
throws java.sql.SQLException
- Specified by:
setObject
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setObject
public void setObject(int p0,
java.lang.Object p1)
throws java.sql.SQLException
- Specified by:
setObject
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setRef
public void setRef(int p0,
java.sql.Ref p1)
throws java.sql.SQLException
- Specified by:
setRef
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setShort
public void setShort(int p0,
short p1)
throws java.sql.SQLException
- Specified by:
setShort
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setString
public void setString(int p0,
java.lang.String p1)
throws java.sql.SQLException
- Specified by:
setString
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setTime
public void setTime(int p0,
java.sql.Time p1,
java.util.Calendar p2)
throws java.sql.SQLException
- Specified by:
setTime
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setTime
public void setTime(int p0,
java.sql.Time p1)
throws java.sql.SQLException
- Specified by:
setTime
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setTimestamp
public void setTimestamp(int p0,
java.sql.Timestamp p1,
java.util.Calendar p2)
throws java.sql.SQLException
- Specified by:
setTimestamp
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setTimestamp
public void setTimestamp(int p0,
java.sql.Timestamp p1)
throws java.sql.SQLException
- Specified by:
setTimestamp
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
setUnicodeStream
public void setUnicodeStream(int p0,
java.io.InputStream p1,
int p2)
throws java.sql.SQLException
- Specified by:
setUnicodeStream
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
getResultSet
public java.sql.ResultSet getResultSet()
throws java.sql.SQLException
- Specified by:
getResultSet
in interface java.sql.Statement
- Overrides:
getResultSet
in class P6Statement
- Throws:
java.sql.SQLException
getQueryFromPreparedStatement
public final java.lang.String getQueryFromPreparedStatement()
growValues
protected void growValues(int newMax)
setObjectAsString
protected void setObjectAsString(int i,
java.lang.Object o)
setObjectAsInt
protected void setObjectAsInt(int i,
java.lang.Object o)
setURL
public void setURL(int p0,
java.net.URL p1)
throws java.sql.SQLException
- Specified by:
setURL
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
getParameterMetaData
public java.sql.ParameterMetaData getParameterMetaData()
throws java.sql.SQLException
- Specified by:
getParameterMetaData
in interface java.sql.PreparedStatement
- Throws:
java.sql.SQLException
getJDBC
public java.sql.Statement getJDBC()
- Returns the underlying JDBC object (in this case, a
java.sql.PreparedStatement).
The returned object is a java.sql.Statement due
to inheritance reasons, so you'll need to cast
appropriately.
- Overrides:
getJDBC
in class P6Statement
- Returns:
- the wrapped JDBC object
getValuesLength
public int getValuesLength()