org.synchronoss.cpo.jdbc
Class JdbcPreparedStatement
java.lang.Object
org.synchronoss.cpo.jdbc.AbstractJdbcPreparedStatement
org.synchronoss.cpo.jdbc.JdbcPreparedStatement
- All Implemented Interfaces:
- java.sql.PreparedStatement, java.sql.Statement
- Direct Known Subclasses:
- AbstractJdbcCallableStatement
public class JdbcPreparedStatement
- extends AbstractJdbcPreparedStatement
An object that represents a precompiled SQL statement.
A SQL statement is precompiled and stored in a
PreparedStatement object. This object can then be used to
efficiently execute this statement multiple times.
Note: The setter methods (setShort, setString,
and so on) for setting IN parameter values
must specify types that are compatible with the defined SQL type of
the input parameter. For instance, if the IN parameter has SQL type
INTEGER, then the method setInt should be used.
If arbitrary parameter type conversions are required, the method
setObject should be used with a target SQL type.
In the following example of setting a parameter, con represents
an active connection:
PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES
SET SALARY = ? WHERE ID = ?");
pstmt.setBigDecimal(1, 153833.00)
pstmt.setInt(2, 110592)
- See Also:
Connection.prepareStatement(java.lang.String),
ResultSet
| 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 |
| Methods inherited from class org.synchronoss.cpo.jdbc.AbstractJdbcPreparedStatement |
addBatch, addBatch, cancel, clearBatch, clearParameters, clearWarnings, close, execute, execute, execute, execute, execute, executeBatch, executeQuery, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMetaData, getMoreResults, getMoreResults, getParameterMetaData, getPreparedStatement, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setCursorName, setDate, setDate, setDouble, setEscapeProcessing, setFetchDirection, setFetchSize, setFloat, setInt, setLong, setMaxFieldSize, setMaxRows, setNull, setNull, setObject, setObject, setObject, setQueryTimeout, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JdbcPreparedStatement
public JdbcPreparedStatement(java.sql.PreparedStatement pstmt)
Copyright © 2011. All Rights Reserved.