Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.impl.jdbc
Class EmbedCallableStatement  view EmbedCallableStatement download EmbedCallableStatement.java

java.lang.Object
  extended byorg.apache.derby.impl.jdbc.ConnectionChild
      extended byorg.apache.derby.impl.jdbc.EmbedStatement
          extended byorg.apache.derby.impl.jdbc.EmbedPreparedStatement
              extended byorg.apache.derby.impl.jdbc.EmbedCallableStatement
All Implemented Interfaces:
java.sql.CallableStatement, java.sql.PreparedStatement, java.sql.Statement
Direct Known Subclasses:
EmbedCallableStatement169, EmbedCallableStatement20

public abstract class EmbedCallableStatement
extends EmbedPreparedStatement
implements java.sql.CallableStatement

Local implementation.


Field Summary
private  boolean hasReturnOutputParameter
           
protected  boolean wasNull
           
 
Fields inherited from class org.apache.derby.impl.jdbc.EmbedPreparedStatement
preparedStatement, rMetaData
 
Fields inherited from class org.apache.derby.impl.jdbc.EmbedStatement
active, batchStatements, CLOSE, cursorName, factory, forMetaData, lcc, localConn, MaxFieldSize, maxRows, NOCLOSE, results, resultSetConcurrency, resultSetHoldability, resultSetType, SQLText, updateCount
 
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
EmbedCallableStatement(EmbedConnection conn, java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
           
 
Method Summary
 void addBatch()
          This method adds a set of parameters to the batch for JDBC 2.0.
protected  void checkRequiresCallableStatement(org.apache.derby.iapi.sql.Activation activation)
          Check to see if a statement requires to be executed via a callable statement.
protected  boolean executeStatement(org.apache.derby.iapi.sql.Activation a, boolean executeQuery, boolean executeUpdate)
          Execute the current statement.
 java.sql.Blob getBlob(int i)
          JDBC 2.0 Get a BLOB OUT parameter.
 boolean getBoolean(int parameterIndex)
          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[] getBytes(int parameterIndex)
          This method returns the value of the specified parameter as a Java byte array.
 java.sql.Clob getClob(int i)
          JDBC 2.0 Get a CLOB OUT parameter.
 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)
          Get the value of a SQL DATE parameter as a java.sql.Date object
 double getDouble(int parameterIndex)
          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.
 int getInt(int parameterIndex)
          This method returns the value of the specified parameter as a Java int.
 long getLong(int parameterIndex)
          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.
 short getShort(int parameterIndex)
          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.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)
          Get the value of a SQL TIME parameter as a java.sql.Time object.
 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)
          Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp object.
 java.net.URL getURL(int parameterIndex)
          JDBC 3.0 Retrieve the value of the designated JDBC DATALINK parameter as a java.net.URL object
 java.net.URL getURL(java.lang.String parameterName)
          JDBC 3.0 Retrieves the value of a JDBC DATALINK parameter as a java.net.URL object
 void registerOutParameter(int parameterIndex, int sqlType)
          This method registers the specified parameter as an output parameter of the specified SQL type.
 void registerOutParameter(int parameterIndex, int sqlType, int scale)
          This method registers the specified parameter as an output parameter of the specified SQL type and scale.
 void registerOutParameter(int parameterIndex, int sqlType, java.lang.String typeName)
          JDBC 2.0 Registers the designated output parameter
 void setURL(java.lang.String parameterName, java.net.URL val)
          JDBC 3.0 Sets the designated parameter to the given java.net.URL object.
 boolean wasNull()
          This method tests whether the value of the last parameter that was fetched was actually a SQL NULL value.
 
Methods inherited from class org.apache.derby.impl.jdbc.EmbedPreparedStatement
addBatch, clearParameters, closeActions, dataTypeConversion, execute, execute, execute, execute, execute, executeBatchElement, executeQuery, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdate, finalize, getEmbedParameterSetMetaData, getMetaData, getParameterJDBCType, getParms, getTypes, newEmbedResultSetMetaData, setAsciiStream, setBinaryStream, setBinaryStreamInternal, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStreamInternal, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setObjectConvert, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL, toString, transferParameters
 
