From 6934615b9736d0a777ce7f6933129ea1cdd2dd23 Mon Sep 17 00:00:00 2001 From: Warren Levy Date: Fri, 1 Dec 2000 01:48:34 +0000 Subject: Array.java: New file from classpath. * Array.java: New file from classpath. * BatchUpdateException.java: Ditto. * Blob.java: Ditto. * Clob.java: Ditto. * Ref.java: Ditto. * SQLData.java: Ditto. * SQLInput.java: Ditto. * SQLOutput.java: Ditto. * Struct.java: Ditto. * CallableStatement.java: Merged file from claspath. * Connection.java: Ditto. * DataTruncation.java: Ditto. * DatabaseMetaData.java: Ditto. * DriverManager.java: Ditto. * PreparedStatement.java: Ditto. * ResultSet.java: Ditto. * ResultSetMetaData.java: Ditto. * SQLException.java: Ditto. * SQLWarning.java: Ditto. * Statement.java: Ditto. * Types.java: Ditto. From-SVN: r37906 --- libjava/java/sql/CallableStatement.java | 157 +++++++++++++++++++++++++++++++- 1 file changed, 156 insertions(+), 1 deletion(-) (limited to 'libjava/java/sql/CallableStatement.java') diff --git a/libjava/java/sql/CallableStatement.java b/libjava/java/sql/CallableStatement.java index 75a6054ce7d..9a1547e94da 100644 --- a/libjava/java/sql/CallableStatement.java +++ b/libjava/java/sql/CallableStatement.java @@ -1,5 +1,5 @@ /* CallableStatement.java -- A statement for calling stored procedures. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -31,6 +31,7 @@ import java.io.InputStream; import java.io.Reader; import java.math.BigDecimal; import java.util.Calendar; +import java.util.Map; /** * This interface provides a mechanism for calling stored procedures. @@ -86,6 +87,22 @@ getObject(int index) throws SQLException; /*************************************************************************/ +/** + * This method returns the value of the specified parameter as a Java + * Object. + * + * @param index The index of the parameter to return. + * @param map The mapping to use for conversion from SQL to Java types. + * + * @return The parameter value as an Object. + * + * @exception SQLException If an error occurs. + */ +public abstract Object +getObject(int index, Map map) throws SQLException; + +/*************************************************************************/ + /** * This method returns the value of the specified parameter as a Java * boolean. @@ -191,6 +208,21 @@ getDouble(int index) throws SQLException; /*************************************************************************/ +/** + * This method returns the value of the specified parameter as a Java + * BigDecimal. + * + * @param index The index of the parameter to return. + * + * @return The parameter value as a BigDecimal. + * + * @exception SQLException If an error occurs. + */ +public abstract BigDecimal +getBigDecimal(int index) throws SQLException; + +/*************************************************************************/ + /** * This method returns the value of the specified parameter as a Java * BigDecimal. @@ -237,6 +269,22 @@ getDate(int index) throws SQLException; /*************************************************************************/ +/** + * This method returns the value of the specified parameter as a Java + * java.sql.Date. + * + * @param index The index of the parameter to return. + * @param calendar The Calendar to use for timezone and locale. + * + * @return The parameter value as a java.sql.Date. + * + * @exception SQLException If an error occurs. + */ +public abstract java.sql.Date +getDate(int index, Calendar calendar) throws SQLException; + +/*************************************************************************/ + /** * This method returns the value of the specified parameter as a Java * java.sql.Time. @@ -252,6 +300,22 @@ getTime(int index) throws SQLException; /*************************************************************************/ +/** + * This method returns the value of the specified parameter as a Java + * java.sql.Time. + * + * @param index The index of the parameter to return. + * @param calendar The Calendar to use for timezone and locale. + * + * @return The parameter value as a java.sql.Time. + * + * @exception SQLException If an error occurs. + */ +public abstract java.sql.Time +getTime(int index, Calendar calendar) throws SQLException; + +/*************************************************************************/ + /** * This method returns the value of the specified parameter as a Java * java.sql.Timestamp. @@ -267,6 +331,82 @@ getTimestamp(int index) throws SQLException; /*************************************************************************/ +/** + * This method returns the value of the specified parameter as a Java + * java.sql.Timestamp. + * + * @param index The index of the parameter to return. + * @param calendar The Calendar to use for timezone and locale. + * + * @return The parameter value as a java.sql.Timestamp. + * + * @exception SQLException If an error occurs. + */ +public abstract java.sql.Timestamp +getTimestamp(int index, Calendar calendar) throws SQLException; + +/*************************************************************************/ + +/** + * This method returns the value of the specified parameter as a Java + * Ref. + * + * @param index The index of the parameter to return. + * + * @return The parameter value as a Ref. + * + * @exception SQLException If an error occurs. + */ +public abstract Ref +getRef(int index) throws SQLException; + +/*************************************************************************/ + +/** + * This method returns the value of the specified parameter as a Java + * Blob. + * + * @param index The index of the parameter to return. + * + * @return The parameter value as a Blob. + * + * @exception SQLException If an error occurs. + */ +public abstract Blob +getBlob(int index) throws SQLException; + +/*************************************************************************/ + +/** + * This method returns the value of the specified parameter as a Java + * Clob. + * + * @param index The index of the parameter to return. + * + * @return The parameter value as a Clob. + * + * @exception SQLException If an error occurs. + */ +public abstract Clob +getClob(int index) throws SQLException; + +/*************************************************************************/ + +/** + * This method returns the value of the specified parameter as a Java + * Array. + * + * @param index The index of the parameter to return. + * + * @return The parameter value as a Array. + * + * @exception SQLException If an error occurs. + */ +public abstract Array +getArray(int index) throws SQLException; + +/*************************************************************************/ + /** * This method registers the specified parameter as an output parameter * of the specified SQL type. @@ -281,6 +421,21 @@ registerOutParameter(int index, int type) throws SQLException; /*************************************************************************/ +/** + * This method registers the specified parameter as an output parameter + * of the specified SQL type. + * + * @param index The index of the parameter to register as output. + * @param type The SQL type value from Types. + * @param name The user defined data type name. + * + * @exception SQLException If an error occurs. + */ +public abstract void +registerOutParameter(int index, int type, String name) throws SQLException; + +/*************************************************************************/ + /** * This method registers the specified parameter as an output parameter * of the specified SQL type and scale. -- cgit v1.2.3