|
Mimer JDBC Engine 2.12 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--com.mimer.jdbc.Statement
|
+--com.mimer.jdbc.PreparedStatement
|
+--com.mimer.jdbc.CallableStatement
CallableStatement is the most generic object for executing SQL statements. Any SQL statement may be executed using CallableStatement. The main difference from PreparedStatement is that this object may handle output parameters.
| Field Summary |
| 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 |
| Method Summary | |
Array |
getArray(int parameterIndex)
Returns an SQL ARRAY object from an output parameter. |
BigDecimal |
getBigDecimal(int parameterIndex)
Returns a java.math.BigDecimal object without scale. |
BigDecimal |
getBigDecimal(int parameterIndex,
int scale)
Returns a java.math.BigDecimal object with scale specification. |
Blob |
getBlob(int parameterIndex)
Get a BLOB LOCATOR object. |
boolean |
getBoolean(int parameterIndex)
Returns a boolean. |
byte |
getByte(int parameterIndex)
Returns a byte. |
byte[] |
getBytes(int parameterIndex)
Returns an array of bytes. |
Clob |
getClob(int parameterIndex)
Get a CLOB LOCATOR object. |
Date |
getDate(int parameterIndex)
Returns a Date. |
Date |
getDate(int parameterIndex,
Calendar cal)
Returns a Date with time zone compensation. |
double |
getDouble(int parameterIndex)
Returns a double. |
float |
getFloat(int parameterIndex)
Returns a float. |
int |
getInt(int parameterIndex)
Returns an integer. |
long |
getLong(int parameterIndex)
Returns an long. |
Object |
getObject(int parameterIndex)
Returns an object. |
Object |
getObject(int parameterIndex,
Map map)
Returns an object using a type map. |
Ref |
getRef(int parameterIndex)
Returns an object reference. |
short |
getShort(int parameterIndex)
Returns a short. |
String |
getString(int parameterIndex)
Returns a string. |
Time |
getTime(int parameterIndex)
Returns a time. |
Time |
getTime(int parameterIndex,
Calendar cal)
Returns a Time with time zone compensation. |
Timestamp |
getTimestamp(int parameterIndex)
Returns a timestamp. |
Timestamp |
getTimestamp(int parameterIndex,
Calendar cal)
Get a timestamp with timezone compensation. |
void |
registerOutParameter(int parameterIndex,
int sqlType)
Registers a type to an output parameter. |
void |
registerOutParameter(int parameterIndex,
int sqlType,
int scale)
Registers a type to an output parameter. |
void |
registerOutParameter(int parameterIndex,
int sqlType,
String typeName)
Registers a type to an output parameter. |
boolean |
wasNull()
Returns true if the last column read was a NULL. |
| Methods inherited from class com.mimer.jdbc.PreparedStatement |
addBatch, clearBatch, clearParameters, close, execute, executeBatch, executeQuery, executeUpdate, getMetaData, 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 |
| Methods inherited from class com.mimer.jdbc.Statement |
addBatch, cancel, clearStatement, clearWarnings, execute, executeQuery, executeUpdate, getConnection, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.sql.CallableStatement |
getArray, getBigDecimal, getBlob, getBoolean, getByte, getBytes, getClob, getDate, getDate, getDouble, getFloat, getInt, getLong, getObject, getObject, getRef, getShort, getString, getTime, getTime, getTimestamp, getTimestamp, getURL, getURL, 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, setURL |
| Methods inherited from interface java.sql.PreparedStatement |
addBatch, 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 |
| Method Detail |
public Array getArray(int parameterIndex)
throws SQLException
getArray in interface CallableStatementparameterIndex - The parameter number.
Always - throws SQLException, with SQLSTATE 2200G (type mismatch).
SQLException
public BigDecimal getBigDecimal(int parameterIndex)
throws SQLException
getBigDecimal in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 22018 is thrown if a character value could not be casted to a numeric value. 2200G is thrown if the parameter type wasn't castable to a string, see ResultSet for an overview of which parameter types are castable to which Java types.
public BigDecimal getBigDecimal(int parameterIndex,
int scale)
throws SQLException
getBigDecimal in interface CallableStatementparameterIndex - The parameter number.scale - The maximum number of digits to the right of the decimal point.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 22018 is thrown if a character value could not be casted to a numeric value. 2200G is thrown if the parameter type wasn't castable to a string, see ResultSet for an overview of which parameter types are castable to which Java types.
public Blob getBlob(int parameterIndex)
throws SQLException
getBlob in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid.
public boolean getBoolean(int parameterIndex)
throws SQLException
If the parameter is a CHARACTER, CHARACTER VARYING, NATIONAL CHARACTER or
NATIONAL CHARACTER VARYING, this returns true if the character has the values "true" or "1".
getBoolean in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 2200G is thrown if the parameter type wasn't castable to a string, see ResultSet for an overview of which parameter types are castable to which Java types.
public byte getByte(int parameterIndex)
throws SQLException
getByte in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 22003 is thrown if the numeric value could not be fitted into a byte. 22018 is thrown if a character value could not be casted to a numeric value. 2200G is thrown if the parameter type wasn't castable to a string, see ResultSet for an overview of which parameter types are castable to which Java types.
public byte[] getBytes(int parameterIndex)
throws SQLException
getBytes in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 08S01 is thrown on a network receive error. 2200G is thrown if the parameter type wasn't castable to a string, see ResultSet for an overview of which parameter types are castable to which Java types.
public Clob getClob(int parameterIndex)
throws SQLException
getClob in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid.
public Date getDate(int parameterIndex)
throws SQLException
See ResultSet.getDate(int) for information about casting a CHARACTER, CHARACTER VARYING, NATIONAL CHARACTER or NATIONAL CHARACTER VARYING output parameter to java.sql.Date object.
getDate in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 22018 if the parameter type was a character which could not be casted to a date. 2200G is thrown if the parameter type wasn't castable to a date, see ResultSet for an overview of which parameter types are castable to which Java types.getDate(int,Calendar)
public Date getDate(int parameterIndex,
Calendar cal)
throws SQLException
See ResultSet.getDate(int) for information about casting a CHARACTER, CHARACTER VARYING, NATIONAL CHARACTER or NATIONAL CHARACTER VARYING output parameter to java.sql.Date object.
getDate in interface CallableStatementparameterIndex - The parameter number.cal - Calendar object defining time zone.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 22018 if the parameter type was a character which could not be casted to a date. 2200G is thrown if the parameter type wasn't castable to a date, see ResultSet for an overview of which parameter types are castable to which Java types.
public double getDouble(int parameterIndex)
throws SQLException
getDouble in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement. 07009 is thrown if the parameterIndex is invalid. 22003 is thrown if the numeric value could not be fitted into a double. 22018 is thrown if a character value could not be casted to a numeric value. 2200G is thrown if the parameter type wasn't castable to a string, see ResultSet for an overview of which parameter types are castable to which Java types.
public float getFloat(int parameterIndex)
throws SQLException
getFloat in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 22003 is thrown if the numeric value could not be fitted into a float. 22018 is thrown if a character value could not be casted to a numeric value. 2200G is thrown if the parameter type wasn't castable to a string, see ResultSet for an overview of which parameter types are castable to which Java types.
public int getInt(int parameterIndex)
throws SQLException
getInt in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 22003 is thrown if the numeric value could not be fitted into an int. 22018 is thrown if a character value could not be casted to a numeric value. 2200G is thrown if the parameter type wasn't castable to a string, see ResultSet for an overview of which parameter types are castable to which Java types.
public long getLong(int parameterIndex)
throws SQLException
getLong in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 22003 is thrown if the numeric value could not be fitted into an long. 22018 is thrown if a character value could not be casted to a numeric value. 2200G is thrown if the parameter type wasn't castable to a string, see ResultSet for an overview of which parameter types are castable to which Java types.
public Object getObject(int parameterIndex)
throws SQLException
getObject in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is not valid.
public Object getObject(int parameterIndex,
Map map)
throws SQLException
getObject in interface CallableStatementparameterIndex - The parameter number.map - The type map to use.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is not valid.
public Ref getRef(int parameterIndex)
throws SQLException
getRef in interface CallableStatementparameterIndex - The parameter number.
Always - throws SQLException, with SQLSTATE 2200G (type mismatch).
SQLException
public short getShort(int parameterIndex)
throws SQLException
getShort in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 22003 is thrown if the numeric value could not be fitted into an short. 22018 is thrown if a character value could not be casted to a numeric value. 2200G is thrown if the parameter type wasn't castable to a short, see ResultSet for an overview of which parameter types are castable to which Java types.
public String getString(int parameterIndex)
throws SQLException
getString in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid.
public Time getTime(int parameterIndex)
throws SQLException
See ResultSet.getTime(int) for information about casting a CHARACTER, CHARACTER VARYING, NATIONAL CHARACTER or NATIONAL CHARACTER VARYING output parameter to java.sql.Time object.
A warning (SQLWarning SQLSTATE 01S07) is registered if the time or timestamp contains a fraction that was truncated because the java time object doesn't hold second fractions.
getTime in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 22018 is thrown if a character value could not be casted to a time value. 2200G is thrown if the parameter type wasn't castable to a time, see ResultSet for an overview of which parameter types are castable to which Java types.
public Time getTime(int parameterIndex,
Calendar cal)
throws SQLException
See ResultSet.getTime(int) for information about casting a CHARACTER, CHARACTER VARYING, NATIONAL CHARACTER or NATIONAL CHARACTER VARYING output parameter to java.sql.Time object.
getTime in interface CallableStatementparameterIndex - The parameter number.cal - Calendar object defining time zone.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 22018 if the parameter type was a character which could not be casted to a time. 2200G is thrown if the parameter type wasn't castable to a time, see ResultSet for an overview of which parameter types are castable to which Java types.
public Timestamp getTimestamp(int parameterIndex)
throws SQLException
See ResultSet.getTime(int) for information about casting a CHARACTER, CHARACTER VARYING, NATIONAL CHARACTER or NATIONAL CHARACTER VARYING output parameter to java.sql.Timestamp object.
getTimestamp in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 22018 is thrown if a character value could not be casted to a timestamp value. 2200G is thrown if the parameter type wasn't castable to a timestamp, see ResultSet for an overview of which parameter types are castable to which Java types.
public Timestamp getTimestamp(int parameterIndex,
Calendar cal)
throws SQLException
See ResultSet.getTime(int) for information about casting a CHARACTER, CHARACTER VARYING, NATIONAL CHARACTER or NATIONAL CHARACTER VARYING output parameter to java.sql.Timestamp object.
getTimestamp in interface CallableStatementparameterIndex - The parameter number.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid. 22018 if the parameter type was a character which could not be casted to a timestamp. 2200G is thrown if the parameter type wasn't castable to a timestamp, see ResultSet for an overview of which parameter types are castable to which Java types.getTimestamp(int)
public void registerOutParameter(int parameterIndex,
int sqlType)
throws SQLException
registerOutParameter in interface CallableStatementparameterIndex - The parameter number.sqlType - The data type.
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid.
public void registerOutParameter(int parameterIndex,
int sqlType,
int scale)
throws SQLException
registerOutParameter in interface CallableStatementparameterIndex - The parameter number.sqlType - The data type.scale -
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid.
public void registerOutParameter(int parameterIndex,
int sqlType,
String typeName)
throws SQLException
This method is supposed to be used in conjunction with user-defined types and references. Mimer SQL supports neither of these features. The
typeName argument is therefore ignored.
registerOutParameter in interface CallableStatementparameterIndex - The parameter number.sqlType - The data type.typeName -
SQLException - if an error occurs. SQLSTATE HY010 is thrown if the CallableStatement is not open. 07009 is thrown if the parameterIndex is invalid.
public boolean wasNull()
throws SQLException
wasNull in interface CallableStatementSQLException - if an error occurs.
|
Mimer JDBC Engine 2.12 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||