Methods inherited from class org.apache.derby.impl.jdbc.EmbedStatement
cancel, checkExecStatus, checkIfInMiddleOfBatch, checkStatus, clearBatch, clearResultSets, clearWarnings, close, commitIfAutoCommit, commitIfNeeded, execute, executeBatch, getCal, getConnection, getConnectionSynchronization, getContextManager, getDatabase, getEmbedConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getParameterValueSet, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getSQLText, getUpdateCount, getWarnings, getWarnings, handleException, handleException, needCommit, newSQLException, newSQLException, newSQLException, restoreContextStack, resultSetClosing, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout, setupContextStack, transferBatch
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.sql.CallableStatement
getArray, getArray, getBigDecimal, getBigDecimal, getBigDecimal, getBlob, getBoolean, getByte, getBytes, getClob, getDate, getDate, getDouble, getFloat, getInt, getLong, getObject, getObject, getObject, getRef, getRef, getShort, getString, getTime, getTime, getTimestamp, getTimestamp, registerOutParameter, registerOutParameter, registerOutParameter, setAsciiStream, setBigDecimal, setBinaryStream, setBoolean, setByte, setBytes, setCharacterStream, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setShort, setString, setTime, setTime, setTimestamp, setTimestamp
 
Methods inherited from interface java.sql.PreparedStatement
clearParameters, execute, executeQuery, executeUpdate, 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 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, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
 

Field Detail

hasReturnOutputParameter

private boolean hasReturnOutputParameter

wasNull

protected boolean wasNull
Constructor Detail

EmbedCallableStatement

public EmbedCallableStatement(EmbedConnection conn,
                              java.lang.String sql,
                              int resultSetType,
                              int resultSetConcurrency,
                              int resultSetHoldability)
                       throws java.sql.SQLException
Method Detail

checkRequiresCallableStatement

protected void checkRequiresCallableStatement(org.apache.derby.iapi.sql.Activation activation)
Description copied from class: EmbedStatement
Check to see if a statement requires to be executed via a callable statement.

Overrides:
checkRequiresCallableStatement in class EmbedStatement

executeStatement

protected final boolean executeStatement(org.apache.derby.iapi.sql.Activation a,
                                         boolean executeQuery,
                                         boolean executeUpdate)
                                  throws java.sql.SQLException
Description copied from class: EmbedStatement
Execute the current statement.

Overrides:
executeStatement in class EmbedPreparedStatement

registerOutParameter

public final void registerOutParameter(int parameterIndex,
                                       int sqlType)
                                throws java.sql.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:
registerOutParameter in interface java.sql.CallableStatement

registerOutParameter

public final void registerOutParameter(int parameterIndex,
                                       int sqlType,
                                       int scale)
                                throws java.sql.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:
registerOutParameter in interface java.sql.CallableStatement

registerOutParameter

public void registerOutParameter(int parameterIndex,
                                 int sqlType,
                                 java.lang.String typeName)
                          throws java.sql.SQLException
JDBC 2.0 Registers the designated output parameter

Specified by:
registerOutParameter in interface java.sql.CallableStatement

wasNull

public boolean wasNull()
                throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method tests whether the value of the last parameter that was fetched was actually a SQL NULL value.

Specified by:
wasNull in interface java.sql.CallableStatement

getString

public java.lang.String getString(int parameterIndex)
                           throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method returns the value of the specified parameter as a Java String.

Specified by:
getString in interface java.sql.CallableStatement

getBoolean

public boolean getBoolean(int parameterIndex)
                   throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method returns the value of the specified parameter as a Java boolean.

Specified by:
getBoolean in interface java.sql.CallableStatement

getByte

public byte getByte(int parameterIndex)
             throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method returns the value of the specified parameter as a Java byte.

Specified by:
getByte in interface java.sql.CallableStatement

getShort

public short getShort(int parameterIndex)
               throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method returns the value of the specified parameter as a Java short.

Specified by:
getShort in interface java.sql.CallableStatement

