From bf22c2097a4d98c5c9dcfc45dbb8a09f96557035 Mon Sep 17 00:00:00 2001 From: warrenl Date: Fri, 1 Dec 2000 01:48:34 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37906 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/java/sql/PreparedStatement.java | 159 ++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) (limited to 'libjava/java/sql/PreparedStatement.java') diff --git a/libjava/java/sql/PreparedStatement.java b/libjava/java/sql/PreparedStatement.java index 870f5fc46a5..dc8b1c4dea5 100644 --- a/libjava/java/sql/PreparedStatement.java +++ b/libjava/java/sql/PreparedStatement.java @@ -30,6 +30,7 @@ package java.sql; import java.io.InputStream; import java.io.Reader; import java.math.BigDecimal; +import java.util.Calendar; /** * This interface provides a mechanism for executing pre-compiled @@ -56,6 +57,21 @@ setNull(int index, int type) throws SQLException; /*************************************************************************/ +/** + * This method populates the specified parameter with a SQL NULL value + * for the specified type. + * + * @param index The index of the parameter to set. + * @param type The SQL type identifier of the parameter from Types + * @param name The name of the data type, for user defined types. + * + * @exception SQLException If an error occurs. + */ +public abstract void +setNull(int index, int type, String name) throws SQLException; + +/*************************************************************************/ + /** * This method sets the specified parameter from the given Java * boolean value. @@ -210,6 +226,21 @@ setDate(int index, java.sql.Date value) throws SQLException; /*************************************************************************/ +/** + * This method sets the specified parameter from the given Java + * java.sql.Date value. + * + * @param index The index of the parameter value to set. + * @param value The value of the parameter. + * @param calendar The Calendar to use for timezone and locale. + * + * @exception SQLException If an error occurs. + */ +public abstract void +setDate(int index, java.sql.Date value, Calendar calendar) throws SQLException; + +/*************************************************************************/ + /** * This method sets the specified parameter from the given Java * java.sql.Time value. @@ -224,6 +255,21 @@ setTime(int index, java.sql.Time value) throws SQLException; /*************************************************************************/ +/** + * This method sets the specified parameter from the given Java + * java.sql.Time value. + * + * @param index The index of the parameter value to set. + * @param value The value of the parameter. + * @param calendar The Calendar to use for timezone and locale. + * + * @exception SQLException If an error occurs. + */ +public abstract void +setTime(int index, java.sql.Time value, Calendar calendar) throws SQLException; + +/*************************************************************************/ + /** * This method sets the specified parameter from the given Java * java.sql.Timestamp value. @@ -238,6 +284,22 @@ setTimestamp(int index, java.sql.Timestamp value) throws SQLException; /*************************************************************************/ +/** + * This method sets the specified parameter from the given Java + * java.sql.Timestamp value. + * + * @param index The index of the parameter value to set. + * @param value The value of the parameter. + * @param calendar The Calendar to use for timezone and locale. + * + * @exception SQLException If an error occurs. + */ +public abstract void +setTimestamp(int index, java.sql.Timestamp value, Calendar calendar) + throws SQLException; + +/*************************************************************************/ + /** * This method sets the specified parameter from the given Java * ASCII InputStream value. @@ -283,6 +345,81 @@ setBinaryStream(int index, InputStream value, int length) throws SQLException; /*************************************************************************/ +/** + * This method sets the specified parameter from the given Java + * character Reader value. + * + * @param index The index of the parameter value to set. + * @param value The value of the parameter. + * @param length The number of bytes in the stream. + * + * @exception SQLException If an error occurs. + */ +public abstract void +setCharacterStream(int index, Reader value, int length) throws SQLException; + +/*************************************************************************/ + +/** + * This method sets the specified parameter from the given Java + * Ref value. The default object type to SQL type mapping + * will be used. + * + * @param index The index of the parameter value to set. + * @param value The value of the parameter. + * + * @exception SQLException If an error occurs. + */ +public abstract void +setRef(int index, Ref value) throws SQLException; + +/*************************************************************************/ + +/** + * This method sets the specified parameter from the given Java + * Blob value. The default object type to SQL type mapping + * will be used. + * + * @param index The index of the parameter value to set. + * @param value The value of the parameter. + * + * @exception SQLException If an error occurs. + */ +public abstract void +setBlob(int index, Blob value) throws SQLException; + +/*************************************************************************/ + +/** + * This method sets the specified parameter from the given Java + * Clob value. The default object type to SQL type mapping + * will be used. + * + * @param index The index of the parameter value to set. + * @param value The value of the parameter. + * + * @exception SQLException If an error occurs. + */ +public abstract void +setClob(int index, Clob value) throws SQLException; + +/*************************************************************************/ + +/** + * This method sets the specified parameter from the given Java + * Array value. The default object type to SQL type mapping + * will be used. + * + * @param index The index of the parameter value to set. + * @param value The value of the parameter. + * + * @exception SQLException If an error occurs. + */ +public abstract void +setArray(int index, Array value) throws SQLException; + +/*************************************************************************/ + /** * This method sets the specified parameter from the given Java * Object value. The default object type to SQL type mapping @@ -333,6 +470,16 @@ setObject(int index, Object value, int type, int scale) throws SQLException; /*************************************************************************/ +/** + * This method adds a set of parameters to the batch for JDBC 2.0. + * + * @exception SQLException If an error occurs. + */ +public abstract void +addBatch() throws SQLException; + +/*************************************************************************/ + /** * This method clears all of the input parameter that have been * set on this statement. @@ -344,6 +491,18 @@ clearParameters() throws SQLException; /*************************************************************************/ +/** + * This method returns meta data for the result set from this statement. + * + * @return Meta data for the result set from this statement. + * + * @exception SQLException If an error occurs. + */ +public abstract ResultSetMetaData +getMetaData() throws SQLException; + +/*************************************************************************/ + /** * This method executes a prepared SQL query. * Some prepared statements return multiple results; the execute method -- cgit v1.2.3