Thread safety: the callable statement is not thread-safe. If the same callable statement is used by multiple threads access to it must be synchronized. The single synchronized block must include assignment of parameters, execution of the command and all operations with its result.
synchronized (call) {
call.setInt(1, 10);
try (ResultSet rs = call.executeQuery()) {
while (rs.next) {
// Do something
}
}
}
synchronized (call) {
call.setInt(1, 15);
updateCount = call.executeUpdate();
}
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private HashMap | |
| private BitSet |
| Access | Constructor and Description |
|---|---|
| pack-priv | JdbcCallableStatement(JdbcConnection conn, String sql, int id, int resultSetType, int resultSetConcurrency)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| public long | Returns: the update count (number of row affected by an insert, update or delete, or 0 if no rows or the statement was a create, drop, commit or rollback)Overrides org. Overrides default java. Executes a statement (insert, update, delete, create, drop) and returns the update count. |
| public int | Returns: the update count (number of row affected by an insert, update or delete, or 0 if no rows or the statement was a create, drop, commit or rollback)Overrides org. Implements java. Executes a statement (insert, update, delete, create, drop) and returns the update count. |
| public Array | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as an Array. |
| public Array | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as an Array. |
| public BigDecimal | Returns: the valuethe parameter index (1, 2, ...) parameterIndex, int is ignored scale)Implements java.
Deprecated
use
getBigDecimal(int)
Returns the value of the specified column as a BigDecimal. |
| public BigDecimal | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a BigDecimal. |
| public BigDecimal | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a BigDecimal. |
| public Blob | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a Blob. |
| public Blob | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a Blob. |
| public boolean | Returns: the value(1,2,...) parameterIndex)Implements java. Returns the value of the specified column as a boolean. |
| public boolean | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a boolean. |
| public byte | Returns: the value(1,2,...) parameterIndex)Implements java. Returns the value of the specified column as a byte. |
| public byte | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a byte. |
| public byte[] | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a byte array. |
| public byte[] | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a byte array. |
| public Reader | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a reader. |
| public Reader | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a reader. |
| private ResultSetMetaData | |
| public Clob | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a Clob. |
| public Clob | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a Clob. |
| public Date | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a java.sql.Date. |
| public Date | Returns: the valuethe parameter index (1, 2, ...) parameterIndex, Calendar the calendar cal)Implements java. Returns the value of the specified column as a java.sql.Date using a specified time zone. |
| public Date | Returns: the valuethe parameter name parameterName, Calendar the calendar cal)Implements java. Returns the value of the specified column as a java.sql.Date using a specified time zone. |
| public Date | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a java.sql.Date. |
| public double | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a double. |
| public double | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a double. |
| public float | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a float. |
| public float | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a float. |
| private int | |
| public int | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as an int. |
| public int | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as an int. |
| public long | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a long. |
| public long | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a long. |
| public Reader | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a reader. |
| public Reader | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a reader. |
| public NClob | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a Clob. |
| public NClob | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a Clob. |
| public String | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a String. |
| public String | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a String. |
| public Object | Returns: the value or nullthe parameter index (1, 2, ...) parameterIndex)Implements java. Returns a column value as a Java object. |
| public Object | getObject(int
the first parameter is 1, the second is 2, and so on parameterIndex, Map<String, Class<?>> the mapping from SQL type names to Java classes map)Implements java. [Not supported] Gets a column as a object using the specified type mapping. |
| public Object | |
| public Object | Returns: the value or nullthe parameter name parameterName)Implements java. Returns a column value as a Java object. |
| public <T> T | Returns: the valuethe parameter index (1, 2, ...) parameterIndex, Class<T> the class of the returned value type)Implements java. Returns the value of the specified column as a Java object of the specified type. |
| public <T> T | Returns: the valuethe parameter name parameterName, Class<T> the class of the returned value type)Implements java. Returns the value of the specified column as a Java object of the specified type. |
| private JdbcResultSet | |
| public Ref | getRef(int
the first parameter is 1, the second is 2,
and so on parameterIndex)Implements java. [Not supported] Gets a column as a reference. |
| public Ref | getRef(String
the name of the parameter parameterName)Implements java. [Not supported] Gets a column as a reference. |
| public RowId | getRowId(int
the parameter index (1, 2, ...) parameterIndex)Implements java. [Not supported] Returns the value of the specified column as a row id. |
| public RowId | getRowId(String
the parameter name parameterName)Implements java. [Not supported] Returns the value of the specified column as a row id. |
| public short | Returns: the value(1,2,...) parameterIndex)Implements java. Returns the value of the specified column as a short. |
| public short | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a short. |
| public SQLXML | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a SQLXML object. |
| public SQLXML | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a SQLXML object. |
| public String | Returns: the value(1,2,...) parameterIndex)Implements java. Returns the value of the specified column as a String. |
| public String | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a String. |
| public Time | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a java.sql.Time. |
| public Time | Returns: the valuethe parameter index (1, 2, ...) parameterIndex, Calendar the calendar cal)Implements java. Returns the value of the specified column as a java.sql.Time using a specified time zone. |
| public Time | Returns: the valuethe parameter name parameterName, Calendar the calendar cal)Implements java. Returns the value of the specified column as a java.sql.Time using a specified time zone. |
| public Time | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a java.sql.Time. |
| public Timestamp | Returns: the valuethe parameter index (1, 2, ...) parameterIndex)Implements java. Returns the value of the specified column as a java.sql.Timestamp. |
| public Timestamp | Returns: the valuethe parameter index (1, 2, ...) parameterIndex, Calendar the calendar cal)Implements java. Returns the value of the specified column as a java.sql.Timestamp using a specified time zone. |
| public Timestamp | Returns: the valuethe parameter name parameterName, Calendar the calendar cal)Implements java. Returns the value of the specified column as a java.sql.Timestamp using a specified time zone. |
| public Timestamp | Returns: the valuethe parameter name parameterName)Implements java. Returns the value of the specified column as a java.sql.Timestamp. |
| public URL | getURL(int
the first parameter is 1, the second is 2,... parameterIndex)Implements java. [Not supported] |
| public URL | getURL(String
the name of the parameter parameterName)Implements java. [Not supported] |
| public void | registerOutParameter(int
the parameter index (1, 2, ...) parameterIndex, int the data type (Types.x) - ignored sqlType)Implements java. Registers the given OUT parameter. |
| public void | registerOutParameter(int
the parameter index (1, 2, ...) parameterIndex, int the data type (Types.x) - ignored sqlType, String the SQL type name - ignored typeName)Implements java. Registers the given OUT parameter. |
| public void | registerOutParameter(int
the parameter index (1, 2, ...) parameterIndex, int the data type (Types.x) sqlType, int is ignored scale)Implements java. Registers the given OUT parameter. |
| public void | registerOutParameter(String
the parameter name parameterName, int the data type (Types.x) - ignored sqlType, String the SQL type name - ignored typeName)Implements java. Registers the given OUT parameter. |
| public void | registerOutParameter(String
the parameter name parameterName, int the data type (Types.x) - ignored sqlType, int is ignored scale)Implements java. Registers the given OUT parameter. |
| public void | registerOutParameter(String
the parameter name parameterName, int the data type (Types.x) - ignored sqlType)Implements java. Registers the given OUT parameter. |
| private void | |
| public void | setAsciiStream(String
the parameter name parameterName, InputStream the value x, long the maximum number of bytes length)Implements java. Sets the value of a parameter as an ASCII stream. |
| public void | setAsciiStream(String
the parameter name parameterName, InputStream the value x)Implements java. Sets the value of a parameter as an ASCII stream. |
| public void | setAsciiStream(String
the parameter name parameterName, InputStream the value x, int the maximum number of bytes length)Implements java. Sets the value of a parameter as an ASCII stream. |
| public void | setBigDecimal(String
the parameter name parameterName, BigDecimal the value x)Implements java. Sets the value of a parameter. |
| public void | setBinaryStream(String
the parameter name parameterName, InputStream the value x, int the maximum number of bytes length)Implements java. Sets the value of a parameter as an input stream. |
| public void | setBinaryStream(String
the parameter name parameterName, InputStream the value x)Implements java. Sets the value of a parameter as an input stream. |
| public void | setBinaryStream(String
the parameter name parameterName, InputStream the value x, long the maximum number of bytes length)Implements java. Sets the value of a parameter as an input stream. |
| public void | setBlob(String
the parameter name parameterName, InputStream the value x, long the maximum number of bytes length)Implements java. Sets the value of a parameter as a Blob. |
| public void | setBlob(String
the parameter name parameterName, Blob the value x)Implements java. Sets the value of a parameter as a Blob. |
| public void | setBlob(String
the parameter name parameterName, InputStream the value x)Implements java. Sets the value of a parameter as a Blob. |
| public void | setBoolean(String
the parameter name parameterName, boolean the value x)Implements java. Sets the value of a parameter. |
| public void | setByte(String
the parameter name parameterName, byte the value x)Implements java. Sets the value of a parameter. |
| public void | setBytes(String
the parameter name parameterName, byte[] the value x)Implements java. Sets the value of a parameter as a byte array. |
| public void | setCharacterStream(String
the parameter name parameterName, Reader the value x, int the maximum number of characters length)Implements java. Sets the value of a parameter as a character stream. |
| public void | setCharacterStream(String
the parameter name parameterName, Reader the value x)Implements java. Sets the value of a parameter as a character stream. |
| public void | setCharacterStream(String
the parameter name parameterName, Reader the value x, long the maximum number of characters length)Implements java. Sets the value of a parameter as a character stream. |
| public void | setClob(String
the parameter name parameterName, Reader the value x, long the maximum number of characters length)Implements java. Sets the value of a parameter as a Clob. |
| public void | setClob(String
the parameter name parameterName, Clob the value x)Implements java. Sets the value of a parameter as a Clob. |
| public void | setClob(String
the parameter name parameterName, Reader the value x)Implements java. Sets the value of a parameter as a character stream. |
| public void | setDate(String
the parameter name parameterName, Date the value x, Calendar the calendar cal)Implements java. Sets the date using a specified time zone. |
| public void | setDate(String
the parameter name parameterName, Date the value x)Implements java. Sets the value of a parameter. |
| public void | setDouble(String
the parameter name parameterName, double the value x)Implements java. Sets the value of a parameter. |
| public void | setFloat(String
the parameter name parameterName, float the value x)Implements java. Sets the value of a parameter. |
| public void | setInt(String
the parameter name parameterName, int the value x)Implements java. Sets the value of a parameter. |
| public void | setLong(String
the parameter name parameterName, long the value x)Implements java. Sets the value of a parameter. |
| public void | setNCharacterStream(String
the parameter name parameterName, Reader the value x, long the maximum number of characters length)Implements java. Sets the value of a parameter as a character stream. |
| public void | setNCharacterStream(String
the parameter name parameterName, Reader the value x)Implements java. Sets the value of a parameter as a character stream. |
| public void | setNClob(String
the parameter name parameterName, NClob the value x)Implements java. Sets the value of a parameter as a Clob. |
| public void | setNClob(String
the parameter name parameterName, Reader the value x, long the maximum number of characters length)Implements java. Sets the value of a parameter as a Clob. |
| public void | setNClob(String
the parameter name parameterName, Reader the value x)Implements java. Sets the value of a parameter as a Clob. |
| public void | setNString(String
the parameter name parameterName, String the value x)Implements java. Sets the value of a parameter. |
| public void | setNull(String
the parameter name parameterName, int the data type (Types.x) sqlType, String this parameter is ignored typeName)Implements java. Sets a parameter to null. |
| public void | setNull(String
the parameter name parameterName, int the data type (Types.x) sqlType)Implements java. Sets a parameter to null. |
| public void | setObject(String
the parameter name parameterName, Object the value x)Implements java. Sets the value of a parameter. |
| public void | setObject(String
the parameter name parameterName, Object the value, null is allowed x, int the type as defined in java.sql.Types targetSqlType)Implements java. Sets the value of a parameter. |
| public void | setObject(String
the parameter name parameterName, Object the value, null is allowed x, int the type as defined in java.sql.Types targetSqlType, int is ignored scale)Implements java. Sets the value of a parameter. |
| public void | setObject(String
the parameter name parameterName, Object the value, null is allowed x, SQLType the type targetSqlType)Overrides default java. Sets the value of a parameter. |
| public void | setObject(String
the parameter name parameterName, Object the value, null is allowed x, SQLType the type targetSqlType, int is ignored scaleOrLength)Overrides default java. Sets the value of a parameter. |
| public void | setRowId(String
the name of the parameter parameterName, RowId the parameter value x)Implements java. [Not supported] Sets the value of a parameter as a row id. |
| public void | setShort(String
the parameter name parameterName, short the value x)Implements java. Sets the value of a parameter. |
| public void | setSQLXML(String
the parameter name parameterName, SQLXML the value x)Implements java. Sets the value of a parameter as a SQLXML object. |
| public void | setString(String
the parameter name parameterName, String the value x)Implements java. Sets the value of a parameter. |
| public void | setTime(String
the parameter name parameterName, Time the value x, Calendar the calendar cal)Implements java. Sets the time using a specified time zone. |
| public void | setTime(String
the parameter name parameterName, Time the value x)Implements java. Sets the time using a specified time zone. |
| public void | setTimestamp(String
the parameter name parameterName, Timestamp the value x, Calendar the calendar cal)Implements java. Sets the timestamp using a specified time zone. |
| public void | setTimestamp(String
the parameter name parameterName, Timestamp the value x)Implements java. Sets the value of a parameter. |
| public void | setURL(String
the name of the parameter parameterName, URL the parameter value val)Implements java. [Not supported] |
| public boolean | Returns: true if the last column accessed was nullImplements java. Returns whether the last column accessed was null. |