|
|||||||||
| Home >> All >> org >> apache >> derby >> client >> [ am overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.client.am
Class CallableStatement

java.lang.Objectorg.apache.derby.client.am.Statement
org.apache.derby.client.am.PreparedStatement
org.apache.derby.client.am.CallableStatement
- All Implemented Interfaces:
- java.sql.CallableStatement, java.sql.PreparedStatement, PreparedStatementCallbackInterface, java.sql.Statement, StatementCallbackInterface, UnitOfWorkListener
- public class CallableStatement
- extends PreparedStatement
- implements java.sql.PreparedStatement, java.sql.CallableStatement, PreparedStatementCallbackInterface
- extends PreparedStatement
| Field Summary | |
MaterialPreparedStatement |
materialCallableStatement_
|
private static int |
WAS_NOT_NULL
|
private static int |
WAS_NULL
|
private static int |
WAS_NULL_UNSET
|
private int |
wasNull_
|
| Fields inherited from class org.apache.derby.client.am.PreparedStatement |
listenToUnitOfWork_, materialPreparedStatement_, outputRegistered_, parameterMetaData_, parameterRegistered_, parameters_, parameterSet_, positionedUpdateCursorName_, sql_ |
| 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 | |
CallableStatement(Agent agent,
Connection connection,
java.lang.String sql,
int type,
int concurrency,
int holdability)
|
|
| Method Summary | |
private int |
checkForEscapedCallWithResult(int parameterIndex)
|
private int |
checkForEscapedCallWithResult(int parameterIndex,
int jdbcType)
|
private void |
checkForValidOutParameter(int parameterIndex)
|
private void |
checkGetterPreconditions(int parameterIndex)
|
void |
clearParameters()
This method clears all of the input parameter that have been set on this statement. |
boolean |
execute()
This method executes a prepared SQL query. |
java.sql.ResultSet |
executeQuery()
This method executes a prepared SQL query and returns its ResultSet. |
(package private) ResultSet |
executeQueryX()
|
int |
executeUpdate()
This method executes an SQL INSERT, UPDATE or DELETE statement. |
(package private) int |
executeUpdateX()
|
(package private) boolean |
executeX()
|
protected void |
finalize()
Called on an object by the Virtual Machine at most once, at some point after the Object is determined unreachable but before it is destroyed. |
java.sql.Array |
getArray(int parameterIndex)
This method returns the value of the specified parameter as a Java Array. |
java.sql.Array |
getArray(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java Array. |
java.math.BigDecimal |
getBigDecimal(int parameterIndex)
This method returns the value of the specified parameter as a Java BigDecimal. |
java.math.BigDecimal |
getBigDecimal(int parameterIndex,
int scale)
This method returns the value of the specified parameter as a Java BigDecimal. |
java.math.BigDecimal |
getBigDecimal(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java BigDecimal. |
java.sql.Blob |
getBlob(int parameterIndex)
This method returns the value of the specified parameter as a Java Blob. |
java.sql.Blob |
getBlob(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java Blob. |
boolean |
getBoolean(int parameterIndex)
This method returns the value of the specified parameter as a Java boolean. |
boolean |
getBoolean(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java boolean. |
byte |
getByte(int parameterIndex)
This method returns the value of the specified parameter as a Java byte. |
byte |
getByte(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java byte. |
byte[] |
getBytes(int parameterIndex)
This method returns the value of the specified parameter as a Java byte array. |
byte[] |
getBytes(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java byte array. |
java.sql.Clob |
getClob(int parameterIndex)
This method returns the value of the specified parameter as a Java Clob. |
java.sql.Clob |
getClob(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java Clob. |
java.sql.Date |
getDate(int parameterIndex)
This method returns the value of the specified parameter as a Java java.sql.Date. |
java.sql.Date |
getDate(int parameterIndex,
java.util.Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Date. |
java.sql.Date |
getDate(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java java.sql.Date. |
java.sql.Date |
getDate(java.lang.String parameterName,
java.util.Calendar calendar)
This method returns the value of the specified parameter as a Java java.sql.Date. |
double |
getDouble(int parameterIndex)
This method returns the value of the specified parameter as a Java double. |
double |
getDouble(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java double. |
float |
getFloat(int parameterIndex)
This method returns the value of the specified parameter as a Java float. |
float |
getFloat(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java float. |
int |
getInt(int parameterIndex)
This method returns the value of the specified parameter as a Java int. |
int |
getInt(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java int. |
(package private) int |
getIntX(int parameterIndex)
|
long |
getLong(int parameterIndex)
This method returns the value of the specified parameter as a Java long. |
long |
getLong(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java long. |
java.lang.Object |
getObject(int parameterIndex)
This method returns the value of the specified parameter as a Java Object. |
java.lang.Object |
getObject(int parameterIndex,
java.util.Map map)
This method returns the value of the specified parameter as a Java Object. |
java.lang.Object |
getObject(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java Object. |
java.lang.Object |
getObject(java.lang.String parameterName,
java.util.Map map)
This method returns the value of the specified parameter as a Java Object using the specified mapping for conversion from
SQL to Java types. |
java.sql.Ref |
getRef(int parameterIndex)
This method returns the value of the specified parameter as a Java Ref. |
java.sql.Ref |
getRef(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java Ref. |
short |
getShort(int parameterIndex)
This method returns the value of the specified parameter as a Java short. |
short |
getShort(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java short. |
java.lang.String |
getString(int parameterIndex)
This method returns the value of the specified parameter as a Java String. |
java.lang.String |
getString(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java String. |
(package private) java.lang.String |
getStringX(int parameterIndex)
|
java.sql.Time |
getTime(int parameterIndex)
This method returns the value of the specified parameter as a Java java.sql.Time. |
java.sql.Time |
getTime(int parameterIndex,
java.util.Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Time. |
java.sql.Time |
getTime(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java java.sql.Time. |
java.sql.Time |
getTime(java.lang.String parameterName,
java.util.Calendar calendar)
This method returns the value of the specified parameter as a Java java.sql.Time. |
java.sql.Timestamp |
getTimestamp(int parameterIndex)
This method returns the value of the specified parameter as a Java java.sql.Timestamp. |
java.sql.Timestamp |
getTimestamp(int parameterIndex,
java.util.Calendar cal)
This method returns the value of the specified parameter as a Java java.sql.Timestamp. |
java.sql.Timestamp |
getTimestamp(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java java.sql.Timestamp. |
java.sql.Timestamp |
getTimestamp(java.lang.String parameterName,
java.util.Calendar calendar)
This method returns the value of the specified parameter as a Java java.sql.Timestamp. |
java.net.URL |
getURL(int parameterIndex)
This method returns the value of the specified parameter as a Java java.net.URL. |
java.net.URL |
getURL(java.lang.String parameterName)
This method returns the value of the specified parameter as a Java java.net.URL. |
private int |
guessScaleForDecimalOrNumeric(int parameterIndex)
|
private void |
initCallableStatement()
|
void |
registerOutParameter(int parameterIndex,
int jdbcType)
This method registers the specified parameter as an output parameter of the specified SQL type. |
void |
registerOutParameter(int parameterIndex,
int jdbcType,
int scale)
This method registers the specified parameter as an output parameter of the specified SQL type and scale. |
void |
registerOutParameter(int parameterIndex,
int jdbcType,
java.lang.String typeName)
This method registers the specified parameter as an output parameter of the specified SQL type. |
void |
registerOutParameter(java.lang.String parameterName,
int sqlType)
This method registers the specified parameter as an output parameter of the specified SQL type. |
void |
registerOutParameter(java.lang.String parameterName,
int sqlType,
int scale)
This method registers the specified parameter as an output parameter of the specified SQL type. |
void |
registerOutParameter(java.lang.String parameterName,
int sqlType,
java.lang.String typeName)
This method registers the specified parameter as an output parameter of the specified SQL type. |
(package private) void |
registerOutParameterX(int parameterIndex,
int jdbcType)
|
private void |
registerOutParameterX(int parameterIndex,
int jdbcType,
int scale)
|
void |
reset(boolean fullReset)
|
void |
resetCallableStatement(Agent agent,
Connection connection,
java.lang.String sql,
int type,
int concurrency,
int holdability)
|
void |
resetCallableStatement(Agent agent,
Connection connection,
java.lang.String sql,
Section section)
|
void |
resetCallableStatement(Agent agent,
Connection connection,
java.lang.String sql,
Section section,
ColumnMetaData parameterMetaData,
ColumnMetaData resultSetMetaData)
|
void |
setAsciiStream(java.lang.String parameterName,
java.io.InputStream x,
int length)
This method sets the specified parameter from the given Java ASCII InputStream value. |
void |
setBigDecimal(java.lang.String parameterName,
java.math.BigDecimal x)
This method sets the specified parameter from the given Java BigDecimal value. |
void |
setBinaryStream(java.lang.String parameterName,
java.io.InputStream x,
int length)
This method sets the specified parameter from the given Java binary InputStream value. |
void |
setBoolean(java.lang.String parameterName,
boolean x)
This method sets the specified parameter from the given Java boolean value. |
void |
setByte(java.lang.String parameterName,
byte x)
This method sets the specified parameter from the given Java byte value. |
void |
setBytes(java.lang.String parameterName,
byte[] x)
This method sets the specified parameter from the given Java byte array value. |
void |
setCharacterStream(java.lang.String parameterName,
java.io.Reader reader,
int length)
This method sets the specified parameter from the given Java character Reader value. |
void |
setDate(java.lang.String parameterName,
java.sql.Date x)
This method sets the specified parameter from the given Java java.sql.Date value. |
void |
setDate(java.lang.String parameterName,
java.sql.Date x,
java.util.Calendar calendar)
This method sets the specified parameter from the given Java java.sql.Date value. |
void |
setDouble(java.lang.String parameterName,
double x)
This method sets the specified parameter from the given Java double value. |
void |
setFloat(java.lang.String parameterName,
float x)
This method sets the specified parameter from the given Java float value. |
void |
setInt(java.lang.String parameterName,
int x)
This method sets the specified parameter from the given Java int value. |
void |
setLong(java.lang.String parameterName,
long x)
This method sets the specified parameter from the given Java long value. |
void |
setNull(java.lang.String parameterName,
int sqlType)
This method populates the specified parameter with a SQL NULL value for the specified type. |
void |
setNull(java.lang.String parameterName,
int sqlType,
java.lang.String typeName)
This method populates the specified parameter with a SQL NULL value for the specified type. |
void |
setObject(java.lang.String parameterName,
java.lang.Object x)
This method sets the specified parameter from the given Java Object value. |
void |
setObject(java.lang.String parameterName,
java.lang.Object x,
int targetSqlType)
This method sets the specified parameter from the given Java Object value. |
void |
setObject(java.lang.String parameterName,
java.lang.Object x,
int targetSqlType,
int scale)
This method sets the specified parameter from the given Java Object value. |
void |
setShort(java.lang.String parameterName,
short x)
This method sets the specified parameter from the given Java short value. |
void |
setString(java.lang.String parameterName,
java.lang.String x)
This method sets the specified parameter from the given Java String value. |
void |
setTime(java.lang.String parameterName,
java.sql.Time x)
This method sets the specified parameter from the given Java java.sql.Time value. |
void |
setTime(java.lang.String parameterName,
java.sql.Time x,
java.util.Calendar calendar)
This method sets the specified parameter from the given Java java.sql.Time value. |
void |
setTimestamp(java.lang.String parameterName,
java.sql.Timestamp x)
This method sets the specified parameter from the given Java java.sql.Timestamp value. |
void |
setTimestamp(java.lang.String parameterName,
java.sql.Timestamp x,
java.util.Calendar calendar)
This method sets the specified parameter from the given Java java.sql.Timestamp value. |
void |
setURL(java.lang.String parameterName,
java.net.URL x)
This method sets the value of the specified parameter to the specified java.net.URL |
private void |
setWasNull(int parameterIndex)
|
boolean |
wasNull()
This method tests whether the value of the last parameter that was fetched was actually a SQL NULL value. |
private boolean |
wasNullX()
|
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.sql.PreparedStatement |
addBatch, getMetaData, getParameterMetaData, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL |
| Methods inherited from interface org.apache.derby.client.am.PreparedStatementCallbackInterface |
completeDescribeInput, completeDescribeOutput |
| Methods inherited from interface org.apache.derby.client.am.StatementCallbackInterface |
accumulateWarning, completeExecute, completeExecuteCall, completeExecuteCall, completeExecuteCallOpenQuery, completeExecuteImmediate, completeExecuteSetStatement, completeOpenQuery, completePrepare, completePrepareDescribeOutput, completeSqlca, getConnectionCallbackInterface, getGuessedResultSetMetaData |
| Field Detail |
materialCallableStatement_
public MaterialPreparedStatement materialCallableStatement_
wasNull_
private int wasNull_
WAS_NULL
private static final int WAS_NULL
- See Also:
- Constant Field Values
WAS_NOT_NULL
private static final int WAS_NOT_NULL
- See Also:
- Constant Field Values
WAS_NULL_UNSET
private static final int WAS_NULL_UNSET
- See Also:
- Constant Field Values
| Constructor Detail |
CallableStatement
public CallableStatement(Agent agent, Connection connection, java.lang.String sql, int type, int concurrency, int holdability) throws SqlException
| Method Detail |
initCallableStatement
private void initCallableStatement()
reset
public void reset(boolean fullReset)
throws SqlException
- Overrides:
resetin classPreparedStatement
resetCallableStatement
public void resetCallableStatement(Agent agent, Connection connection, java.lang.String sql, int type, int concurrency, int holdability) throws SqlException
resetCallableStatement
public void resetCallableStatement(Agent agent, Connection connection, java.lang.String sql, Section section) throws SqlException
resetCallableStatement
public void resetCallableStatement(Agent agent, Connection connection, java.lang.String sql, Section section, ColumnMetaData parameterMetaData, ColumnMetaData resultSetMetaData) throws SqlException
finalize
protected void finalize()
throws java.lang.Throwable
- Description copied from class:
java.lang.Object - Called on an object by the Virtual Machine at most once,
at some point after the Object is determined unreachable
but before it is destroyed. You would think that this
means it eventually is called on every Object, but this is
not necessarily the case. If execution terminates
abnormally, garbage collection does not always happen.
Thus you cannot rely on this method to always work.
For finer control over garbage collection, use references
from the
java.lang.refpackage.Virtual Machines are free to not call this method if they can determine that it does nothing important; for example, if your class extends Object and overrides finalize to do simply
super.finalize().finalize() will be called by a java.lang.Thread that has no locks on any Objects, and may be called concurrently. There are no guarantees on the order in which multiple objects are finalized. This means that finalize() is usually unsuited for performing actions that must be thread-safe, and that your implementation must be use defensive programming if it is to always work.
If an Exception is thrown from finalize() during garbage collection, it will be patently ignored and the Object will still be destroyed.
It is allowed, although not typical, for user code to call finalize() directly. User invocation does not affect whether automatic invocation will occur. It is also permitted, although not recommended, for a finalize() method to "revive" an object by making it reachable from normal code again.
Unlike constructors, finalize() does not get called for an object's superclass unless the implementation specifically calls
super.finalize().The default implementation does nothing.
- Overrides:
finalizein classPreparedStatement
execute
public boolean execute()
throws SqlException
- Description copied from interface:
java.sql.PreparedStatement - This method executes a prepared SQL query.
Some prepared statements return multiple results; the execute method
handles these complex statements as well as the simpler form of
statements handled by executeQuery and executeUpdate.
- Specified by:
executein interfacejava.sql.PreparedStatement- Overrides:
executein classPreparedStatement
executeX
boolean executeX()
throws SqlException
executeQuery
public java.sql.ResultSet executeQuery() throws SqlException
- Description copied from interface:
java.sql.PreparedStatement - This method executes a prepared SQL query and returns its ResultSet.
- Specified by:
executeQueryin interfacejava.sql.PreparedStatement- Overrides:
executeQueryin classPreparedStatement
executeQueryX
ResultSet executeQueryX() throws SqlException
- Overrides:
executeQueryXin classPreparedStatement
executeUpdate
public int executeUpdate()
throws SqlException
- Description copied from interface:
java.sql.PreparedStatement - This method executes an SQL INSERT, UPDATE or DELETE statement. SQL
statements that return nothing such as SQL DDL statements can be executed.
- Specified by:
executeUpdatein interfacejava.sql.PreparedStatement- Overrides:
executeUpdatein classPreparedStatement
executeUpdateX
int executeUpdateX()
throws SqlException
- Overrides:
executeUpdateXin classPreparedStatement
clearParameters
public void clearParameters()
throws SqlException
- Description copied from interface:
java.sql.PreparedStatement - This method clears all of the input parameter that have been
set on this statement.
- Specified by:
clearParametersin interfacejava.sql.PreparedStatement- Overrides:
clearParametersin classPreparedStatement
registerOutParameter
public void registerOutParameter(int parameterIndex,
int jdbcType)
throws SqlException
- Description copied from interface:
java.sql.CallableStatement - This method registers the specified parameter as an output parameter
of the specified SQL type.
- Specified by:
registerOutParameterin interfacejava.sql.CallableStatement
registerOutParameterX
void registerOutParameterX(int parameterIndex,
int jdbcType)
throws SqlException
guessScaleForDecimalOrNumeric
private int guessScaleForDecimalOrNumeric(int parameterIndex)
throws SqlException
registerOutParameter
public void registerOutParameter(int parameterIndex,
int jdbcType,
int scale)
throws SqlException
- Description copied from interface:
java.sql.CallableStatement - This method registers the specified parameter as an output parameter
of the specified SQL type and scale.
- Specified by:
registerOutParameterin interfacejava.sql.CallableStatement
registerOutParameterX
private void registerOutParameterX(int parameterIndex,
int jdbcType,
int scale)
throws SqlException
registerOutParameter
public void registerOutParameter(int parameterIndex,
int jdbcType,
java.lang.String typeName)
throws SqlException
- Description copied from interface:
java.sql.CallableSt
JAVADOC