public class P6PreparedStatement extends P6Statement implements java.sql.PreparedStatement
Modifier and Type | Field and Description |
---|---|
protected boolean[] |
isString |
static int |
P6_GROW_MAX |
static int |
P6_MAX_FIELDS |
protected java.lang.String |
preparedQuery |
protected java.sql.PreparedStatement |
prepStmtPassthru |
protected java.lang.Object[] |
values |
connection, passthru, statementQuery
Constructor and Description |
---|
P6PreparedStatement(P6Factory factory,
java.sql.PreparedStatement statement,
P6Connection conn,
java.lang.String query) |
Modifier and Type | Method and Description |
---|---|
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 arg0,
java.io.InputStream arg1) |
void |
setAsciiStream(int p0,
java.io.InputStream p1,
int p2) |
void |
setAsciiStream(int arg0,
java.io.InputStream arg1,
long arg2) |
void |
setBigDecimal(int p0,
java.math.BigDecimal p1) |
void |
setBinaryStream(int arg0,
java.io.InputStream arg1) |
void |
setBinaryStream(int p0,
java.io.InputStream p1,
int p2) |
void |
setBinaryStream(int arg0,
java.io.InputStream arg1,
long arg2) |
void |
setBlob(int p0,
java.sql.Blob p1) |
void |
setBlob(int arg0,
java.io.InputStream arg1) |
void |
setBlob(int arg0,
java.io.InputStream arg1,
long arg2) |
void |
setBoolean(int p0,
boolean p1) |
void |
setByte(int p0,
byte p1) |
void |
setBytes(int p0,
byte[] p1) |
void |
setCharacterStream(int arg0,
java.io.Reader arg1) |
void |
setCharacterStream(int p0,
java.io.Reader p1,
int p2) |
void |
setCharacterStream(int arg0,
java.io.Reader arg1,
long arg2) |
void |
setClob(int p0,
java.sql.Clob p1) |
void |
setClob(int arg0,
java.io.Reader arg1) |
void |
setClob(int arg0,
java.io.Reader arg1,
long arg2) |
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 |
setNCharacterStream(int arg0,
java.io.Reader arg1) |
void |
setNCharacterStream(int arg0,
java.io.Reader arg1,
long arg2) |
void |
setNClob(int arg0,
java.sql.NClob arg1) |
void |
setNClob(int arg0,
java.io.Reader arg1) |
void |
setNClob(int arg0,
java.io.Reader arg1,
long arg2) |
void |
setNString(int arg0,
java.lang.String arg1) |
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 |
setRowId(int arg0,
java.sql.RowId arg1) |
void |
setShort(int p0,
short p1) |
void |
setSQLXML(int arg0,
java.sql.SQLXML arg1) |
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) |
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, unwrap
getP6Factory, setP6Factory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
public static final int P6_MAX_FIELDS
public static int P6_GROW_MAX
protected java.sql.PreparedStatement prepStmtPassthru
protected java.lang.String preparedQuery
protected java.lang.Object[] values
protected boolean[] isString
public P6PreparedStatement(P6Factory factory, java.sql.PreparedStatement statement, P6Connection conn, java.lang.String query)
protected void initValues()
public void addBatch() throws java.sql.SQLException
addBatch
in interface java.sql.PreparedStatement
java.sql.SQLException
public void clearParameters() throws java.sql.SQLException
clearParameters
in interface java.sql.PreparedStatement
java.sql.SQLException
public boolean execute() throws java.sql.SQLException
execute
in interface java.sql.PreparedStatement
java.sql.SQLException
public java.sql.ResultSet executeQuery() throws java.sql.SQLException
executeQuery
in interface java.sql.PreparedStatement
java.sql.SQLException
public int executeUpdate() throws java.sql.SQLException
executeUpdate
in interface java.sql.PreparedStatement
java.sql.SQLException
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException
getMetaData
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setArray(int p0, java.sql.Array p1) throws java.sql.SQLException
setArray
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setAsciiStream(int p0, java.io.InputStream p1, int p2) throws java.sql.SQLException
setAsciiStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBigDecimal(int p0, java.math.BigDecimal p1) throws java.sql.SQLException
setBigDecimal
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBinaryStream(int p0, java.io.InputStream p1, int p2) throws java.sql.SQLException
setBinaryStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBlob(int p0, java.sql.Blob p1) throws java.sql.SQLException
setBlob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBoolean(int p0, boolean p1) throws java.sql.SQLException
setBoolean
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setByte(int p0, byte p1) throws java.sql.SQLException
setByte
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBytes(int p0, byte[] p1) throws java.sql.SQLException
setBytes
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setCharacterStream(int p0, java.io.Reader p1, int p2) throws java.sql.SQLException
setCharacterStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setClob(int p0, java.sql.Clob p1) throws java.sql.SQLException
setClob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setDate(int p0, java.sql.Date p1) throws java.sql.SQLException
setDate
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setDate(int p0, java.sql.Date p1, java.util.Calendar p2) throws java.sql.SQLException
setDate
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setDouble(int p0, double p1) throws java.sql.SQLException
setDouble
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setFloat(int p0, float p1) throws java.sql.SQLException
setFloat
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setInt(int p0, int p1) throws java.sql.SQLException
setInt
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setLong(int p0, long p1) throws java.sql.SQLException
setLong
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNull(int p0, int p1, java.lang.String p2) throws java.sql.SQLException
setNull
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNull(int p0, int p1) throws java.sql.SQLException
setNull
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setObject(int p0, java.lang.Object p1, int p2, int p3) throws java.sql.SQLException
setObject
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setObject(int p0, java.lang.Object p1, int p2) throws java.sql.SQLException
setObject
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setObject(int p0, java.lang.Object p1) throws java.sql.SQLException
setObject
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setRef(int p0, java.sql.Ref p1) throws java.sql.SQLException
setRef
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setShort(int p0, short p1) throws java.sql.SQLException
setShort
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setString(int p0, java.lang.String p1) throws java.sql.SQLException
setString
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setTime(int p0, java.sql.Time p1, java.util.Calendar p2) throws java.sql.SQLException
setTime
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setTime(int p0, java.sql.Time p1) throws java.sql.SQLException
setTime
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setTimestamp(int p0, java.sql.Timestamp p1, java.util.Calendar p2) throws java.sql.SQLException
setTimestamp
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setTimestamp(int p0, java.sql.Timestamp p1) throws java.sql.SQLException
setTimestamp
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setUnicodeStream(int p0, java.io.InputStream p1, int p2) throws java.sql.SQLException
setUnicodeStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
getResultSet
in interface java.sql.Statement
getResultSet
in class P6Statement
java.sql.SQLException
public final java.lang.String getQueryFromPreparedStatement()
protected void growValues(int newMax)
protected void setObjectAsString(int i, java.lang.Object o)
protected void setObjectAsInt(int i, java.lang.Object o)
public void setURL(int p0, java.net.URL p1) throws java.sql.SQLException
setURL
in interface java.sql.PreparedStatement
java.sql.SQLException
public java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException
getParameterMetaData
in interface java.sql.PreparedStatement
java.sql.SQLException
public java.sql.Statement getJDBC()
The returned object is a java.sql.Statement due to inheritance reasons, so you'll need to cast appropriately.
getJDBC
in class P6Statement
public int getValuesLength()
public void setAsciiStream(int arg0, java.io.InputStream arg1) throws java.sql.SQLException
setAsciiStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setAsciiStream(int arg0, java.io.InputStream arg1, long arg2) throws java.sql.SQLException
setAsciiStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBinaryStream(int arg0, java.io.InputStream arg1) throws java.sql.SQLException
setBinaryStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBinaryStream(int arg0, java.io.InputStream arg1, long arg2) throws java.sql.SQLException
setBinaryStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBlob(int arg0, java.io.InputStream arg1) throws java.sql.SQLException
setBlob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setBlob(int arg0, java.io.InputStream arg1, long arg2) throws java.sql.SQLException
setBlob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setCharacterStream(int arg0, java.io.Reader arg1) throws java.sql.SQLException
setCharacterStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setCharacterStream(int arg0, java.io.Reader arg1, long arg2) throws java.sql.SQLException
setCharacterStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setClob(int arg0, java.io.Reader arg1) throws java.sql.SQLException
setClob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setClob(int arg0, java.io.Reader arg1, long arg2) throws java.sql.SQLException
setClob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNCharacterStream(int arg0, java.io.Reader arg1) throws java.sql.SQLException
setNCharacterStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNCharacterStream(int arg0, java.io.Reader arg1, long arg2) throws java.sql.SQLException
setNCharacterStream
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNClob(int arg0, java.sql.NClob arg1) throws java.sql.SQLException
setNClob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNClob(int arg0, java.io.Reader arg1) throws java.sql.SQLException
setNClob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNClob(int arg0, java.io.Reader arg1, long arg2) throws java.sql.SQLException
setNClob
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setNString(int arg0, java.lang.String arg1) throws java.sql.SQLException
setNString
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setRowId(int arg0, java.sql.RowId arg1) throws java.sql.SQLException
setRowId
in interface java.sql.PreparedStatement
java.sql.SQLException
public void setSQLXML(int arg0, java.sql.SQLXML arg1) throws java.sql.SQLException
setSQLXML
in interface java.sql.PreparedStatement
java.sql.SQLException