getInt

public int getInt(int parameterIndex)
           throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method returns the value of the specified parameter as a Java int.

Specified by:
getInt in interface java.sql.CallableStatement

getLong

public long getLong(int parameterIndex)
             throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method returns the value of the specified parameter as a Java long.

Specified by:
getLong in interface java.sql.CallableStatement

getFloat

public float getFloat(int parameterIndex)
               throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method returns the value of the specified parameter as a Java float.

Specified by:
getFloat in interface java.sql.CallableStatement

getDouble

public double getDouble(int parameterIndex)
                 throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method returns the value of the specified parameter as a Java double.

Specified by:
getDouble in interface java.sql.CallableStatement

getBytes

public byte[] getBytes(int parameterIndex)
                throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method returns the value of the specified parameter as a Java byte array.

Specified by:
getBytes in interface java.sql.CallableStatement

getDate

public java.sql.Date getDate(int parameterIndex)
                      throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method returns the value of the specified parameter as a Java java.sql.Date.

Specified by:
getDate in interface java.sql.CallableStatement

getTime

public java.sql.Time getTime(int parameterIndex)
                      throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method returns the value of the specified parameter as a Java java.sql.Time.

Specified by:
getTime in interface java.sql.CallableStatement

getTimestamp

public java.sql.Timestamp getTimestamp(int parameterIndex)
                                throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method returns the value of the specified parameter as a Java java.sql.Timestamp.

Specified by:
getTimestamp in interface java.sql.CallableStatement

getDate

public java.sql.Date getDate(int parameterIndex,
                             java.util.Calendar cal)
                      throws java.sql.SQLException
Get the value of a SQL DATE parameter as a java.sql.Date object

Specified by:
getDate in interface java.sql.CallableStatement

getTime

public java.sql.Time getTime(int parameterIndex,
                             java.util.Calendar cal)
                      throws java.sql.SQLException
Get the value of a SQL TIME parameter as a java.sql.Time object.

Specified by:
getTime in interface java.sql.CallableStatement

getTimestamp

public java.sql.Timestamp getTimestamp(int parameterIndex,
                                       java.util.Calendar cal)
                                throws java.sql.SQLException
Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp object.

Specified by:
getTimestamp in interface java.sql.CallableStatement

getObject

public java.lang.Object getObject(int parameterIndex)
                           throws java.sql.SQLException
Description copied from interface: java.sql.CallableStatement
This method returns the value of the specified parameter as a Java Object.

Specified by:
getObject in interface java.sql.CallableStatement

getURL

public java.net.URL getURL(int parameterIndex)
                    throws java.sql.SQLException
JDBC 3.0 Retrieve the value of the designated JDBC DATALINK parameter as a java.net.URL object

Specified by:
getURL in interface java.sql.CallableStatement

setURL

public void setURL(java.lang.String parameterName,
                   java.net.URL val)
            throws java.sql.SQLException
JDBC 3.0 Sets the designated parameter to the given java.net.URL object. The driver converts this to an SQL DATALINK value when it sends it to the database.

Specified by:
setURL in interface java.sql.CallableStatement

getURL

public java.net.URL getURL(java.lang.String parameterName)
                    throws java.sql.SQLException
JDBC 3.0 Retrieves the value of a JDBC DATALINK parameter as a java.net.URL object

Specified by:
getURL in interface java.sql.CallableStatement

getBlob

public java.sql.Blob getBlob(int i)
                      throws java.sql.SQLException
JDBC 2.0 Get a BLOB OUT parameter.

Specified by:
getBlob in interface java.sql.CallableStatement

getClob

public java.sql.Clob getClob(int i)
                      throws java.sql.SQLException
JDBC 2.0 Get a CLOB OUT parameter.

Specified by:
getClob in interface java.sql.CallableStatement

addBatch

public void addBatch()
              throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method adds a set of parameters to the batch for JDBC 2.0.

Specified by:
addBatch in interface java.sql.PreparedStatement
Overrides:
addBatch in class EmbedPreparedStatement