summaryrefslogtreecommitdiff
path: root/libjava/classpath/java/sql
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/sql')
-rw-r--r--libjava/classpath/java/sql/Array.java32
-rw-r--r--libjava/classpath/java/sql/Blob.java96
-rw-r--r--libjava/classpath/java/sql/CallableStatement.java500
-rw-r--r--libjava/classpath/java/sql/Clob.java147
-rw-r--r--libjava/classpath/java/sql/Connection.java136
-rw-r--r--libjava/classpath/java/sql/DatabaseMetaData.java166
-rw-r--r--libjava/classpath/java/sql/Date.java6
-rw-r--r--libjava/classpath/java/sql/Driver.java6
-rw-r--r--libjava/classpath/java/sql/DriverManager.java17
-rw-r--r--libjava/classpath/java/sql/PreparedStatement.java124
-rw-r--r--libjava/classpath/java/sql/ResultSet.java422
-rw-r--r--libjava/classpath/java/sql/ResultSetMetaData.java86
-rw-r--r--libjava/classpath/java/sql/SQLData.java4
-rw-r--r--libjava/classpath/java/sql/SQLOutput.java72
-rw-r--r--libjava/classpath/java/sql/SQLWarning.java6
-rw-r--r--libjava/classpath/java/sql/Statement.java37
-rw-r--r--libjava/classpath/java/sql/Time.java7
-rw-r--r--libjava/classpath/java/sql/Timestamp.java34
18 files changed, 1264 insertions, 634 deletions
diff --git a/libjava/classpath/java/sql/Array.java b/libjava/classpath/java/sql/Array.java
index 51628757885..c3c42d9cb57 100644
--- a/libjava/classpath/java/sql/Array.java
+++ b/libjava/classpath/java/sql/Array.java
@@ -1,5 +1,5 @@
/* Array.java -- Interface for accessing SQL array object
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,7 +50,7 @@ public interface Array
* Returns the name of the SQL type of the elements in this
* array. This name is database specific.
*
- * @param The name of the SQL type of the elements in this array.
+ * @return The name of the SQL type of the elements in this array.
* @exception SQLException If an error occurs.
*/
String getBaseTypeName() throws SQLException;
@@ -87,22 +87,22 @@ public interface Array
Object getArray(Map map) throws SQLException;
/**
- * Returns a portion of this array starting at <code>index</code>
+ * Returns a portion of this array starting at <code>start</code>
* into the array and continuing for <code>count</code>
* elements. Fewer than the requested number of elements will be
* returned if the array does not contain the requested number of elements.
* The object returned will be an array of Java objects of
* the appropriate types.
*
- * @param offset The offset into this array to start returning elements from.
+ * @param start The index into this array to start returning elements from.
* @param count The requested number of elements to return.
* @return The requested portion of the array.
* @exception SQLException If an error occurs.
*/
- Object getArray(long index, int count) throws SQLException;
+ Object getArray(long start, int count) throws SQLException;
/**
- * This method returns a portion of this array starting at <code>index</code>
+ * This method returns a portion of this array starting at <code>start</code>
* into the array and continuing for <code>count</code>
* elements. Fewer than the requested number of elements will be
* returned if the array does not contain the requested number of elements.
@@ -110,13 +110,13 @@ public interface Array
* <code>Map</code> will be used for overriding selected SQL type to
* Java class mappings.
*
- * @param offset The offset into this array to start returning elements from.
+ * @param start The index into this array to start returning elements from.
* @param count The requested number of elements to return.
* @param map A mapping of SQL types to Java classes.
* @return The requested portion of the array.
* @exception SQLException If an error occurs.
*/
- Object getArray(long index, int count, Map map) throws SQLException;
+ Object getArray(long start, int count, Map map) throws SQLException;
/**
* Returns the elements in the array as a <code>ResultSet</code>.
@@ -147,24 +147,24 @@ public interface Array
/**
* This method returns a portion of the array as a <code>ResultSet</code>.
- * The returned portion will start at <code>index</code> into the
+ * The returned portion will start at <code>start</code> into the
* array and up to <code>count</code> elements will be returned.
* <p>
* Each row of the result set will have two columns. The first will be
* the index into the array of that row's contents. The second will be
* the actual value of that array element.
*
- * @param offset The index into the array to start returning elements from.
- * @param length The requested number of elements to return.
+ * @param start The index into the array to start returning elements from.
+ * @param count The requested number of elements to return.
* @return The requested elements of this array as a <code>ResultSet</code>.
* @exception SQLException If an error occurs.
* @see ResultSet
*/
- ResultSet getResultSet(long index, int count) throws SQLException;
+ ResultSet getResultSet(long start, int count) throws SQLException;
/**
* This method returns a portion of the array as a <code>ResultSet</code>.
- * The returned portion will start at <code>index</code> into the
+ * The returned portion will start at <code>start</code> into the
* array and up to <code>count</code> elements will be returned.
*
* <p> Each row of the result set will have two columns. The first will be
@@ -173,13 +173,13 @@ public interface Array
* will be used to override selected default mappings of SQL types to
* Java classes.</p>
*
- * @param offset The index into the array to start returning elements from.
- * @param length The requested number of elements to return.
+ * @param start The index into the array to start returning elements from.
+ * @param count The requested number of elements to return.
* @param map A mapping of SQL types to Java classes.
* @return The requested elements of this array as a <code>ResultSet</code>.
* @exception SQLException If an error occurs.
* @see ResultSet
*/
- ResultSet getResultSet(long index, int count, Map map)
+ ResultSet getResultSet(long start, int count, Map map)
throws SQLException;
}
diff --git a/libjava/classpath/java/sql/Blob.java b/libjava/classpath/java/sql/Blob.java
index 616839d01be..c662aad5f2f 100644
--- a/libjava/classpath/java/sql/Blob.java
+++ b/libjava/classpath/java/sql/Blob.java
@@ -1,5 +1,5 @@
/* Blob.java -- Access a SQL Binary Large OBject.
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,48 +41,51 @@ import java.io.InputStream;
import java.io.OutputStream;
/**
- * This interface specified methods for accessing a SQL BLOB (Binary
- * Large OBject) type.
- *
+ * This interface specified methods for accessing a SQL BLOB (Binary Large
+ * OBject) type.
+ *
* @author Aaron M. Renn (arenn@urbanophile.com)
* @since 1.2
*/
-public interface Blob
+public interface Blob
{
/**
- * This method returns the number of bytes in the BLOB.
- *
- * @return The number of bytes in the BLOB.
+ * This method returns the number of bytes in this <code>Blob</code>.
+ *
+ * @return The number of bytes in this <code>Blob</code>.
* @exception SQLException If an error occurs.
*/
long length() throws SQLException;
/**
- * This method returns up to the requested bytes of this BLOB as a
- * <code>byte</code> array.
- *
- * @param pos The index into the BLOB to start returning bytes from.
- * @param length The requested number of bytes to return.
- * @return The requested bytes from the BLOB.
+ * This method returns up to the requested bytes of this <code>Blob</code>
+ * as a <code>byte</code> array.
+ *
+ * @param start The index into this <code>Blob</code> to start returning
+ * bytes from.
+ * @param count The requested number of bytes to return.
+ * @return The requested bytes from this <code>Blob</code>.
* @exception SQLException If an error occurs.
*/
- byte[] getBytes(long pos, int length) throws SQLException;
+ byte[] getBytes(long start, int count) throws SQLException;
/**
- * This method returns a stream that will read the bytes of the BLOB.
- *
- * @return A stream that will read the bytes of the BLOB.
+ * This method returns a stream that will read the bytes of this
+ * <code>Blob</code>.
+ *
+ * @return A stream that will read the bytes of this <code>Blob</code>.
* @exception SQLException If an error occurs.
*/
InputStream getBinaryStream() throws SQLException;
/**
- * This method returns the index into the BLOB at which the first instance
- * of the specified bytes occur. The searching starts at the specified
- * index into the BLOB.
- *
+ * This method returns the index into this <code>Blob</code> at which the
+ * first instance of the specified bytes occur. The searching starts at the
+ * specified index into this <code>Blob</code>.
+ *
* @param pattern The byte pattern to search for.
- * @param offset The index into the BLOB to starting searching for the pattern.
+ * @param start The index into this <code>Blob</code> to start searching for
+ * the pattern.
* @return The offset at which the pattern is first found, or -1 if the
* pattern is not found.
* @exception SQLException If an error occurs.
@@ -90,14 +93,15 @@ public interface Blob
long position(byte[] pattern, long start) throws SQLException;
/**
- * This method returns the index into the BLOB at which the first instance
- * of the specified pattern occurs. The searching starts at the specified
- * index into this BLOB. The bytes in the specified <code>Blob</code> are
- * used as the search pattern.
- *
+ * This method returns the index into this <code>Blob</code> at which the
+ * first instance of the specified pattern occurs. The searching starts at the
+ * specified index into this <code>Blob</code>. The bytes in the specified
+ * <code>Blob</code> are used as the search pattern.
+ *
* @param pattern The <code>Blob</code> containing the byte pattern to
- * search for.
- * @param offset The index into the BLOB to starting searching for the pattern.
+ * search for.
+ * @param start The index into this <code>Blob</code> to start searching for
+ * the pattern.
* @return The offset at which the pattern is first found, or -1 if the
* pattern is not found.
* @exception SQLException If an error occurs.
@@ -105,27 +109,49 @@ public interface Blob
long position(Blob pattern, long start) throws SQLException;
/**
+ * Writes the specified data into this <code>Blob</code>, starting at the
+ * specified index.
+ *
+ * @param start The index at which the writing starts.
+ * @param bytes The data to write.
* @exception SQLException If an error occurs.
* @since 1.4
*/
- int setBytes(long pos, byte[] bytes) throws SQLException;
+ int setBytes(long start, byte[] bytes) throws SQLException;
/**
+ * Writes a portion of the specified data into this <code>Blob</code>,
+ * starting at the specified index.
+ *
+ * @param startWrite The index into this <code>Blob</code> at which writing
+ * starts.
+ * @param bytes The data to write a portion of.
+ * @param startRead The offset into the data where the portion to copy starts.
+ * @param count The number of bytes to write.
* @exception SQLException If an error occurs.
* @since 1.4
*/
- int setBytes(long pos, byte[] bytes, int offset, int len)
- throws SQLException;
+ int setBytes(long startWrite, byte[] bytes, int startRead, int count)
+ throws SQLException;
/**
+ * Returns a binary stream that writes into this <code>Blob</code>,
+ * starting at the specified index.
+ *
+ * @param start The index at which the writing starts.
+ * @return A binary stream to write into this <code>Blob</code>.
* @exception SQLException If an error occurs.
* @since 1.4
*/
- OutputStream setBinaryStream(long pos) throws SQLException;
+ OutputStream setBinaryStream(long start) throws SQLException;
/**
+ * Truncates this <code>Blob</code> to be at most the specified number of
+ * bytes long.
+ *
+ * @param count The length this <code>Blob</code> is truncated to.
* @exception SQLException If an error occurs.
* @since 1.4
*/
- void truncate(long len) throws SQLException;
+ void truncate(long count) throws SQLException;
}
diff --git a/libjava/classpath/java/sql/CallableStatement.java b/libjava/classpath/java/sql/CallableStatement.java
index 452294144a0..75eade77480 100644
--- a/libjava/classpath/java/sql/CallableStatement.java
+++ b/libjava/classpath/java/sql/CallableStatement.java
@@ -1,5 +1,5 @@
/* CallableStatement.java -- A statement for calling stored procedures.
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,10 +56,10 @@ public interface CallableStatement extends PreparedStatement
* of the specified SQL type.
*
* @param index The index of the parameter to register as output.
- * @param type The SQL type value from <code>Types</code>.
+ * @param sqlType The SQL type value from <code>Types</code>.
* @exception SQLException If an error occurs.
*/
- void registerOutParameter(int parameterIndex, int sqlType)
+ void registerOutParameter(int index, int sqlType)
throws SQLException;
/**
@@ -67,11 +67,11 @@ public interface CallableStatement extends PreparedStatement
* of the specified SQL type and scale.
*
* @param index The index of the parameter to register as output.
- * @param type The SQL type value from <code>Types</code>.
+ * @param sqlType The SQL type value from <code>Types</code>.
* @param scale The scale of the value that will be returned.
* @exception SQLException If an error occurs.
*/
- void registerOutParameter(int parameterIndex, int sqlType, int scale)
+ void registerOutParameter(int index, int sqlType, int scale)
throws SQLException;
/**
@@ -92,7 +92,7 @@ public interface CallableStatement extends PreparedStatement
* @return The parameter value as a <code>String</code>.
* @exception SQLException If an error occurs.
*/
- String getString(int parameterIndex) throws SQLException;
+ String getString(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
@@ -102,7 +102,7 @@ public interface CallableStatement extends PreparedStatement
* @return The parameter value as a <code>boolean</code>.
* @exception SQLException If an error occurs.
*/
- boolean getBoolean(int parameterIndex) throws SQLException;
+ boolean getBoolean(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
@@ -112,7 +112,7 @@ public interface CallableStatement extends PreparedStatement
* @return The parameter value as a <code>byte</code>.
* @exception SQLException If an error occurs.
*/
- byte getByte(int parameterIndex) throws SQLException;
+ byte getByte(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
@@ -122,7 +122,7 @@ public interface CallableStatement extends PreparedStatement
* @return The parameter value as a <code>short</code>.
* @exception SQLException If an error occurs.
*/
- short getShort(int parameterIndex) throws SQLException;
+ short getShort(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
@@ -132,7 +132,7 @@ public interface CallableStatement extends PreparedStatement
* @return The parameter value as a <code>int</code>.
* @exception SQLException If an error occurs.
*/
- int getInt(int parameterIndex) throws SQLException;
+ int getInt(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
@@ -142,7 +142,7 @@ public interface CallableStatement extends PreparedStatement
* @return The parameter value as a <code>long</code>.
* @exception SQLException If an error occurs.
*/
- long getLong(int parameterIndex) throws SQLException;
+ long getLong(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
@@ -152,7 +152,7 @@ public interface CallableStatement extends PreparedStatement
* @return The parameter value as a <code>float</code>.
* @exception SQLException If an error occurs.
*/
- float getFloat(int parameterIndex) throws SQLException;
+ float getFloat(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
@@ -162,31 +162,31 @@ public interface CallableStatement extends PreparedStatement
* @return The parameter value as a <code>double</code>.
* @exception SQLException If an error occurs.
*/
- double getDouble(int parameterIndex) throws SQLException;
+ double getDouble(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
* <code>BigDecimal</code>.
*
- * @param parameterIndex The index of the parameter to return.
+ * @param index The index of the parameter to return.
* @param scale The number of digits to the right of the decimal to return.
* @return The parameter value as a <code>BigDecimal</code>.
* @exception SQLException If an error occurs.
- * @deprecated Use getBigDecimal(int parameterIndex)
- * or getBigDecimal(String parameterName) instead.
+ * @deprecated Use getBigDecimal(int index)
+ * or getBigDecimal(String name) instead.
*/
- BigDecimal getBigDecimal(int parameterIndex, int scale)
+ BigDecimal getBigDecimal(int index, int scale)
throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
* byte array.
*
- * @param parameterIndex The index of the parameter to return.
+ * @param index The index of the parameter to return.
* @return The parameter value as a byte array
* @exception SQLException If an error occurs.
*/
- byte[] getBytes(int parameterIndex) throws SQLException;
+ byte[] getBytes(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
@@ -196,7 +196,7 @@ public interface CallableStatement extends PreparedStatement
* @return The parameter value as a <code>java.sql.Date</code>.
* @exception SQLException If an error occurs.
*/
- Date getDate(int parameterIndex) throws SQLException;
+ Date getDate(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
@@ -206,7 +206,7 @@ public interface CallableStatement extends PreparedStatement
* @return The parameter value as a <code>java.sql.Time</code>.
* @exception SQLException If an error occurs.
*/
- Time getTime(int parameterIndex) throws SQLException;
+ Time getTime(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
@@ -216,29 +216,29 @@ public interface CallableStatement extends PreparedStatement
* @return The parameter value as a <code>java.sql.Timestamp</code>.
* @exception SQLException If an error occurs.
*/
- Timestamp getTimestamp(int parameterIndex) throws SQLException;
+ Timestamp getTimestamp(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
* <code>Object</code>.
*
- * @param parameterIndex The index of the parameter to return.
+ * @param index The index of the parameter to return.
* @return The parameter value as an <code>Object</code>.
* @exception SQLException If an error occurs.
* @since 1.2
*/
- Object getObject(int parameterIndex) throws SQLException;
+ Object getObject(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
* <code>BigDecimal</code>.
*
- * @param parameterIndex The index of the parameter to return.
+ * @param index The index of the parameter to return.
* @return The parameter value as a <code>BigDecimal</code>.
* @exception SQLException If an error occurs.
* @since 1.2
*/
- BigDecimal getBigDecimal(int parameterIndex) throws SQLException;
+ BigDecimal getBigDecimal(int index) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
@@ -289,7 +289,7 @@ public interface CallableStatement extends PreparedStatement
* This method returns the value of the specified parameter as a Java
* <code>Array</code>.
*
- * @param parameterIndex The index of the parameter to return.
+ * @param index The index of the parameter to return.
* @return The parameter value as a <code>Array</code>.
* @exception SQLException If an error occurs.
* @since 1.2
@@ -300,25 +300,25 @@ public interface CallableStatement extends PreparedStatement
* This method returns the value of the specified parameter as a Java
* <code>java.sql.Date</code>.
*
- * @param parameterIndex The index of the parameter to return.
+ * @param index The index of the parameter to return.
* @param cal The <code>Calendar</code> to use for timezone and locale.
* @return The parameter value as a <code>java.sql.Date</code>.
* @exception SQLException If an error occurs.
* @since 1.2
*/
- Date getDate(int parameterIndex, Calendar cal) throws SQLException;
+ Date getDate(int index, Calendar cal) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
* <code>java.sql.Time</code>.
*
- * @param parameterIndex The index of the parameter to return.
+ * @param index The index of the parameter to return.
* @param cal The <code>Calendar</code> to use for timezone and locale.
* @return The parameter value as a <code>java.sql.Time</code>.
* @exception SQLException If an error occurs.
* @since 1.2
*/
- Time getTime(int parameterIndex, Calendar cal) throws SQLException;
+ Time getTime(int index, Calendar cal) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
@@ -329,7 +329,7 @@ public interface CallableStatement extends PreparedStatement
* @exception SQLException If an error occurs.
* @since 1.2
*/
- Timestamp getTimestamp(int parameterIndex, Calendar cal)
+ Timestamp getTimestamp(int index, Calendar cal)
throws SQLException;
/**
@@ -337,25 +337,24 @@ public interface CallableStatement extends PreparedStatement
* of the specified SQL type.
*
* @param index The index of the parameter to register as output.
- * @param type The SQL type value from <code>Types</code>.
- * @param name The user defined data type name.
+ * @param sqlType The SQL type value from <code>Types</code>.
+ * @param typeName The user defined data type name.
* @exception SQLException If an error occurs.
* @since 1.2
*/
- void registerOutParameter(int paramIndex, int sqlType,
- String typeName)
+ void registerOutParameter(int index, int sqlType, String typeName)
throws SQLException;
/**
* This method registers the specified parameter as an output parameter
* of the specified SQL type.
*
- * @param parameterName The name of the parameter to register as output.
+ * @param name The name of the parameter to register as output.
* @param sqlType The SQL type value from <code>Types</code>.
* @exception SQLException If an error occurs.
* @since 1.4
*/
- void registerOutParameter(String parameterName, int sqlType)
+ void registerOutParameter(String name, int sqlType)
throws SQLException;
/**
@@ -363,14 +362,13 @@ public interface CallableStatement extends PreparedStatement
* of the specified SQL type. This version of registerOutParameter is used
* for NUMERIC or DECIMAL types.
*
- * @param parameterName The name of the parameter to register as output.
+ * @param name The name of the parameter to register as output.
* @param sqlType The SQL type value from <code>Types</code>.
* @param scale Number of digits to the right of the decimal point.
* @exception SQLException If an error occurs.
* @since 1.4
*/
- void registerOutParameter(String parameterName, int sqlType,
- int scale)
+ void registerOutParameter(String name, int sqlType, int scale)
throws SQLException;
@@ -380,272 +378,584 @@ public interface CallableStatement extends PreparedStatement
* for user-named or REF types. If the type of the output parameter does
* not have such a type, the typeName argument is ignored.
*
- * @param parameterName The name of the parameter to register as output.
+ * @param name The name of the parameter to register as output.
* @param sqlType The SQL type value from <code>Types</code>.
* @param typeName The SQL structured type name.
* @exception SQLException If an error occurs.
* @since 1.4
*/
- void registerOutParameter(String parameterName, int sqlType,
- String typeName)
+ void registerOutParameter(String name, int sqlType, String typeName)
throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>java.net.URL</code>.
+ *
+ * @param index The index of the parameter to return.
+ * @return The parameter value as a <code>URL</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- URL getURL(int parameterIndex) throws SQLException;
+ URL getURL(int index) throws SQLException;
/**
+ * This method sets the value of the specified parameter to the specified
+ * <code>java.net.URL</code>
+ *
+ * @param name The name of the parameter to set.
+ * @param value The value the parameter.
* @since 1.4
*/
- void setURL(String parameterName, URL val) throws SQLException;
+ void setURL(String name, URL value) throws SQLException;
/**
+ * This method populates the specified parameter with a SQL NULL value
+ * for the specified type.
+ *
+ * @param name The name of the parameter to set.
+ * @param sqlType The SQL type identifier of the parameter from
+ * <code>Types</code>
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setNull(String parameterName, int sqlType) throws SQLException;
+ void setNull(String name, int sqlType) throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>boolean</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setBoolean(String parameterName, boolean x) throws SQLException;
+ void setBoolean(String name, boolean value) throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>byte</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setByte(String parameterName, byte x) throws SQLException;
+ void setByte(String name, byte value) throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>short</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setShort(String parameterName, short x) throws SQLException;
+ void setShort(String name, short value) throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>int</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setInt(String parameterName, int x) throws SQLException;
+ void setInt(String name, int value) throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>long</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setLong(String parameterName, long x) throws SQLException;
+ void setLong(String name, long value) throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>float</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setFloat(String parameterName, float x) throws SQLException;
+ void setFloat(String name, float value) throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>double</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setDouble(String parameterName, double x) throws SQLException;
+ void setDouble(String name, double value) throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>BigDecimal</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setBigDecimal(String parameterName, BigDecimal x)
+ void setBigDecimal(String name, BigDecimal value)
throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>String</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setString(String parameterName, String x) throws SQLException;
+ void setString(String name, String value) throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>byte</code> array value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setBytes(String parameterName, byte[] x) throws SQLException;
+ void setBytes(String name, byte[] value) throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>java.sql.Date</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setDate(String parameterName, Date x) throws SQLException;
+ void setDate(String name, Date value) throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>java.sql.Time</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setTime(String parameterName, Time x) throws SQLException;
+ void setTime(String name, Time value) throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>java.sql.Timestamp</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setTimestamp(String parameterName, Timestamp x)
+ void setTimestamp(String name, Timestamp value)
throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * ASCII <code>InputStream</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param stream The stream from which the parameter value is read.
+ * @param count The number of bytes in the stream.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setAsciiStream(String parameterName, InputStream x, int length)
+ void setAsciiStream(String name, InputStream stream, int count)
throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * binary <code>InputStream</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param stream The stream from which the parameter value is read.
+ * @param count The number of bytes in the stream.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setBinaryStream(String parameterName, InputStream x, int length)
+ void setBinaryStream(String name, InputStream stream, int count)
throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>Object</code> value. The specified SQL object type will be used.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @param sqlType The SQL type to use for the parameter, from
+ * <code>Types</code>
+ * @param scale The scale of the value, for numeric values only.
+ * @exception SQLException If an error occurs.
+ * @see Types
* @since 1.4
*/
- void setObject(String parameterName, Object x, int targetSqlType,
- int scale)
+ void setObject(String name, Object value, int sqlType, int scale)
throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>Object</code> value. The specified SQL object type will be used.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @param sqlType The SQL type to use for the parameter, from
+ * <code>Types</code>
+ * @exception SQLException If an error occurs.
+ * @see Types
* @since 1.4
*/
- void setObject(String parameterName, Object x, int targetSqlType)
+ void setObject(String name, Object value, int sqlType)
throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>Object</code> value. The default object type to SQL type mapping
+ * will be used.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setObject(String parameterName, Object x) throws SQLException;
+ void setObject(String name, Object value) throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * character <code>Reader</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param reader The reader from which the parameter value is read.
+ * @param count The number of characters in the stream.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setCharacterStream(String parameterName, Reader reader,
- int length)
+ void setCharacterStream(String name, Reader reader, int count)
throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>java.sql.Date</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @param cal The <code>Calendar</code> to use for timezone and locale.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setDate(String parameterName, Date x, Calendar cal)
+ void setDate(String name, Date value, Calendar cal)
throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>java.sql.Time</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @param cal The <code>Calendar</code> to use for timezone and locale.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setTime(String parameterName, Time x, Calendar cal)
+ void setTime(String name, Time value, Calendar cal)
throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>java.sql.Timestamp</code> value.
+ *
+ * @param name The name of the parameter value to set.
+ * @param value The value of the parameter.
+ * @param cal The <code>Calendar</code> to use for timezone and locale.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setTimestamp(String parameterName, Timestamp x, Calendar cal)
+ void setTimestamp(String name, Timestamp value, Calendar cal)
throws SQLException;
/**
+ * This method populates the specified parameter with a SQL NULL value
+ * for the specified type.
+ *
+ * @param name The name of the parameter to set.
+ * @param sqlType The SQL type identifier of the parameter from
+ * <code>Types</code>
+ * @param typeName The name of the data type, for user defined types.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setNull(String parameterName, int sqlType, String typeName)
+ void setNull(String name, int sqlType, String typeName)
throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>String</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>String</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- String getString(String parameterName) throws SQLException;
+ String getString(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>boolean</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>boolean</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- boolean getBoolean(String parameterName) throws SQLException;
+ boolean getBoolean(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>byte</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>byte</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- byte getByte(String parameterName) throws SQLException;
+ byte getByte(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>short</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>short</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- short getShort(String parameterName) throws SQLException;
+ short getShort(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>int</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>int</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- int getInt(String parameterName) throws SQLException;
+ int getInt(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>long</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>long</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- long getLong(String parameterName) throws SQLException;
+ long getLong(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>float</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>float</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- float getFloat(String parameterName) throws SQLException;
+ float getFloat(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>double</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>double</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- double getDouble(String parameterName) throws SQLException;
+ double getDouble(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>byte</code> array.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>byte[]</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- byte[] getBytes(String parameterName) throws SQLException;
+ byte[] getBytes(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>java.sql.Date</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>java.sql.Date</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- Date getDate(String parameterName) throws SQLException;
+ Date getDate(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>java.sql.Time</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>java.sql.Time</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- Time getTime(String parameterName) throws SQLException;
+ Time getTime(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>java.sql.Timestamp</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>java.sql.Timestamp</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- Timestamp getTimestamp(String parameterName) throws SQLException;
+ Timestamp getTimestamp(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>Object</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>Object</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- Object getObject(String parameterName) throws SQLException;
+ Object getObject(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>BigDecimal</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>BigDecimal</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- BigDecimal getBigDecimal(String parameterName) throws SQLException;
+ BigDecimal getBigDecimal(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>Object</code> using the specified mapping for conversion from
+ * SQL to Java types.
+ *
+ * @param name The name of the parameter to return.
+ * @param map The mapping to use for conversion from SQL to Java types.
+ * @return The parameter value as an <code>Object</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- Object getObject(String parameterName, Map map) throws SQLException;
+ Object getObject(String name, Map map) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>Ref</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>Ref</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- Ref getRef(String parameterName) throws SQLException;
+ Ref getRef(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>Blob</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>Blob</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- Blob getBlob(String parameterName) throws SQLException;
+ Blob getBlob(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>Clob</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>Clob</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- Clob getClob(String parameterName) throws SQLException;
+ Clob getClob(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>Array</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>Array</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- Array getArray(String parameterName) throws SQLException;
+ Array getArray(String name) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>java.sql.Date</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @param cal The <code>Calendar</code> to use for timezone and locale.
+ * @return The parameter value as a <code>java.sql.Date</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- Date getDate(String parameterName, Calendar cal) throws SQLException;
+ Date getDate(String name, Calendar cal) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>java.sql.Time</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @param cal The <code>Calendar</code> to use for timezone and locale.
+ * @return The parameter value as a <code>java.sql.Time</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- Time getTime(String parameterName, Calendar cal) throws SQLException;
+ Time getTime(String name, Calendar cal) throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>java.sql.Timestamp</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @param cal The <code>Calendar</code> to use for timezone and locale.
+ * @return The parameter value as a <code>java.sql.Timestamp</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- Timestamp getTimestamp(String parameterName, Calendar cal)
+ Timestamp getTimestamp(String name, Calendar cal)
throws SQLException;
/**
+ * This method returns the value of the specified parameter as a Java
+ * <code>java.net.URL</code>.
+ *
+ * @param name The name of the parameter to return.
+ * @return The parameter value as a <code>java.net.URL</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- URL getURL(String parameterName) throws SQLException;
+ URL getURL(String name) throws SQLException;
}
diff --git a/libjava/classpath/java/sql/Clob.java b/libjava/classpath/java/sql/Clob.java
index 8789da5967a..53bf6393cde 100644
--- a/libjava/classpath/java/sql/Clob.java
+++ b/libjava/classpath/java/sql/Clob.java
@@ -1,5 +1,5 @@
/* Clob.java -- Access Character Large OBjects
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -35,6 +35,7 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
+
package java.sql;
import java.io.InputStream;
@@ -43,110 +44,144 @@ import java.io.Reader;
import java.io.Writer;
/**
- * This interface contains methods for accessing a SQL CLOB (Character
- * Large OBject) type.
- *
+ * This interface contains methods for accessing a SQL CLOB (Character Large
+ * OBject) type.
+ *
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
-public interface Clob
+public interface Clob
{
- /**
- * This method returns the number of characters in the CLOB.
- *
- * @return The number of characters in the CLOB.
- * @exception SQLException If an error occurs.
- * @since 1.2
- */
+ /**
+ * This method returns the number of characters in this <code>Clob</code>.
+ *
+ * @return The number of characters in this <code>Clob</code>.
+ * @exception SQLException If an error occurs.
+ * @since 1.2
+ */
long length() throws SQLException;
/**
- * This method returns the specified portion of the CLOB as a
- * <code>String</code>.
- *
- * @param offset The index into the CLOB (index values start at 1) to
- * start returning characters from.
- * @param length The requested number of characters to return.
- * @return The requested CLOB section, as a <code>String</code>.
+ * This method returns the specified portion of this <code>Clob</code> as a
+ * <code>String</code>.
+ *
+ * @param start The index into this <code>Clob</code> (index values
+ * start at 1) to start returning characters from.
+ * @param count The requested number of characters to return.
+ * @return The requested <code>Clob</code> section, as a <code>String</code>.
* @exception SQLException If an error occurs.
* @since 1.2
*/
- String getSubString(long pos, int length) throws SQLException;
+ String getSubString(long start, int count) throws SQLException;
/**
- * This method returns a character stream that reads the contents of the
- * CLOB.
- *
- * @return A character stream to read the CLOB's contents.
+ * This method returns a character stream that reads the contents of this
+ * <code>Clob</code>.
+ *
+ * @return A character stream to read this <code>Clob</code>'s contents.
* @exception SQLException If an error occurs.
* @since 1.2
*/
Reader getCharacterStream() throws SQLException;
/**
- * This method returns a byte stream that reads the contents of the
- * CLOB as a series of ASCII bytes.
- *
- * @return A stream to read the CLOB's contents.
+ * This method returns a byte stream that reads the contents of this
+ * <code>Clob</code> as a series of ASCII bytes.
+ *
+ * @return A stream to read this <code>Clob</code>'s contents.
* @exception SQLException If an error occurs.
* @since 1.2
*/
InputStream getAsciiStream() throws SQLException;
/**
- * This method returns the index into the CLOB of the first occurrence of
- * the specified character pattern (supplied by the caller as a
- * <code>String</code>). The search begins at the specified index.
- *
- * @param searchstr The character pattern to search for, passed as a
- * <code>String</code>.
- * @param start. The index into the CLOB to start search (indexes start
- * at 1).
- * @return The index at which the pattern was found (indexes start at 1),
- * or -1 if the pattern was not found.
+ * This method returns the index into this <code>Clob</code> of the first
+ * occurrence of the specified character pattern (supplied by the caller as a
+ * <code>String</code>). The search begins at the specified index.
+ *
+ * @param pattern The character pattern to search for, passed as a
+ * <code>String</code>.
+ * @param start The index into this <code>Clob</code> to start searching
+ * (indices start at 1).
+ * @return The index at which the pattern was found (indices start at 1), or
+ * -1 if the pattern was not found.
* @exception SQLException If an error occurs.
* @since 1.2
*/
- long position(String searchstr, long start) throws SQLException;
+ long position(String pattern, long start) throws SQLException;
/**
- * This method returns the index into the CLOB of the first occurrence of
- * the specified character pattern (supplied by the caller as a
- * <code>Clob</code>). The search begins at the specified index.
- *
- * @param searchstr The character pattern to search for, passed as a
- * <code>Clob</code>.
- * @param start. The index into the CLOB to start search (indexes start
- * at 1).
- * @return The index at which the pattern was found (indexes start at 1),
- * or -1 if the pattern was not found.
+ * This method returns the index into this <code>Clob</code> of the first
+ * occurrence of the specified character pattern (supplied by the caller as a
+ * <code>Clob</code>). The search begins at the specified index.
+ *
+ * @param pattern The character pattern to search for, passed as a
+ * <code>Clob</code>.
+ * @param start The index into this <code>Clob</code> to start searching
+ * (indices start at 1).
+ * @return The index at which the pattern was found (indices start at 1), or
+ * -1 if the pattern was not found.
* @exception SQLException If an error occurs.
* @since 1.2
*/
- long position(Clob searchstr, long start) throws SQLException;
+ long position(Clob pattern, long start) throws SQLException;
/**
+ * Writes the specified string into this <code>Clob</code>, starting at the
+ * specified index.
+ *
+ * @param start The index at which the writing starts.
+ * @param value The string to write.
+ * @return The number of characters written.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- int setString(long pos, String str) throws SQLException;
+ int setString(long start, String value) throws SQLException;
/**
+ * Writes the specified portion of a string into this <code>Clob</code>,
+ * starting at the specified index.
+ *
+ * @param startWrite The index at which the writing starts.
+ * @param value The string to write a portion of.
+ * @param startRead The offset into the string where the portion to copy
+ * starts.
+ * @param count The number of characters to write.
+ * @return The number of characters written.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- int setString(long pos, String str, int offset, int len)
- throws SQLException;
+ int setString(long startWrite, String value, int startRead, int count)
+ throws SQLException;
/**
+ * Returns an ASCII text stream that writes into this <code>Clob</code>,
+ * starting at the specified index.
+ *
+ * @param start The index at which the writing starts.
+ * @return An ASCII text stream to write into this <code>Clob</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- OutputStream setAsciiStream(long pos) throws SQLException;
+ OutputStream setAsciiStream(long start) throws SQLException;
/**
+ * Returns a character stream that writes into this <code>Clob</code>,
+ * starting at the specified index.
+ *
+ * @param start The index at which the writing starts.
+ * @return A character stream to write into this <code>Clob</code>.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- Writer setCharacterStream(long pos) throws SQLException;
+ Writer setCharacterStream(long start) throws SQLException;
/**
+ * Truncates this <code>Clob</code> to be at most the specified number of
+ * characters long.
+ *
+ * @param count The length this <code>Clob</code> is truncated to.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void truncate(long len) throws SQLException;
+ void truncate(long count) throws SQLException;
}
diff --git a/libjava/classpath/java/sql/Connection.java b/libjava/classpath/java/sql/Connection.java
index 48ec12dd09f..d827e75b089 100644
--- a/libjava/classpath/java/sql/Connection.java
+++ b/libjava/classpath/java/sql/Connection.java
@@ -1,5 +1,5 @@
/* Connection.java -- Manage a database connection.
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -61,7 +61,7 @@ public interface Connection
int TRANSACTION_READ_UNCOMMITTED = 1;
/**
- * This transaction isolation leve indicates that only committed data from
+ * This transaction isolation level indicates that only committed data from
* other transactions will be read. If a transaction reads a row, then
* another transaction commits a change to that row, the first transaction
* would retrieve the changed row on subsequent reads of the same row.
@@ -101,8 +101,8 @@ public interface Connection
* SQL string. This method is designed for use with parameterized
* statements. The default result set type and concurrency will be used.
*
- * @param The SQL statement to use in creating this
- * <code>PreparedStatement</code>.
+ * @param sql The SQL statement to use in creating this
+ * <code>PreparedStatement</code>.
* @return A new <code>PreparedStatement</code>.
* @exception SQLException If an error occurs.
* @see PreparedStatement
@@ -115,8 +115,8 @@ public interface Connection
* stored procedures. The default result set type and concurrency
* will be used.
*
- * @param The SQL statement to use in creating this
- * <code>CallableStatement</code>.
+ * @param sql The SQL statement to use in creating this
+ * <code>CallableStatement</code>.
* @return A new <code>CallableStatement</code>.
* @exception SQLException If an error occurs.
* @see CallableStatement
@@ -127,7 +127,7 @@ public interface Connection
* This method converts the specified generic SQL statement into the
* native grammer of the database this object is connected to.
*
- * @param The JDBC generic SQL statement.
+ * @param sql The JDBC generic SQL statement.
* @return The native SQL statement.
* @exception SQLException If an error occurs.
*/
@@ -139,10 +139,10 @@ public interface Connection
* transaction must be explicitly committed or rolled back.
*
* @param autoCommit <code>true</code> to enable auto commit mode,
- * <code>false</code> to disable it.
+ * <code>false</code> to disable it.
* @exception SQLException If an error occurs.
- * @see commit
- * @see rollback
+ * @see #commit()
+ * @see #rollback()
*/
void setAutoCommit(boolean autoCommit) throws SQLException;
@@ -152,12 +152,10 @@ public interface Connection
* Otherwise a transaction must be explicitly committed or rolled back.
*
* @return <code>true</code> if auto commit mode is enabled,
- * <code>false</code> otherwise.
- *
+ * <code>false</code> otherwise.
* @exception SQLException If an error occurs.
- *
- * @see commit
- * @see rollback
+ * @see #commit()
+ * @see #rollback()
*/
boolean getAutoCommit() throws SQLException;
@@ -207,7 +205,7 @@ public interface Connection
* a transaction is in progress.
*
* @param readOnly <code>true</code> if this connection is read only,
- * <code>false</code> otherwise.
+ * <code>false</code> otherwise.
* @exception SQLException If an error occurs.
*/
void setReadOnly(boolean readOnly) throws SQLException;
@@ -235,8 +233,8 @@ public interface Connection
* This method returns the name of the catalog in use by this connection,
* if any.
*
- * @return The name of the catalog, or <code>null</code> if one does not
- * exist or catalogs are not supported by this database.
+ * @return The name of the catalog, or <code>null</code> if none
+ * exists or catalogs are not supported by this database.
* @exception SQLException If an error occurs.
*/
String getCatalog() throws SQLException;
@@ -283,8 +281,8 @@ public interface Connection
* <code>ResultSet</code> class.
*
* @param resultSetType The type of result set to use for this statement.
- * @param resultSetConcurrency. The type of concurrency to be used in
- * the result set for this statement.
+ * @param resultSetConcurrency The type of concurrency to be used in
+ * the result set for this statement.
* @return A new <code>Statement</code> object.
* @exception SQLException If an error occurs.
* @see Statement
@@ -300,11 +298,11 @@ public interface Connection
* Valid values for these parameters are specified in the
* <code>ResultSet</code> class.
*
- * @param The SQL statement to use in creating this
- * <code>PreparedStatement</code>.
+ * @param sql The SQL statement to use in creating this
+ * <code>PreparedStatement</code>.
* @param resultSetType The type of result set to use for this statement.
- * @param resultSetConcurrency. The type of concurrency to be used in
- * the result set for this statement.
+ * @param resultSetConcurrency The type of concurrency to be used in
+ * the result set for this statement.
* @return A new <code>PreparedStatement</code>.
* @exception SQLException If an error occurs.
* @see PreparedStatement
@@ -320,11 +318,11 @@ public interface Connection
* will be used. Valid values for these parameters are specified in the
* <code>ResultSet</code> class.
*
- * @param The SQL statement to use in creating this
- * <code>PreparedStatement</code>.
+ * @param sql The SQL statement to use in creating this
+ * <code>PreparedStatement</code>.
* @param resultSetType The type of result set to use for this statement.
- * @param resultSetConcurrency. The type of concurrency to be used in
- * the result set for this statement.
+ * @param resultSetConcurrency The type of concurrency to be used in
+ * the result set for this statement.
* @return A new <code>CallableStatement</code>.
* @exception SQLException If an error occurs.
* @see CallableStatement
@@ -353,48 +351,130 @@ public interface Connection
void setTypeMap(Map map) throws SQLException;
/**
+ * Sets the default holdability of <code>ResultSet</code>S that are created
+ * from <code>Statement</code>S using this <code>Connection</code>.
+ *
+ * @param holdability The default holdability value to set, this must be one
+ * of <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
+ * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>.
+ * @exception SQLException If an error occurs.
+ * @see ResultSet
* @since 1.4
*/
void setHoldability(int holdability) throws SQLException;
/**
+ * Gets the default holdability of <code>ResultSet</code>S that are created
+ * from <code>Statement</code>S using this <code>Connection</code>.
+ *
+ * @return The current default holdability value, this must be one of
+ * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
+ * <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>.
+ * @exception SQLException If an error occurs.
+ * @see ResultSet
* @since 1.4
*/
int getHoldability() throws SQLException;
/**
+ * Creates a new unnamed savepoint for this <code>Connection</code>
+ *
+ * @return The <code>Savepoint</code> object representing the savepoint.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
Savepoint setSavepoint() throws SQLException;
/**
+ * Creates a new savepoint with the specifiend name for this
+ * <code>Connection</code>.
+ *
+ * @param name The name of the savepoint.
+ * @return The <code>Savepoint</code> object representing the savepoint.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
Savepoint setSavepoint(String name) throws SQLException;
/**
+ * Undoes all changes made after the specified savepoint was set.
+ *
+ * @param savepoint The safepoint to roll back to.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
void rollback(Savepoint savepoint) throws SQLException;
/**
+ * Removes the specified savepoint from this <code>Connection</code>.
+ * Refering to a savepoint after it was removed is an error and will throw an
+ * SQLException.
+ *
+ * @param savepoint The savepoint to release.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
void releaseSavepoint(Savepoint savepoint) throws SQLException;
/**
+ * This method creates a new SQL statement with the specified type,
+ * concurrency and holdability, instead of using the defaults. Valid values
+ * for these parameters are specified in the <code>ResultSet</code> class.
+ *
+ * @param resultSetType The type of result set to use for this statement.
+ * @param resultSetConcurrency The type of concurrency to be used in
+ * the result set for this statement.
+ * @param resultSetHoldability The type of holdability to be usd in the
+ * result set for this statement.
+ * @return A new <code>Statement</code>
+ * @exception SQLException If an error occurs.
+ * @see ResultSet
* @since 1.4
*/
Statement createStatement(int resultSetType, int
resultSetConcurrency, int resultSetHoldability) throws SQLException;
/**
+ * This method creates a new <code>PreparedStatement</code> for the specified
+ * SQL string. This method is designed for use with parameterized
+ * statements. The specified result set type, concurrency and holdability
+ * will be used. Valid values for these parameters are specified in the
+ * <code>ResultSet</code> class.
+ *
+ * @param sql The SQL statement to use in creating this
+ * <code>PreparedStatement</code>.
+ * @param resultSetType The type of result set to use for this statement.
+ * @param resultSetConcurrency The type of concurrency to be used in
+ * the result set for this statement.
+ * @param resultSetHoldability The type of holdability to be usd in the
+ * result set for this statement.
+ * @return A new <code>PreparedStatement</code>.
+ * @exception SQLException If an error occurs.
+ * @see PreparedStatement
+ * @see ResultSet
* @since 1.4
*/
PreparedStatement prepareStatement(String sql, int resultSetType, int
resultSetConcurrency, int resultSetHoldability) throws SQLException;
/**
+ * This method creates a new <code>CallableStatement</code> for the
+ * specified SQL string. Thie method is designed to be used with
+ * stored procedures. The specified result set type, concurrency and
+ * holdability will be used. Valid values for these parameters are specified
+ * in the <code>ResultSet</code> class.
+ *
+ * @param sql The SQL statement to use in creating this
+ * <code>PreparedStatement</code>.
+ * @param resultSetType The type of result set to use for this statement.
+ * @param resultSetConcurrency The type of concurrency to be used in
+ * the result set for this statement.
+ * @param resultSetHoldability The type of holdability to be used in the
+ * result set for this statement.
+ * @return A new <code>CallableStatement</code>.
+ * @exception SQLException If an error occurs.
+ * @see CallableStatement
+ * @see ResultSet
* @since 1.4
*/
CallableStatement prepareCall(String sql, int resultSetType, int
diff --git a/libjava/classpath/java/sql/DatabaseMetaData.java b/libjava/classpath/java/sql/DatabaseMetaData.java
index d34c4e2f927..48c2d9afcd8 100644
--- a/libjava/classpath/java/sql/DatabaseMetaData.java
+++ b/libjava/classpath/java/sql/DatabaseMetaData.java
@@ -1,5 +1,5 @@
/* DatabaseMetaData.java -- Information about the database itself.
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -256,10 +256,19 @@ public interface DatabaseMetaData
*/
short tableIndexOther = 3;
+ /**
+ * A NULL value is not allowed for this attribute.
+ */
short attributeNoNulls = 0;
+ /**
+ * A NULL value is allowed for this attribute.
+ */
short attributeNullable = 1;
+ /**
+ * It is unknown whether or not NULL values are allowed for this attribute.
+ */
short attributeNullableUnknown = 2;
int sqlStateXOpen = 1;
@@ -1395,12 +1404,12 @@ public interface DatabaseMetaData
* or "" to return procedures from all catalogs.
* @param schemaPattern A schema pattern for the schemas to return stored
* procedures from, or "" to return procedures from all schemas.
- * @param namePattern The pattern of procedures names to return.
+ * @param procedurePattern The pattern of procedure names to return.
* @returns A <code>ResultSet</code> with all the requested procedures.
* @exception SQLException If an error occurs.
*/
ResultSet getProcedures(String catalog, String schemaPattern, String
- procedureNamePattern) throws SQLException;
+ procedurePattern) throws SQLException;
/**
* This method returns a list of the parameter and result columns for
@@ -1436,13 +1445,13 @@ public interface DatabaseMetaData
* or "" to return procedures from all catalogs.
* @param schemaPattern A schema pattern for the schemas to return stored
* procedures from, or "" to return procedures from all schemas.
- * @param namePattern The pattern of procedures names to return.
+ * @param procedurePattern The pattern of procedures names to return.
* @param columnPattern The pattern of column names to return.
* @returns A <code>ResultSet</code> with all the requested procedures.
* @exception SQLException If an error occurs.
*/
ResultSet getProcedureColumns(String catalog, String schemaPattern,
- String procedureNamePattern, String columnNamePattern) throws
+ String procedurePattern, String columnPattern) throws
SQLException;
/**
@@ -1462,13 +1471,13 @@ public interface DatabaseMetaData
* or "" to return tables from all catalogs.
* @param schemaPattern A schema pattern for the schemas to return tables
* from, or "" to return tables from all schemas.
- * @param namePattern The pattern of table names to return.
+ * @param tablePattern The pattern of table names to return.
* @param types The list of table types to include; null returns all types.
* @returns A <code>ResultSet</code> with all the requested tables.
* @exception SQLException If an error occurs.
*/
ResultSet getTables(String catalog, String schemaPattern, String
- tableNamePattern, String[] types) throws SQLException;
+ tablePattern, String[] types) throws SQLException;
/**
* This method returns the list of database schemas as a
@@ -1536,13 +1545,13 @@ public interface DatabaseMetaData
* or "" to return tables from all catalogs.
* @param schemaPattern A schema pattern for the schemas to return
* tables from, or "" to return tables from all schemas.
- * @param namePattern The pattern of tables names to return.
+ * @param tablePattern The pattern of table names to return.
* @param columnPattern The pattern of column names to return.
* @returns A <code>ResultSet</code> with all the requested tables.
* @exception SQLException If an error occurs.
*/
ResultSet getColumns(String catalog, String schemaPattern, String
- tableNamePattern, String columnNamePattern) throws SQLException;
+ tablePattern, String columnPattern) throws SQLException;
/**
* This method returns the access rights that have been granted to the
@@ -1568,13 +1577,13 @@ public interface DatabaseMetaData
* to return information from all catalogs.
* @param schema The schema to retrieve information from, or the empty string
* to return entities not associated with a schema.
- * @param table The table name to return information for.
+ * @param tableName The table name to return information for.
* @param columnPattern A pattern of column names to return information for.
* @return A <code>ResultSet</code> with all the requested privileges.
* @exception SQLException If an error occurs.
*/
ResultSet getColumnPrivileges(String catalog, String schema, String
- table, String columnNamePattern) throws SQLException;
+ tableName, String columnPattern) throws SQLException;
/**
* This method returns the access rights that have been granted to the
@@ -1597,7 +1606,7 @@ public interface DatabaseMetaData
* @param catalog The catalog to retrieve information from, or the empty string
* to return entities not associated with a catalog, or <code>null</code>
* to return information from all catalogs.
- * @param schema The schema to retrieve information from, or the empty string
+ * @param schemaPattern The schema to retrieve information from, or the empty string
* to return entities not associated with a schema.
* @param tablePattern The table name pattern of tables to return
* information for.
@@ -1605,7 +1614,7 @@ public interface DatabaseMetaData
* @exception SQLException If an error occurs.
*/
ResultSet getTablePrivileges(String catalog, String schemaPattern,
- String tableNamePattern) throws SQLException;
+ String tablePattern) throws SQLException;
/**
* This method returns the best set of columns for uniquely identifying
@@ -1634,8 +1643,7 @@ public interface DatabaseMetaData
* to return information from all catalogs.
* @param schema The schema to retrieve information from, or the empty string
* to return entities not associated with a schema.
- * @param table The table name to return information for.
- * @param columnPattern A pattern of column names to return information for.
+ * @param tableName The table name to return information for.
* @param scope One of the best row id scope constants from this class.
* @param nullable <code>true</code> to include columns that are nullable,
* <code>false</code> otherwise.
@@ -1643,7 +1651,7 @@ public interface DatabaseMetaData
* @exception SQLException If an error occurs.
*/
ResultSet getBestRowIdentifier(String catalog, String schema,
- String table, int scope, boolean nullable) throws SQLException;
+ String tableName, int scope, boolean nullable) throws SQLException;
/**
* This method returns the set of columns that are automatically updated
@@ -1670,13 +1678,12 @@ public interface DatabaseMetaData
* to return information from all catalogs.
* @param schema The schema to retrieve information from, or the empty string
* to return entities not associated with a schema.
- * @param table The table name to return information for.
- * @param columnPattern A pattern of column names to return information for.
+ * @param tableName The table name to return information for
* @return A <code>ResultSet</code> with the version columns.
* @exception SQLException If an error occurs.
*/
ResultSet getVersionColumns(String catalog, String schema,
- String table) throws SQLException;
+ String tableName) throws SQLException;
/**
* This method returns a list of a table's primary key columns. These
@@ -1696,12 +1703,11 @@ public interface DatabaseMetaData
* to return information from all catalogs.
* @param schema The schema to retrieve information from, or the empty string
* to return entities not associated with a schema.
- * @param table The table name to return information for.
- * @param columnPattern A pattern of column names to return information for.
+ * @param tableName The table name to return information for.
* @return A <code>ResultSet</code> with the primary key columns.
* @exception SQLException If an error occurs.
*/
- ResultSet getPrimaryKeys(String catalog, String schema, String table)
+ ResultSet getPrimaryKeys(String catalog, String schema, String tableName)
throws SQLException;
/**
@@ -1740,14 +1746,12 @@ public interface DatabaseMetaData
* to return information from all catalogs.
* @param schema The schema to retrieve information from, or the empty string
* to return entities not associated with a schema.
- * @param table The table name to return information for.
- *
+ * @param tableName The table name to return information for.
* @return A <code>ResultSet</code> with the foreign key columns.
- *
* @exception SQLException If an error occurs.
*/
ResultSet getImportedKeys(String catalog, String schema,
- String table) throws SQLException;
+ String tableName) throws SQLException;
/**
* This method returns a list of the table's which use this table's
@@ -1786,12 +1790,12 @@ public interface DatabaseMetaData
* to return information from all catalogs.
* @param schema The schema to retrieve information from, or the empty string
* to return entities not associated with a schema.
- * @param table The table name to return information for.
+ * @param tableName The table name to return information for.
* @return A <code>ResultSet</code> with the requested information
* @exception SQLException If an error occurs.
*/
ResultSet getExportedKeys(String catalog, String schema,
- String table) throws SQLException;
+ String tableName) throws SQLException;
/**
* This method returns a description of how one table imports another
@@ -1825,26 +1829,30 @@ public interface DatabaseMetaData
* <code>importedKeyNotDeferrable</code>).</li>
* </ol>
*
- * @param primCatalog The catalog to retrieve information from, or the empty string
- * to return entities not associated with a catalog, or <code>null</code>
- * to return information from all catalogs, on the exporting side.
- * @param primSchema The schema to retrieve information from, or the empty string
- * to return entities not associated with a schema, on the exporting side.
- * @param primTable The table name to return information for, on the exporting
- * side.
- * @param forCatalog The catalog to retrieve information from, or the empty string
- * to return entities not associated with a catalog, or <code>null</code>
- * to return information from all catalogs, on the importing side.
- * @param forSchema The schema to retrieve information from, or the empty string
- * to return entities not associated with a schema on the importing side.
- * @param forTable The table name to return information for on the importing
- * side.
+ * @param primaryCatalog The catalog to retrieve information from, or the
+ * empty string to return entities not associated with a catalog, or
+ * <code>null</code> to return information from all catalogs, on the
+ * exporting side.
+ * @param primarySchema The schema to retrieve information from, or the empty
+ * string to return entities not associated with a schema, on the
+ * exporting side.
+ * @param primaryTableName The table name to return information for, on the
+ * exporting side.
+ * @param foreignCatalog The catalog to retrieve information from, or the
+ * empty string to return entities not associated with a catalog,
+ * or <code>null</code> to return information from all catalogs, on
+ * the importing side.
+ * @param foreignSchema The schema to retrieve information from, or the
+ * empty string to return entities not associated with a schema on
+ * the importing side.
+ * @param foreignTableName The table name to return information for on the
+ * importing side.
* @return A <code>ResultSet</code> with the requested information
* @exception SQLException If an error occurs.
*/
ResultSet getCrossReference(String primaryCatalog, String
- primarySchema, String primaryTable, String foreignCatalog, String
- foreignSchema, String foreignTable) throws SQLException;
+ primarySchema, String primaryTableName, String foreignCatalog, String
+ foreignSchema, String foreignTableName) throws SQLException;
/**
* This method returns a list of the SQL types supported by this
@@ -1921,15 +1929,15 @@ public interface DatabaseMetaData
* <code>null</code> to return information from all catalogs.
* @param schema The schema to retrieve information from, or the empty string
* to return entities not associated with a schema.
- * @param table The table name to return information for.
+ * @param tableName The table name to return information for.
* @param unique <code>true</code> to return only unique indexes,
* <code>false</code> otherwise.
- * @param approx <code>true</code> if data values can be approximations,
+ * @param approximate <code>true</code> if data values can be approximations,
* <code>false</code> otherwise.
* @return A <code>ResultSet</code> with the requested index information
* @exception SQLException If an error occurs.
*/
- ResultSet getIndexInfo(String catalog, String schema, String table,
+ ResultSet getIndexInfo(String catalog, String schema, String tableName,
boolean unique, boolean approximate) throws SQLException;
/**
@@ -1954,8 +1962,8 @@ public interface DatabaseMetaData
*
* @param type The desired result type, which is one of the constants
* defined in <code>ResultSet</code>.
- * @param concur The desired concurrency type, which is one of the constants
- * defined in <code>ResultSet</code>.
+ * @param concurrency The desired concurrency type, which is one of the
+ * constants defined in <code>ResultSet</code>.
* @return <code>true</code> if the result set type is supported,
* <code>false</code> otherwise.
* @exception SQLException If an error occurs.
@@ -2108,8 +2116,8 @@ public interface DatabaseMetaData
* @param catalog The catalog to retrieve information from, or the empty string
* to return entities not associated with a catalog, or <code>null</code>
* to return information from all catalogs.
- * @param schema The schema to retrieve information from, or the empty string
- * to return entities not associated with a schema.
+ * @param schemaPattern The schema to retrieve information from, or the
+ * empty string to return entities not associated with a schema.
* @param typePattern The type name pattern to match.
* @param types The type identifier patterns (from <code>Types</code>) to
* match.
@@ -2117,7 +2125,7 @@ public interface DatabaseMetaData
* @exception SQLException If an error occurs.
*/
ResultSet getUDTs(String catalog, String schemaPattern, String
- typeNamePattern, int[] types) throws SQLException;
+ typePattern, int[] types) throws SQLException;
/**
* This method returns the <code>Connection</code> object that was used
@@ -2129,16 +2137,33 @@ public interface DatabaseMetaData
Connection getConnection() throws SQLException;
/**
+ * This method tests whether the databse supports savepoints.
+ *
+ * @return <code>true</code> if the database supports savepoints,
+ * <code>false</code> if it does not.
+ * @exception SQLException If an error occurs.
+ * @see Savepoint
* @since 1.4
*/
boolean supportsSavepoints() throws SQLException;
/**
+ * This method tests whether the database supports named parameters.
+ *
+ * @return <code>true</code> if the database supports named parameters,
+ * <code>false</code> if it does not.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
boolean supportsNamedParameters() throws SQLException;
/**
+ * This method tests whether the database supports returning multiple
+ * <code>ResultSet</code>S from a <code>CallableStatement</code> at once.
+ *
+ * @return <code>true</code> if the database supports returnig multiple
+ * results at once, <code>false</code> if it does not.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
boolean supportsMultipleOpenResults() throws SQLException;
@@ -2152,47 +2177,78 @@ public interface DatabaseMetaData
* @since 1.4
*/
ResultSet getSuperTypes(String catalog, String schemaPattern,
- String typeNamePattern) throws SQLException;
+ String typePattern) throws SQLException;
/**
* @since 1.4
*/
ResultSet getSuperTables(String catalog, String schemaPattern,
- String tableNamePattern) throws SQLException;
+ String tablePattern) throws SQLException;
/**
* @since 1.4
*/
ResultSet getAttributes(String catalog, String schemaPattern, String
- typeNamePattern, String attributeNamePattern) throws SQLException;
+ typePattern, String attributePattern) throws SQLException;
/**
+ * This method tests if the database supports the specified holdability type.
+ * Valid values for this parameter are specified in the
+ * <code>ResultSet</code> class.
+ *
+ * @param holdability The holdability type to test.
+ * @return <code>true</code> if the database supports the holdability type,
+ * <code>false</code> if it does not.
+ * @exception SQLException If an error occurs.
+ * @see ResultSet
* @since 1.4
*/
boolean supportsResultSetHoldability(int holdability)
throws SQLException;
/**
+ * This method returns the default holdability type of <code>ResultSet</code>S
+ * retrieved from this database. The possible values are specified in the
+ * <code>ResultSet</code> class.
+ *
+ * @return The default holdability type.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
int getResultSetHoldability() throws SQLException;
/**
+ * This method returns the major version number of the database.
+ *
+ * @return The major version number of the database.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
int getDatabaseMajorVersion() throws SQLException;
/**
+ * This method returns the minor version number of the database.
+ *
+ * @return The minor version number of the database.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
int getDatabaseMinorVersion() throws SQLException;
/**
+ * This method returns the major version number of the JDBC driver.
+ *
+ * @return The major version number of the JDBC driver.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
int getJDBCMajorVersion() throws SQLException;
/**
+ * This method returns the minor version number of the JDBC driver.
+ *
+ * @return The minor version number of the database.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
int getJDBCMinorVersion() throws SQLException;
diff --git a/libjava/classpath/java/sql/Date.java b/libjava/classpath/java/sql/Date.java
index d429cc8267d..f4c3307092e 100644
--- a/libjava/classpath/java/sql/Date.java
+++ b/libjava/classpath/java/sql/Date.java
@@ -1,5 +1,5 @@
/* Date.java -- Wrapper around java.util.Date
- Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -72,10 +72,10 @@ public class Date extends java.util.Date
/**
* This method initializes a new instance of this class with the
- * specified time value representing the number of seconds since
+ * specified time value representing the number of milliseconds since
* Jan 1, 1970 at 12:00 midnight GMT.
*
- * @param time The time value to intialize this date to.
+ * @param date The time value to intialize this date to.
*/
public Date(long date)
{
diff --git a/libjava/classpath/java/sql/Driver.java b/libjava/classpath/java/sql/Driver.java
index 10f83ef2f8b..277dd171360 100644
--- a/libjava/classpath/java/sql/Driver.java
+++ b/libjava/classpath/java/sql/Driver.java
@@ -1,5 +1,5 @@
/* Driver.java -- A JDBC driver
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -68,7 +68,7 @@ public interface Driver
* connection, or <code>null</code> if the URL is not understood.
* @exception SQLException If an error occurs.
*/
- Connection connect(String url, Properties info) throws SQLException;
+ Connection connect(String url, Properties properties) throws SQLException;
/**
* This method tests whether or not the driver believes it can connect to
@@ -76,7 +76,7 @@ public interface Driver
* understands and accepts the URL. It should not necessarily attempt to
* probe the database for a connection.
*
- * @param The database URL string.
+ * @param url The database URL string.
* @return <code>true</code> if the drivers can connect to the database,
* <code>false</code> otherwise.
* @exception SQLException If an error occurs.
diff --git a/libjava/classpath/java/sql/DriverManager.java b/libjava/classpath/java/sql/DriverManager.java
index 9e252abcc60..94f743b92da 100644
--- a/libjava/classpath/java/sql/DriverManager.java
+++ b/libjava/classpath/java/sql/DriverManager.java
@@ -1,5 +1,6 @@
/* DriverManager.java -- Manage JDBC drivers
- Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2003, 2004, 2006
+ Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -292,11 +293,11 @@ public class DriverManager
* This method set the login timeout used by JDBC drivers. This is a
* system-wide parameter that applies to all drivers.
*
- * @param login_timeout The new login timeout value.
+ * @param seconds The new login timeout value.
*/
public static void setLoginTimeout(int seconds)
{
- DriverManager.login_timeout = login_timeout;
+ DriverManager.login_timeout = seconds;
}
/**
@@ -312,20 +313,18 @@ public class DriverManager
/**
* This method sets the log stream in use by JDBC.
*
- * @param log_stream The log stream in use by JDBC.
- *
+ * @param stream The log stream in use by JDBC.
* @deprecated Use <code>setLogWriter</code> instead.
*/
- public static void setLogStream(PrintStream out)
+ public static void setLogStream(PrintStream stream)
{
- DriverManager.log_stream = log_stream;
+ DriverManager.log_stream = stream;
}
/**
* This method returns the log stream in use by JDBC.
*
* @return The log stream in use by JDBC.
- *
* @deprecated Use <code>getLogWriter()</code> instead.
*/
public static PrintStream getLogStream()
@@ -336,7 +335,7 @@ public class DriverManager
/**
* This method prints the specified line to the log stream.
*
- * @param str The string to write to the log stream.
+ * @param message The string to write to the log stream.
*/
public static void println(String message)
{
diff --git a/libjava/classpath/java/sql/PreparedStatement.java b/libjava/classpath/java/sql/PreparedStatement.java
index 3aedbc59300..ca7eb2c5d79 100644
--- a/libjava/classpath/java/sql/PreparedStatement.java
+++ b/libjava/classpath/java/sql/PreparedStatement.java
@@ -1,5 +1,5 @@
/* PreparedStatement.java -- Interface for pre-compiled statements.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,6 +48,8 @@ import java.util.Calendar;
* statements. This provides greater efficiency when calling the same
* statement multiple times. Parameters are allowed in a statement,
* providings for maximum reusability.
+ *
+ * <p> Note that in this class parameter indices start at 1, not 0.</p>
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
@@ -76,11 +78,12 @@ public interface PreparedStatement extends Statement
* for the specified type.
*
* @param index The index of the parameter to set.
- * @param type The SQL type identifier of the parameter from <code>Types</code>
+ * @param sqlType The SQL type identifier of the parameter from
+ * <code>Types</code>
*
* @exception SQLException If an error occurs.
*/
- void setNull(int parameterIndex, int sqlType) throws SQLException;
+ void setNull(int index, int sqlType) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -90,7 +93,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setBoolean(int parameterIndex, boolean x) throws SQLException;
+ void setBoolean(int index, boolean value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -100,7 +103,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setByte(int parameterIndex, byte x) throws SQLException;
+ void setByte(int index, byte value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -110,7 +113,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setShort(int parameterIndex, short x) throws SQLException;
+ void setShort(int index, short value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -120,7 +123,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setInt(int parameterIndex, int x) throws SQLException;
+ void setInt(int index, int value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -130,7 +133,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setLong(int parameterIndex, long x) throws SQLException;
+ void setLong(int index, long value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -140,7 +143,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setFloat(int parameterIndex, float x) throws SQLException;
+ void setFloat(int index, float value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -150,7 +153,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setDouble(int parameterIndex, double x) throws SQLException;
+ void setDouble(int index, double value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -160,7 +163,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setBigDecimal(int parameterIndex, BigDecimal x) throws
+ void setBigDecimal(int index, BigDecimal value) throws
SQLException;
/**
@@ -171,7 +174,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setString(int parameterIndex, String x) throws SQLException;
+ void setString(int index, String value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -181,7 +184,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setBytes(int parameterIndex, byte[] x) throws SQLException;
+ void setBytes(int index, byte[] value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -191,7 +194,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setDate(int parameterIndex, Date x) throws SQLException;
+ void setDate(int index, Date value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -201,7 +204,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setTime(int parameterIndex, Time x) throws SQLException;
+ void setTime(int index, Time value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -211,7 +214,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setTimestamp(int parameterIndex, Timestamp x)
+ void setTimestamp(int index, Timestamp value)
throws SQLException;
/**
@@ -219,11 +222,11 @@ public interface PreparedStatement extends Statement
* ASCII <code>InputStream</code> 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.
+ * @param stream The stream from which the parameter value is read.
+ * @param count The number of bytes in the stream.
* @exception SQLException If an error occurs.
*/
- void setAsciiStream(int parameterIndex, InputStream x, int length)
+ void setAsciiStream(int index, InputStream stream, int count)
throws SQLException;
/**
@@ -231,12 +234,12 @@ public interface PreparedStatement extends Statement
* Unicode UTF-8 <code>InputStream</code> 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.
+ * @param stream The stream from which the parameter value is read.
+ * @param count The number of bytes in the stream.
* @exception SQLException If an error occurs.
* @deprecated
*/
- void setUnicodeStream(int parameterIndex, InputStream x, int length)
+ void setUnicodeStream(int index, InputStream stream, int count)
throws SQLException;
/**
@@ -244,11 +247,11 @@ public interface PreparedStatement extends Statement
* binary <code>InputStream</code> 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.
+ * @param stream The stream from which the parameter value is read.
+ * @param count The number of bytes in the stream.
* @exception SQLException If an error occurs.
*/
- void setBinaryStream(int parameterIndex, InputStream x, int length)
+ void setBinaryStream(int index, InputStream stream, int count)
throws SQLException;
/**
@@ -265,13 +268,14 @@ public interface PreparedStatement extends Statement
*
* @param index The index of the parameter value to set.
* @param value The value of the parameter.
- * @param type The SQL type to use for the parameter, from <code>Types</code>
+ * @param sqlType The SQL type to use for the parameter, from
+ * <code>Types</code>
* @param scale The scale of the value, for numeric values only.
* @exception SQLException If an error occurs.
* @see Types
*/
- void setObject(int parameterIndex, Object x, int targetSqlType,
- int scale) throws SQLException;
+ void setObject(int index, Object value, int sqlType, int scale)
+ throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -279,11 +283,12 @@ public interface PreparedStatement extends Statement
*
* @param index The index of the parameter value to set.
* @param value The value of the parameter.
- * @param type The SQL type to use for the parameter, from <code>Types</code>
+ * @param sqlType The SQL type to use for the parameter, from
+ * <code>Types</code>
* @exception SQLException If an error occurs.
* @see Types
*/
- void setObject(int parameterIndex, Object x, int targetSqlType)
+ void setObject(int index, Object value, int sqlType)
throws SQLException;
/**
@@ -295,7 +300,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setObject(int parameterIndex, Object x) throws SQLException;
+ void setObject(int index, Object value) throws SQLException;
/**
* This method executes a prepared SQL query.
@@ -319,12 +324,12 @@ public interface PreparedStatement extends Statement
* character <code>Reader</code> 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.
+ * @param reader The reader from which the parameter value is read.
+ * @param count The number of characters in the stream.
* @exception SQLException If an error occurs.
*/
- void setCharacterStream(int parameterIndex, Reader reader,
- int length) throws SQLException;
+ void setCharacterStream(int index, Reader reader, int count)
+ throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -332,10 +337,10 @@ public interface PreparedStatement extends Statement
* will be used.
*
* @param index The index of the parameter value to set.
- * @param value The value of the parameter.
+ * @param value The <code>Ref</code> used to set the value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setRef(int i, Ref x) throws SQLException;
+ void setRef(int index, Ref value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -343,10 +348,11 @@ public interface PreparedStatement extends Statement
* will be used.
*
* @param index The index of the parameter value to set.
- * @param value The value of the parameter.
+ * @param value The <code>Blob</code> used to set the
+ * value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setBlob(int i, Blob x) throws SQLException;
+ void setBlob(int index, Blob value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -354,10 +360,11 @@ public interface PreparedStatement extends Statement
* will be used.
*
* @param index The index of the parameter value to set.
- * @param value The value of the parameter.
+ * @param value The <code>Clob</code> used to set the
+ * value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setClob(int i, Clob x) throws SQLException;
+ void setClob(int index, Clob value) throws SQLException;
/**
* This method sets the specified parameter from the given Java
@@ -368,7 +375,7 @@ public interface PreparedStatement extends Statement
* @param value The value of the parameter.
* @exception SQLException If an error occurs.
*/
- void setArray(int i, Array x) throws SQLException;
+ void setArray(int index, Array value) throws SQLException;
/**
* This method returns meta data for the result set from this statement.
@@ -384,10 +391,10 @@ public interface PreparedStatement extends Statement
*
* @param index The index of the parameter value to set.
* @param value The value of the parameter.
- * @param calendar The <code>Calendar</code> to use for timezone and locale.
+ * @param cal The <code>Calendar</code> to use for timezone and locale.
* @exception SQLException If an error occurs.
*/
- void setDate(int parameterIndex, Date x, Calendar cal)
+ void setDate(int index, Date value, Calendar cal)
throws SQLException;
/**
@@ -396,10 +403,10 @@ public interface PreparedStatement extends Statement
*
* @param index The index of the parameter value to set.
* @param value The value of the parameter.
- * @param calendar The <code>Calendar</code> to use for timezone and locale.
+ * @param cal The <code>Calendar</code> to use for timezone and locale.
* @exception SQLException If an error occurs.
*/
- void setTime(int parameterIndex, Time x, Calendar cal)
+ void setTime(int index, Time value, Calendar cal)
throws SQLException;
/**
@@ -408,10 +415,10 @@ public interface PreparedStatement extends Statement
*
* @param index The index of the parameter value to set.
* @param value The value of the parameter.
- * @param calendar The <code>Calendar</code> to use for timezone and locale.
+ * @param cal The <code>Calendar</code> to use for timezone and locale.
* @exception SQLException If an error occurs.
*/
- void setTimestamp(int parameterIndex, Timestamp x, Calendar cal)
+ void setTimestamp(int index, Timestamp value, Calendar cal)
throws SQLException;
/**
@@ -419,19 +426,32 @@ public interface PreparedStatement extends Statement
* for the specified type.
*
* @param index The index of the parameter to set.
- * @param type The SQL type identifier of the parameter from <code>Types</code>
- * @param name The name of the data type, for user defined types.
+ * @param sqlType The SQL type identifier of the parameter from
+ * <code>Types</code>
+ * @param typeName The name of the data type, for user defined types.
* @exception SQLException If an error occurs.
*/
- void setNull(int paramIndex, int sqlType, String typeName)
+ void setNull(int index, int sqlType, String typeName)
throws SQLException;
/**
+ * This method sets the specified parameter from the given Java
+ * <code>java.net.URL</code> value.
+ *
+ * @param index The index of the parameter to set.
+ * @param value The value of the parameter.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void setURL(int parameterIndex, URL x) throws SQLException;
+ void setURL(int index, URL value) throws SQLException;
/**
+ * Returns information about the parameters set on this
+ * <code>PreparedStatement</code> (see {@link ParameterMetaData} for a
+ * detailed description of the provided information).
+ *
+ * @return Meta data for the parameters of this statement.
+ * @see ParameterMetaData
* @since 1.4
*/
ParameterMetaData getParameterMetaData() throws SQLException;
diff --git a/libjava/classpath/java/sql/ResultSet.java b/libjava/classpath/java/sql/ResultSet.java
index 97f2897d423..79cba63d419 100644
--- a/libjava/classpath/java/sql/ResultSet.java
+++ b/libjava/classpath/java/sql/ResultSet.java
@@ -1,5 +1,5 @@
/* ResultSet.java -- A SQL statement result set.
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -138,7 +138,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>String</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a <code>String</code>.
* @exception SQLException If an error occurs.
*/
@@ -148,7 +148,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>boolean</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a <code>boolean</code>.
* @exception SQLException If an error occurs.
*/
@@ -158,7 +158,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>byte</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a <code>byte</code>.
* @exception SQLException If an error occurs.
*/
@@ -168,7 +168,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>short</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a <code>short</code>.
* @exception SQLException If an error occurs.
*/
@@ -178,7 +178,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>int</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a <code>int</code>.
* @exception SQLException If an error occurs.
*/
@@ -188,7 +188,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>long</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a <code>long</code>.
* @exception SQLException If an error occurs.
*/
@@ -198,7 +198,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>float</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a <code>float</code>.
* @exception SQLException If an error occurs.
*/
@@ -208,7 +208,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>double</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a <code>double</code>.
* @exception SQLException If an error occurs.
*/
@@ -218,7 +218,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>BigDecimal</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @param scale The number of digits to the right of the decimal to return.
* @return The column value as a <code>BigDecimal</code>.
* @exception SQLException If an error occurs.
@@ -231,7 +231,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* byte array.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a byte array
* @exception SQLException If an error occurs.
*/
@@ -241,7 +241,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>java.sql.Date</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a <code>java.sql.Date</code>.
* @exception SQLException If an error occurs.
*/
@@ -251,7 +251,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>java.sql.Time</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a <code>java.sql.Time</code>.
* @exception SQLException If an error occurs.
*/
@@ -261,7 +261,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>java.sql.Timestamp</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a <code>java.sql.Timestamp</code>.
* @exception SQLException If an error occurs.
*/
@@ -274,7 +274,7 @@ public interface ResultSet
* calling <code>next()</code> or <code>close()</code> on this result set
* will close this stream as well.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as an ASCII <code>InputStream</code>.
* @exception SQLException If an error occurs.
*/
@@ -287,7 +287,7 @@ public interface ResultSet
* calling <code>next()</code> or <code>close()</code> on this result set
* will close this stream as well.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a Unicode UTF-8 <code>InputStream</code>.
* @exception SQLException If an error occurs.
* @deprecated Use getCharacterStream instead.
@@ -301,7 +301,7 @@ public interface ResultSet
* calling <code>next()</code> or <code>close()</code> on this result set
* will close this stream as well.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a raw byte <code>InputStream</code>.
* @exception SQLException If an error occurs.
*/
@@ -311,7 +311,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>String</code>.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a <code>String</code>.
* @exception SQLException If an error occurs.
*/
@@ -321,7 +321,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>boolean</code>.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a <code>boolean</code>.
* @exception SQLException If an error occurs.
*/
@@ -331,7 +331,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>byte</code>.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a <code>byte</code>.
* @exception SQLException If an error occurs.
*/
@@ -341,7 +341,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>short</code>.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a <code>short</code>.
* @exception SQLException If an error occurs.
*/
@@ -351,7 +351,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>int</code>.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a <code>int</code>.
* @exception SQLException If an error occurs.
*/
@@ -361,7 +361,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>long</code>.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a <code>long</code>.
* @exception SQLException If an error occurs.
*/
@@ -371,7 +371,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>float</code>.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a <code>float</code>.
* @exception SQLException If an error occurs.
*/
@@ -381,7 +381,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>double</code>.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a <code>double</code>.
* @exception SQLException If an error occurs.
*/
@@ -391,7 +391,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>BigDecimal</code>.
*
- * @param index The index of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a <code>BigDecimal</code>.
* @exception SQLException If an error occurs.
* @deprecated
@@ -403,7 +403,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* byte array.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a byte array
* @exception SQLException If an error occurs.
*/
@@ -413,7 +413,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>java.sql.Date</code>.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a <code>java.sql.Date</code>.
* @exception SQLException If an error occurs.
*/
@@ -423,7 +423,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>java.sql.Time</code>.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a <code>java.sql.Time</code>.
* @exception SQLException If an error occurs.
*/
@@ -433,7 +433,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>java.sql.Timestamp</code>.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a <code>java.sql.Timestamp</code>.
* @exception SQLException If an error occurs.
*/
@@ -446,7 +446,7 @@ public interface ResultSet
* calling <code>next()</code> or <code>close()</code> on this result set
* will close this stream as well.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as an ASCII <code>InputStream</code>.
* @exception SQLException If an error occurs.
*/
@@ -459,7 +459,7 @@ public interface ResultSet
* calling <code>next()</code> or <code>close()</code> on this result set
* will close this stream as well.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a Unicode UTF-8 <code>InputStream</code>.
* @exception SQLException If an error occurs.
* @deprecated Use getCharacterStream instead.
@@ -473,7 +473,7 @@ public interface ResultSet
* calling <code>next()</code> or <code>close()</code> on this result set
* will close this stream as well.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a raw byte <code>InputStream</code>.
* @exception SQLException If an error occurs.
*/
@@ -518,7 +518,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>Object</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as an <code>Object</code>.
* @exception SQLException If an error occurs.
*/
@@ -528,7 +528,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>Object</code>.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as an <code>Object</code>.
* @exception SQLException If an error occurs.
*/
@@ -537,7 +537,7 @@ public interface ResultSet
/**
* This method returns the column index of the specified named column.
*
- * @param column The name of the column.
+ * @param columnName The name of the column.
* @return The index of the column.
* @exception SQLException If an error occurs.
*/
@@ -550,7 +550,7 @@ public interface ResultSet
* calling <code>next()</code> or <code>close()</code> on this result set
* will close this stream as well.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as an character <code>Reader</code>.
* @exception SQLException If an error occurs.
*/
@@ -563,7 +563,7 @@ public interface ResultSet
* calling <code>next()</code> or <code>close()</code> on this result set
* will close this stream as well.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as an character <code>Reader</code>.
* @exception SQLException If an error occurs.
*/
@@ -573,7 +573,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>BigDecimal</code>.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return The column value as a <code>BigDecimal</code>.
* @exception SQLException If an error occurs.
*/
@@ -583,7 +583,7 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>BigDecimal</code>.
*
- * @param column The name of the column to return.
+ * @param columnName The name of the column to return.
* @return The column value as a <code>BigDecimal</code>.
* @exception SQLException If an error occurs.
*/
@@ -692,7 +692,7 @@ public interface ResultSet
* This method moves the result set position relative to the current row.
* The offset can be positive or negative.
*
- * @param row The relative row position to move to.
+ * @param rows The number of row positions to move.
* @return <code>true</code> if the current position was changed,
* <code>false</code> otherwise.
* @exception SQLException If an error occurs.
@@ -713,7 +713,9 @@ public interface ResultSet
* This method provides a hint to the driver about which direction the
* result set will be processed in.
*
- * @param direction The direction in which rows will be processed. (Values?)
+ * @param direction The direction in which rows will be processed. The
+ * allowed values are the <code>FETCH_*</code> constants
+ * defined in this interface.
* @exception SQLException If an error occurs.
*/
void setFetchDirection(int direction) throws SQLException;
@@ -746,7 +748,7 @@ public interface ResultSet
/**
* This method returns the result set type of this result set. This will
- * be one of the TYPE_* constants defined in this interface.
+ * be one of the <code>TYPE_*</code> constants defined in this interface.
*
* @return The result set type.
* @exception SQLException If an error occurs.
@@ -755,7 +757,7 @@ public interface ResultSet
/**
* This method returns the concurrency type of this result set. This will
- * be one of the CONCUR_* constants defined in this interface.
+ * be one of the <code>CONCUR_*</code> constants defined in this interface.
*
* @return The result set concurrency type.
* @exception SQLException If an error occurs.
@@ -800,7 +802,7 @@ public interface ResultSet
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @return index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @exception SQLException If an error occurs.
*/
void updateNull(int columnIndex) throws SQLException;
@@ -810,88 +812,88 @@ public interface ResultSet
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateBoolean(int columnIndex, boolean x) throws SQLException;
+ void updateBoolean(int columnIndex, boolean value) throws SQLException;
/**
* This method updates the specified column to have a byte value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateByte(int columnIndex, byte x) throws SQLException;
+ void updateByte(int columnIndex, byte value) throws SQLException;
/**
* This method updates the specified column to have a short value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateShort(int columnIndex, short x) throws SQLException;
+ void updateShort(int columnIndex, short value) throws SQLException;
/**
* This method updates the specified column to have an int value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateInt(int columnIndex, int x) throws SQLException;
+ void updateInt(int columnIndex, int value) throws SQLException;
/**
* This method updates the specified column to have a long value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateLong(int columnIndex, long x) throws SQLException;
+ void updateLong(int columnIndex, long value) throws SQLException;
/**
* This method updates the specified column to have a float value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateFloat(int columnIndex, float x) throws SQLException;
+ void updateFloat(int columnIndex, float value) throws SQLException;
/**
* This method updates the specified column to have a double value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateDouble(int columnIndex, double x) throws SQLException;
+ void updateDouble(int columnIndex, double value) throws SQLException;
/**
* This method updates the specified column to have a BigDecimal value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateBigDecimal(int columnIndex, BigDecimal x)
+ void updateBigDecimal(int columnIndex, BigDecimal value)
throws SQLException;
/**
@@ -899,55 +901,55 @@ public interface ResultSet
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateString(int columnIndex, String x) throws SQLException;
+ void updateString(int columnIndex, String value) throws SQLException;
/**
* This method updates the specified column to have a byte array value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateBytes(int columnIndex, byte[] x) throws SQLException;
+ void updateBytes(int columnIndex, byte[] value) throws SQLException;
/**
* This method updates the specified column to have a java.sql.Date value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateDate(int columnIndex, Date x) throws SQLException;
+ void updateDate(int columnIndex, Date value) throws SQLException;
/**
* This method updates the specified column to have a java.sql.Time value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateTime(int columnIndex, Time x) throws SQLException;
+ void updateTime(int columnIndex, Time value) throws SQLException;
/**
* This method updates the specified column to have a java.sql.Timestamp value.
* This does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateTimestamp(int columnIndex, Timestamp x)
+ void updateTimestamp(int columnIndex, Timestamp value)
throws SQLException;
/**
@@ -955,12 +957,12 @@ public interface ResultSet
* This does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
- * @param value The new value of the column.
- * @param length The length of the stream.
+ * @param columnIndex The index of the column to update.
+ * @param stream The stream from which the column value is updated.
+ * @param count The length of the stream.
* @exception SQLException If an error occurs.
*/
- void updateAsciiStream(int columnIndex, InputStream x, int length)
+ void updateAsciiStream(int columnIndex, InputStream stream, int count)
throws SQLException;
/**
@@ -968,12 +970,12 @@ public interface ResultSet
* This does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
- * @param value The new value of the column.
- * @param length The length of the stream.
+ * @param columnIndex The index of the column to update.
+ * @param stream The stream from which the column value is updated.
+ * @param count The length of the stream.
* @exception SQLException If an error occurs.
*/
- void updateBinaryStream(int columnIndex, InputStream x, int length)
+ void updateBinaryStream(int columnIndex, InputStream stream, int count)
throws SQLException;
/**
@@ -981,12 +983,12 @@ public interface ResultSet
* This does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
- * @param value The new value of the column.
- * @param length The length of the stream.
+ * @param columnIndex The index of the column to update.
+ * @param reader The reader from which the column value is updated.
+ * @param count The length of the stream.
* @exception SQLException If an error occurs.
*/
- void updateCharacterStream(int columnIndex, Reader x, int length)
+ void updateCharacterStream(int columnIndex, Reader reader, int count)
throws SQLException;
/**
@@ -994,12 +996,13 @@ public interface ResultSet
* This does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
- *
+ * @param scale The scale of the object in question, which is used only
+ * for numeric type objects.
* @exception SQLException If an error occurs.
*/
- void updateObject(int columnIndex, Object x, int scale)
+ void updateObject(int columnIndex, Object value, int scale)
throws SQLException;
/**
@@ -1007,20 +1010,18 @@ public interface ResultSet
* This does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param index The index of the column to update.
+ * @param columnIndex The index of the column to update.
* @param value The new value of the column.
- * @param scale The scale of the object in question, which is used only
- * for numeric type objects.
* @exception SQLException If an error occurs.
*/
- void updateObject(int columnIndex, Object x) throws SQLException;
+ void updateObject(int columnIndex, Object value) throws SQLException;
/**
* This method updates the specified column to have a NULL value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @return name The name of the column to update.
+ * @param columnName The name of the column to update.
* @exception SQLException If an error occurs.
*/
void updateNull(String columnName) throws SQLException;
@@ -1030,88 +1031,88 @@ public interface ResultSet
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateBoolean(String columnName, boolean x) throws SQLException;
+ void updateBoolean(String columnName, boolean value) throws SQLException;
/**
* This method updates the specified column to have a byte value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateByte(String columnName, byte x) throws SQLException;
+ void updateByte(String columnName, byte value) throws SQLException;
/**
* This method updates the specified column to have a short value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateShort(String columnName, short x) throws SQLException;
+ void updateShort(String columnName, short value) throws SQLException;
/**
* This method updates the specified column to have an int value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateInt(String columnName, int x) throws SQLException;
+ void updateInt(String columnName, int value) throws SQLException;
/**
* This method updates the specified column to have a long value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateLong(String columnName, long x) throws SQLException;
+ void updateLong(String columnName, long value) throws SQLException;
/**
* This method updates the specified column to have a float value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateFloat(String columnName, float x) throws SQLException;
+ void updateFloat(String columnName, float value) throws SQLException;
/**
* This method updates the specified column to have a double value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateDouble(String columnName, double x) throws SQLException;
+ void updateDouble(String columnName, double value) throws SQLException;
/**
* This method updates the specified column to have a BigDecimal value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateBigDecimal(String columnName, BigDecimal x)
+ void updateBigDecimal(String columnName, BigDecimal value)
throws SQLException;
/**
@@ -1119,55 +1120,55 @@ public interface ResultSet
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateString(String columnName, String x) throws SQLException;
+ void updateString(String columnName, String value) throws SQLException;
/**
* This method updates the specified column to have a byte array value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateBytes(String columnName, byte[] x) throws SQLException;
+ void updateBytes(String columnName, byte[] value) throws SQLException;
/**
* This method updates the specified column to have a java.sql.Date value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateDate(String columnName, Date x) throws SQLException;
+ void updateDate(String columnName, Date value) throws SQLException;
/**
* This method updates the specified column to have a java.sql.Time value. This
* does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateTime(String columnName, Time x) throws SQLException;
+ void updateTime(String columnName, Time value) throws SQLException;
/**
* This method updates the specified column to have a java.sql.Timestamp value.
* This does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
* @exception SQLException If an error occurs.
*/
- void updateTimestamp(String columnName, Timestamp x)
+ void updateTimestamp(String columnName, Timestamp value)
throws SQLException;
/**
@@ -1175,12 +1176,12 @@ public interface ResultSet
* This does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
- * @param value The new value of the column.
- * @param length The length of the stream.
+ * @param columnName The name of the column to update.
+ * @param stream The stream from which the column value is updated.
+ * @param count The length of the stream.
* @exception SQLException If an error occurs.
*/
- void updateAsciiStream(String columnName, InputStream x, int length)
+ void updateAsciiStream(String columnName, InputStream stream, int count)
throws SQLException;
/**
@@ -1188,12 +1189,12 @@ public interface ResultSet
* This does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
- * @param value The new value of the column.
- * @param length The length of the stream.
+ * @param columnName The name of the column to update.
+ * @param stream The stream from which the column value is updated.
+ * @param count The length of the stream.
* @exception SQLException If an error occurs.
*/
- void updateBinaryStream(String columnName, InputStream x, int length)
+ void updateBinaryStream(String columnName, InputStream stream, int count)
throws SQLException;
/**
@@ -1201,25 +1202,26 @@ public interface ResultSet
* This does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
- * @param value The new value of the column.
- * @param length The length of the stream.
- *
+ * @param columnName The name of the column to update.
+ * @param reader The reader from which the column value is updated.
+ * @param count The length of the stream.
* @exception SQLException If an error occurs.
*/
- void updateCharacterStream(String columnName, Reader reader,
- int length) throws SQLException;
+ void updateCharacterStream(String columnName, Reader reader, int count)
+ throws SQLException;
/**
* This method updates the specified column to have an Object value.
* This does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
+ * @param scale The scale of the object in question, which is used only
+ * for numeric type objects.
* @exception SQLException If an error occurs.
*/
- void updateObject(String columnName, Object x, int scale)
+ void updateObject(String columnName, Object value, int scale)
throws SQLException;
/**
@@ -1227,13 +1229,11 @@ public interface ResultSet
* This does not update the actual database. <code>updateRow</code> must be
* called in order to do that.
*
- * @param name The name of the column to update.
+ * @param columnName The name of the column to update.
* @param value The new value of the column.
- * @param scale The scale of the object in question, which is used only
- * for numeric type objects.
* @exception SQLException If an error occurs.
*/
- void updateObject(String columnName, Object x) throws SQLException;
+ void updateObject(String columnName, Object value) throws SQLException;
/**
* This method inserts the current row into the database. The result set
@@ -1304,97 +1304,97 @@ public interface ResultSet
* This method returns the value of the specified column as a Java
* <code>Object</code> using the specified SQL type to Java type map.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @param map The SQL type to Java type map to use.
* @return The value of the column as an <code>Object</code>.
* @exception SQLException If an error occurs.
*/
- Object getObject(int i, Map map) throws SQLException;
+ Object getObject(int columnIndex, Map map) throws SQLException;
/**
* This method returns a <code>Ref</code> for the specified column which
* represents the structured type for the column.
*
- * @param index The index of the column to return.
+ * @param columnIndex The index of the column to return.
* @return A <code>Ref</code> object for the column
* @exception SQLException If an error occurs.
*/
- Ref getRef(int i) throws SQLException;
+ Ref getRef(int columnIndex) throws SQLException;
/**
* This method returns the specified column value as a BLOB.
*
- * @param index The index of the column value to return.
+ * @param columnIndex The index of the column value to return.
* @return The value of the column as a BLOB.
* @exception SQLException If an error occurs.
*/
- Blob getBlob(int i) throws SQLException;
+ Blob getBlob(int columnIndex) throws SQLException;
/**
* This method returns the specified column value as a CLOB.
*
- * @param index The index of the column value to return.
+ * @param columnIndex The index of the column value to return.
* @return The value of the column as a CLOB.
* @exception SQLException If an error occurs.
*/
- Clob getClob(int i) throws SQLException;
+ Clob getClob(int columnIndex) throws SQLException;
/**
* This method returns the specified column value as an <code>Array</code>.
*
- * @param index The index of the column value to return.
+ * @param columnIndex The index of the column value to return.
* @return The value of the column as an <code>Array</code>.
* @exception SQLException If an error occurs.
*/
- Array getArray(int i) throws SQLException;
+ Array getArray(int columnIndex) throws SQLException;
/**
* This method returns the value of the specified column as a Java
* <code>Object</code> using the specified SQL type to Java type map.
*
- * @param name The name of the column to return.
+ * @param columnName The name of the column to return.
* @param map The SQL type to Java type map to use.
* @return The value of the column as an <code>Object</code>.
* @exception SQLException If an error occurs.
*/
- Object getObject(String colName, Map map) throws SQLException;
+ Object getObject(String columnName, Map map) throws SQLException;
/**
* This method returns a <code>Ref</code> for the specified column which
* represents the structured type for the column.
*
- * @param index The index of the column to return.
+ * @param columnName The name of the column to return.
* @return A <code>Ref</code> object for the column
* @exception SQLException If an error occurs.
*/
- Ref getRef(String colName) throws SQLException;
+ Ref getRef(String columnName) throws SQLException;
/**
* This method returns the specified column value as a BLOB.
*
- * @param name The name of the column value to return.
+ * @param columnName The name of the column value to return.
* @return The value of the column as a BLOB.
* @exception SQLException If an error occurs.
*/
- Blob getBlob(String colName) throws SQLException;
+ Blob getBlob(String columnName) throws SQLException;
/**
* This method returns the specified column value as a CLOB.
*
- * @param name The name of the column value to return.
+ * @param columnName The name of the column value to return.
* @return The value of the column as a CLOB.
* @exception SQLException If an error occurs.
*/
- Clob getClob(String colName) throws SQLException;
+ Clob getClob(String columnName) throws SQLException;
/**
* This method returns the specified column value as an <code>Array</code>.
*
- * @param name The name of the column value to return.
+ * @param columnName The name of the column value to return.
* @return The value of the column as an <code>Array</code>.
* @exception SQLException If an error occurs.
*/
- Array getArray(String colName) throws SQLException;
+ Array getArray(String columnName) throws SQLException;
/**
* This method returns the specified column value as a
@@ -1402,7 +1402,7 @@ public interface ResultSet
* to generate a value for the date if the database does not support
* timezones.
*
- * @param index The index of the column value to return.
+ * @param columnIndex The index of the column value to return.
* @param cal The <code>Calendar</code> to use for calculating timezones.
* @return The value of the column as a <code>java.sql.Date</code>.
* @exception SQLException If an error occurs.
@@ -1415,7 +1415,7 @@ public interface ResultSet
* to generate a value for the date if the database does not support
* timezones.
*
- * @param name The name of the column value to return.
+ * @param columnName The name of the column value to return.
* @param cal The <code>Calendar</code> to use for calculating timezones.
* @return The value of the column as a <code>java.sql.Date</code>.
* @exception SQLException If an error occurs.
@@ -1428,7 +1428,7 @@ public interface ResultSet
* to generate a value for the time if the database does not support
* timezones.
*
- * @param index The index of the column value to return.
+ * @param columnIndex The index of the column value to return.
* @param cal The <code>Calendar</code> to use for calculating timezones.
* @return The value of the column as a <code>java.sql.Time</code>.
* @exception SQLException If an error occurs.
@@ -1441,7 +1441,7 @@ public interface ResultSet
* to generate a value for the time if the database does not support
* timezones.
*
- * @param name The name of the column value to return.
+ * @param columnName The name of the column value to return.
* @param cal The <code>Calendar</code> to use for calculating timezones.
* @return The value of the column as a <code>java.sql.Time</code>.
* @exception SQLException If an error occurs.
@@ -1454,7 +1454,7 @@ public interface ResultSet
* to generate a value for the timestamp if the database does not support
* timezones.
*
- * @param index The index of the column value to return.
+ * @param columnIndex The index of the column value to return.
* @param cal The <code>Calendar</code> to use for calculating timezones.
* @return The value of the column as a <code>java.sql.Timestamp</code>.
* @exception SQLException If an error occurs.
@@ -1468,7 +1468,7 @@ public interface ResultSet
* to generate a value for the timestamp if the database does not support
* timezones.
*
- * @param name The name of the column value to return.
+ * @param columnName The name of the column value to return.
* @param cal The <code>Calendar</code> to use for calculating timezones.
*
* @return The value of the column as a <code>java.sql.Timestamp</code>.
@@ -1479,52 +1479,132 @@ public interface ResultSet
throws SQLException;
/**
+ * This method returns the specified column value as a
+ * <code>java.net.URL</code>.
+ *
+ * @param columnIndex The index of the column value to return.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
URL getURL(int columnIndex) throws SQLException;
/**
+ * This method returns the specified column value as a
+ * <code>java.net.URL</code>.
+ *
+ * @param columnName The name of the column value to return.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
URL getURL(String columnName) throws SQLException;
/**
+ * This method updates the specified column to have a
+ * <code>java.sql.Ref</code> value.
+ * This does not update the actual database. <code>updateRow</code> must be
+ * called in order to do that.
+ *
+ * @parm columnIndex The index of the column value to update.
+ * @parm value The <code>java.sql.Ref</code> used to set the new value
+ * of the column.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void updateRef(int columnIndex, Ref x) throws SQLException;
+ void updateRef(int columnIndex, Ref value) throws SQLException;
/**
+ * This method updates the specified column to have a
+ * <code>java.sql.Ref</code> value.
+ * This does not update the actual database. <code>updateRow</code> must be
+ * called in order to do that.
+ *
+ * @parm columnName The name of the column value to update.
+ * @parm value The <code>java.sql.Ref</code> used to set the new value
+ * of the column.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void updateRef(String columnName, Ref x) throws SQLException;
+ void updateRef(String columnName, Ref value) throws SQLException;
/**
+ * This method updates the specified column to have a
+ * <code>java.sql.Blob</code> value.
+ * This does not update the actual database. <code>updateRow</code> must be
+ * called in order to do that.
+ *
+ * @parm columnIndex The index of the column value to update.
+ * @parm value The <code>java.sql.Blob</code> used to set the new value
+ * of the column.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void updateBlob(int columnIndex, Blob x) throws SQLException;
+ void updateBlob(int columnIndex, Blob value) throws SQLException;
/**
+ * This method updates the specified column to have a
+ * <code>java.sql.Blob</code> value.
+ * This does not update the actual database. <code>updateRow</code> must be
+ * called in order to do that.
+ *
+ * @parm columnName The name of the column value to update.
+ * @parm value The <code>java.sql.Blob</code> used to set the new value
+ * of the column.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void updateBlob(String columnName, Blob x) throws SQLException;
+ void updateBlob(String columnName, Blob value) throws SQLException;
/**
+ * This method updates the specified column to have a
+ * <code>java.sql.Clob</code> value.
+ * This does not update the actual database. <code>updateRow</code> must be
+ * called in order to do that.
+ *
+ * @parm columnIndex The index of the column value to update.
+ * @parm value The <code>java.sql.Clob</code> used to set the new value
+ * of the column.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void updateClob(int columnIndex, Clob x) throws SQLException;
+ void updateClob(int columnIndex, Clob value) throws SQLException;
/**
+ * This method updates the specified column to have a
+ * <code>java.sql.Clob</code> value.
+ * This does not update the actual database. <code>updateRow</code> must be
+ * called in order to do that.
+ *
+ * @parm columnName The name of the column value to update.
+ * @parm value The <code>java.sql.Clob</code> used to set the new value
+ * of the column.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void updateClob(String columnName, Clob x) throws SQLException;
+ void updateClob(String columnName, Clob value) throws SQLException;
/**
+ * This method updates the specified column to have a
+ * <code>java.sqlArray</code> value.
+ * This does not update the actual database. <code>updateRow</code> must be
+ * called in order to do that.
+ *
+ * @parm columnIndex The index of the column value to update.
+ * @parm value The new value of the column.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void updateArray(int columnIndex, Array x) throws SQLException;
+ void updateArray(int columnIndex, Array value) throws SQLException;
/**
+ * This method updates the specified column to have a
+ * <code>java.sqlArray</code> value.
+ * This does not update the actual database. <code>updateRow</code> must be
+ * called in order to do that.
+ *
+ * @parm columnName The name of the column value to update.
+ * @parm value The new value of the column.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void updateArray(String columnName, Array x) throws SQLException;
+ void updateArray(String columnName, Array value) throws SQLException;
}
diff --git a/libjava/classpath/java/sql/ResultSetMetaData.java b/libjava/classpath/java/sql/ResultSetMetaData.java
index 0086677ee60..5a62c549e1e 100644
--- a/libjava/classpath/java/sql/ResultSetMetaData.java
+++ b/libjava/classpath/java/sql/ResultSetMetaData.java
@@ -1,5 +1,5 @@
/* ResultSetMetaData.java -- Returns information about the ResultSet
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,8 +41,8 @@ package java.sql;
/**
* This interface provides a mechanism for obtaining information about
* the columns that are present in a <code>ResultSet</code>.
- * <p>
- * Note that in this class column indexes start at 1, not 0.
+ *
+ * <p> Note that in this class column indices start at 1, not 0.</p>
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
@@ -75,207 +75,207 @@ public interface ResultSetMetaData
* This method test whether or not the column is an auto-increment column.
* Auto-increment columns are read-only.
*
- * @param index The index of the column to test.
+ * @param columnIndex The index of the column to test.
* @return <code>true</code> if the column is auto-increment, <code>false</code>
* otherwise.
* @exception SQLException If an error occurs.
*/
- boolean isAutoIncrement(int column) throws SQLException;
+ boolean isAutoIncrement(int columnIndex) throws SQLException;
/**
* This method tests whether or not a column is case sensitive in its values.
*
- * @param index The index of the column to test.
+ * @param columnIndex The index of the column to test.
* @return <code>true</code> if the column value is case sensitive,
* <code>false</code> otherwise.
* @exception SQLException If an error occurs.
*/
- boolean isCaseSensitive(int column) throws SQLException;
+ boolean isCaseSensitive(int columnIndex) throws SQLException;
/**
* This method tests whether not the specified column can be used in
* a WHERE clause.
*
- * @param index The index of the column to test.
+ * @param columnIndex The index of the column to test.
* @return <code>true</code> if the column may be used in a WHERE clause,
* <code>false</code> otherwise.
* @exception SQLException If an error occurs.
*/
- boolean isSearchable(int column) throws SQLException;
+ boolean isSearchable(int columnIndex) throws SQLException;
/**
* This method tests whether or not the column stores a monetary value.
*
- * @param index The index of the column to test.
+ * @param columnIndex The index of the column to test.
* @return <code>true</code> if the column contains a monetary value,
* <code>false</code> otherwise.
* @exception SQLException If an error occurs.
*/
- boolean isCurrency(int column) throws SQLException;
+ boolean isCurrency(int columnIndex) throws SQLException;
/**
* This method returns a value indicating whether or not the specified
* column may contain a NULL value.
*
- * @param index The index of the column to test.
+ * @param columnIndex The index of the column to test.
* @return A constant indicating whether or not the column can contain NULL,
* which will be one of <code>columnNoNulls</code>,
* <code>columnNullable</code>, or <code>columnNullableUnknown</code>.
* @exception SQLException If an error occurs.
*/
- int isNullable(int column) throws SQLException;
+ int isNullable(int columnIndex) throws SQLException;
/**
* This method tests whether or not the value of the specified column
* is signed or unsigned.
*
- * @param index The index of the column to test.
+ * @param columnIndex The index of the column to test.
* @return <code>true</code> if the column value is signed, <code>false</code>
* otherwise.
* @exception SQLException If an error occurs.
*/
- boolean isSigned(int column) throws SQLException;
+ boolean isSigned(int columnIndex) throws SQLException;
/**
* This method returns the maximum number of characters that can be used
* to display a value in this column.
*
- * @param index The index of the column to check.
+ * @param columnIndex The index of the column to check.
* @return The maximum number of characters that can be used to display a
* value for this column.
* @exception SQLException If an error occurs.
*/
- int getColumnDisplaySize(int column) throws SQLException;
+ int getColumnDisplaySize(int columnIndex) throws SQLException;
/**
* This method returns a string that should be used as a caption for this
* column for user display purposes.
*
- * @param index The index of the column to check.
+ * @param columnIndex The index of the column to check.
* @return A display string for the column.
* @exception SQLException If an error occurs.
*/
- String getColumnLabel(int column) throws SQLException;
+ String getColumnLabel(int columnIndex) throws SQLException;
/**
* This method returns the name of the specified column.
*
- * @param index The index of the column to return the name of.
+ * @param columnIndex The index of the column to return the name of.
* @return The name of the column.
* @exception SQLException If an error occurs.
*/
- String getColumnName(int column) throws SQLException;
+ String getColumnName(int columnIndex) throws SQLException;
/**
* This method returns the name of the schema that contains the specified
* column.
*
- * @param index The index of the column to check the schema name for.
+ * @param columnIndex The index of the column to check the schema name for.
* @return The name of the schema that contains the column.
* @exception SQLException If an error occurs.
*/
- String getSchemaName(int column) throws SQLException;
+ String getSchemaName(int columnIndex) throws SQLException;
/**
* This method returns the precision of the specified column, which is the
* number of decimal digits it contains.
*
- * @param index The index of the column to check the precision on.
+ * @param columnIndex The index of the column to check the precision on.
* @return The precision of the specified column.
* @exception SQLException If an error occurs.
*/
- int getPrecision(int column) throws SQLException;
+ int getPrecision(int columnIndex) throws SQLException;
/**
* This method returns the scale of the specified column, which is the
* number of digits to the right of the decimal point.
*
- * @param index The index column to check the scale of.
+ * @param columnIndex The index column to check the scale of.
* @return The scale of the column.
* @exception SQLException If an error occurs.
*/
- int getScale(int column) throws SQLException;
+ int getScale(int columnIndex) throws SQLException;
/**
* This method returns the name of the table containing the specified
* column.
*
- * @param index The index of the column to check the table name for.
+ * @param columnIndex The index of the column to check the table name for.
* @return The name of the table containing the column.
* @exception SQLException If an error occurs.
*/
- String getTableName(int column) throws SQLException;
+ String getTableName(int columnIndex) throws SQLException;
/**
* This method returns the name of the catalog containing the specified
* column.
*
- * @param index The index of the column to check the catalog name for.
+ * @param columnIndex The index of the column to check the catalog name for.
* @return The name of the catalog containing the column.
* @exception SQLException If an error occurs.
*/
- String getCatalogName(int column) throws SQLException;
+ String getCatalogName(int columnIndex) throws SQLException;
/**
* This method returns the SQL type of the specified column. This will
* be one of the constants from <code>Types</code>.
*
- * @param index The index of the column to check the SQL type of.
+ * @param columnIndex The index of the column to check the SQL type of.
* @return The SQL type for this column.
* @exception SQLException If an error occurs.
* @see Types
*/
- int getColumnType(int column) throws SQLException;
+ int getColumnType(int columnIndex) throws SQLException;
/**
* This method returns the name of the SQL type for this column.
*
- * @param index The index of the column to check the SQL type name for.
+ * @param columnIndex The index of the column to check the SQL type name for.
* @return The name of the SQL type for this column.
* @exception SQLException If an error occurs.
*/
- String getColumnTypeName(int column) throws SQLException;
+ String getColumnTypeName(int columnIndex) throws SQLException;
/**
* This method tests whether or not the specified column is read only.
*
- * @param index The index of the column to check.
+ * @param columnIndex The index of the column to check.
* @return <code>true</code> if the column is read only, <code>false</code>
* otherwise.
* @exception SQLException If an error occurs.
*/
- boolean isReadOnly(int column) throws SQLException;
+ boolean isReadOnly(int columnIndex) throws SQLException;
/**
* This method tests whether or not the column may be writable. This
* does not guarantee that a write will be successful.
*
- * @param index The index of the column to check for writability.
+ * @param columnIndex The index of the column to check for writability.
* @return <code>true</code> if the column may be writable,
* <code>false</code> otherwise.
* @exception SQLException If an error occurs.
*/
- boolean isWritable(int column) throws SQLException;
+ boolean isWritable(int columnIndex) throws SQLException;
/**
* This method tests whether or not the column is writable. This
* does guarantee that a write will be successful.
*
- * @param index The index of the column to check for writability.
+ * @param columnIndex The index of the column to check for writability.
* @return <code>true</code> if the column is writable,
* <code>false</code> otherwise.
* @exception SQLException If an error occurs.
*/
- boolean isDefinitelyWritable(int column) throws SQLException;
+ boolean isDefinitelyWritable(int columnIndex) throws SQLException;
/**
* This method returns the name of the Java class which will be used to
* create objects representing the data in this column.
*
- * @param index The index of the column to check.
+ * @param columnIndex The index of the column to check.
* @return The name of the Java class that will be used for values in
* this column.
* @exception SQLException If an error occurs.
*/
- String getColumnClassName(int column) throws SQLException;
+ String getColumnClassName(int columnIndex) throws SQLException;
}
diff --git a/libjava/classpath/java/sql/SQLData.java b/libjava/classpath/java/sql/SQLData.java
index 2ba1fb18d05..cf006e15a0d 100644
--- a/libjava/classpath/java/sql/SQLData.java
+++ b/libjava/classpath/java/sql/SQLData.java
@@ -1,5 +1,5 @@
/* SQLData.java -- Custom mapping for a user defined datatype
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,7 +57,7 @@ public interface SQLData
* This method populates the data in the object from the specified stream.
*
* @param stream The stream to read the data from.
- * @param name The data type name of the data on the stream.
+ * @param typeName The data type name of the data on the stream.
* @exception SQLException If an error occurs.
*/
void readSQL(SQLInput stream, String typeName) throws SQLException;
diff --git a/libjava/classpath/java/sql/SQLOutput.java b/libjava/classpath/java/sql/SQLOutput.java
index 8e6c88f8cf6..e210258fa0a 100644
--- a/libjava/classpath/java/sql/SQLOutput.java
+++ b/libjava/classpath/java/sql/SQLOutput.java
@@ -1,5 +1,5 @@
/* SQLOutput.java -- Write SQL values to a stream
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,7 +59,7 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeString(String x) throws SQLException;
+ void writeString(String value) throws SQLException;
/**
* This method writes the specified Java <code>boolean</code>
@@ -68,7 +68,7 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeBoolean(boolean x) throws SQLException;
+ void writeBoolean(boolean value) throws SQLException;
/**
* This method writes the specified Java <code>byte</code>
@@ -77,7 +77,7 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeByte(byte x) throws SQLException;
+ void writeByte(byte value) throws SQLException;
/**
* This method writes the specified Java <code>short</code>
@@ -86,7 +86,7 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeShort(short x) throws SQLException;
+ void writeShort(short value) throws SQLException;
/**
* This method writes the specified Java <code>int</code>
@@ -95,7 +95,7 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeInt(int x) throws SQLException;
+ void writeInt(int value) throws SQLException;
/**
* This method writes the specified Java <code>long</code>
@@ -104,7 +104,7 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeLong(long x) throws SQLException;
+ void writeLong(long value) throws SQLException;
/**
* This method writes the specified Java <code>float</code>
@@ -113,7 +113,7 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeFloat(float x) throws SQLException;
+ void writeFloat(float value) throws SQLException;
/**
* This method writes the specified Java <code>double</code>
@@ -122,7 +122,7 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeDouble(double x) throws SQLException;
+ void writeDouble(double value) throws SQLException;
/**
* This method writes the specified Java <code>BigDecimal</code>
@@ -131,7 +131,7 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeBigDecimal(BigDecimal x) throws SQLException;
+ void writeBigDecimal(BigDecimal value) throws SQLException;
/**
* This method writes the specified Java <code>byte</code> array
@@ -140,7 +140,7 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeBytes(byte[] x) throws SQLException;
+ void writeBytes(byte[] value) throws SQLException;
/**
* This method writes the specified Java <code>java.sql.Date</code>
@@ -149,7 +149,7 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeDate(Date x) throws SQLException;
+ void writeDate(Date value) throws SQLException;
/**
* This method writes the specified Java <code>java.sql.Time</code>
@@ -158,7 +158,7 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeTime(Time x) throws SQLException;
+ void writeTime(Time value) throws SQLException;
/**
* This method writes the specified Java <code>java.sql.Timestamp</code>
@@ -167,34 +167,34 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeTimestamp(Timestamp x) throws SQLException;
+ void writeTimestamp(Timestamp value) throws SQLException;
/**
* This method writes the specified Java character stream
* to the SQL stream.
*
- * @param value The value to write to the stream.
+ * @param stream The stream that holds the character data to write.
* @exception SQLException If an error occurs.
*/
- void writeCharacterStream(Reader x) throws SQLException;
+ void writeCharacterStream(Reader stream) throws SQLException;
/**
* This method writes the specified ASCII text stream
* to the SQL stream.
*
- * @param value The value to write to the stream.
+ * @param stream The stream that holds the ASCII data to write.
* @exception SQLException If an error occurs.
*/
- void writeAsciiStream(InputStream x) throws SQLException;
+ void writeAsciiStream(InputStream stream) throws SQLException;
/**
* This method writes the specified uninterpreted binary byte stream
* to the SQL stream.
*
- * @param value The value to write to the stream.
+ * @param stream The stream that holds the binary data to write.
* @exception SQLException If an error occurs.
*/
- void writeBinaryStream(InputStream x) throws SQLException;
+ void writeBinaryStream(InputStream stream) throws SQLException;
/**
* This method writes the specified Java <code>SQLData</code> object
@@ -203,43 +203,48 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeObject(SQLData x) throws SQLException;
+ void writeObject(SQLData value) throws SQLException;
/**
* This method writes the specified Java SQL <code>Ref</code> object
* to the SQL stream.
*
- * @param value The value to write to the stream.
+ * @param value The <code>Ref</code> object to write to the stream.
* @exception SQLException If an error occurs.
+ * @see Ref
*/
- void writeRef(Ref x) throws SQLException;
+ void writeRef(Ref value) throws SQLException;
+
/**
* This method writes the specified Java SQL <code>Blob</code> object
* to the SQL stream.
*
- * @param value The value to write to the stream.
+ * @param value The <code>Blob</code> object to write to the stream.
* @exception SQLException If an error occurs.
+ * @see Blob
*/
- void writeBlob(Blob x) throws SQLException;
+ void writeBlob(Blob value) throws SQLException;
/**
* This method writes the specified Java SQL <code>Clob</code> object
* to the SQL stream.
*
- * @param value The value to write to the stream.
+ * @param value The <code>Clob</code> object to write to the stream.
* @exception SQLException If an error occurs.
+ * @see Clob
*/
- void writeClob(Clob x) throws SQLException;
+ void writeClob(Clob value) throws SQLException;
/**
* This method writes the specified Java SQL <code>Struct</code> object
* to the SQL stream.
*
- * @param value The value to write to the stream.
+ * @param value The <code>Struct</code> object to write to the stream.
* @exception SQLException If an error occurs.
+ * @see Struct
*/
- void writeStruct(Struct x) throws SQLException;
+ void writeStruct(Struct value) throws SQLException;
/**
* This method writes the specified Java SQL <code>Array</code> object
@@ -248,10 +253,15 @@ public interface SQLOutput
* @param value The value to write to the stream.
* @exception SQLException If an error occurs.
*/
- void writeArray(Array x) throws SQLException;
+ void writeArray(Array value) throws SQLException;
/**
+ * This method writes the specified <code>java.net.URL</code> object to the
+ * SQL stream.
+ *
+ * @param value The value to write to the stream.
+ * @exception SQLException If an error occurs.
* @since 1.4
*/
- void writeURL(URL x) throws SQLException;
+ void writeURL(URL value) throws SQLException;
}
diff --git a/libjava/classpath/java/sql/SQLWarning.java b/libjava/classpath/java/sql/SQLWarning.java
index 841d137e13a..d9c7e354ed6 100644
--- a/libjava/classpath/java/sql/SQLWarning.java
+++ b/libjava/classpath/java/sql/SQLWarning.java
@@ -1,5 +1,5 @@
/* SQLWarning.java -- Database access warnings.
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,9 +56,9 @@ public class SQLWarning extends SQLException
* @param SQLState A string containing the SQL state of the error.
* @param vendorCode The vendor error code associated with this error.
*/
- public SQLWarning(String reason, String SQLState, int vendorCode)
+ public SQLWarning(String message, String SQLState, int vendorCode)
{
- super(reason, SQLState, vendorCode);
+ super(message, SQLState, vendorCode);
}
/**
diff --git a/libjava/classpath/java/sql/Statement.java b/libjava/classpath/java/sql/Statement.java
index 42e8e8e8816..195600eaa2c 100644
--- a/libjava/classpath/java/sql/Statement.java
+++ b/libjava/classpath/java/sql/Statement.java
@@ -1,5 +1,5 @@
/* Statement.java -- Interface for executing SQL statements.
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -91,10 +91,10 @@ public interface Statement
/**
* This method sets the limit for the maximum length of any column in bytes.
*
- * @param maxsize The new maximum length of any column in bytes.
+ * @param maxSize The new maximum length of any column in bytes.
* @exception SQLException If an error occurs.
*/
- void setMaxFieldSize(int max) throws SQLException;
+ void setMaxFieldSize(int maxSize) throws SQLException;
/**
* This method returns the maximum possible number of rows in a result set.
@@ -108,20 +108,20 @@ public interface Statement
* This method sets the maximum number of rows that can be present in a
* result set.
*
- * @param maxrows The maximum possible number of rows in a result set.
+ * @param maxRows The maximum possible number of rows in a result set.
* @exception SQLException If an error occurs.
*/
- void setMaxRows(int max) throws SQLException;
+ void setMaxRows(int maxRows) throws SQLException;
/**
* This method sets the local escape processing mode on or off. The
* default value is on.
*
* @param escape <code>true</code> to enable local escape processing,
- * <code>false</code> to disable it.
+ * <code>false</code> to disable it.
* @exception SQLException If an error occurs.
*/
- void setEscapeProcessing(boolean enable) throws SQLException;
+ void setEscapeProcessing(boolean escape) throws SQLException;
/**
* The method returns the number of seconds a statement may be in process
@@ -136,7 +136,7 @@ public interface Statement
* This method sets the number of seconds a statement may be in process
* before timing out. A value of 0 means there is no timeout.
*
- * @param timeout The new SQL statement timeout value.
+ * @param seconds The new SQL statement timeout value.
* @exception SQLException If an error occurs.
*/
void setQueryTimeout(int seconds) throws SQLException;
@@ -192,7 +192,10 @@ public interface Statement
* @return The result set of the query, or <code>null</code> if there was
* no result set (for example, if the statement was an UPDATE).
* @exception SQLException If an error occurs.
- * @see execute
+ * @see #execute(String)
+ * @see #execute(String, int)
+ * @see #execute(String, int[])
+ * @see #execute(String, String[])
*/
ResultSet getResultSet() throws SQLException;
@@ -203,7 +206,10 @@ public interface Statement
* @return The update count of the query, or -1 if there was no update
* count (for example, if the statement was a SELECT).
* @exception SQLException If an error occurs.
- * @see execute
+ * @see #execute(String)
+ * @see #execute(String, int)
+ * @see #execute(String, int[])
+ * @see #execute(String, String[])
*/
int getUpdateCount() throws SQLException;
@@ -215,7 +221,10 @@ public interface Statement
* <code>false</code> otherwise (for example, the next result is an
* update count).
* @exception SQLException If an error occurs.
- * @see execute
+ * @see #execute(String)
+ * @see #execute(String, int)
+ * @see #execute(String, int[])
+ * @see #execute(String, String[])
*/
boolean getMoreResults() throws SQLException;
@@ -241,11 +250,11 @@ public interface Statement
* This method informs the driver how many rows it should fetch from the
* database at a time.
*
- * @param numrows The number of rows the driver should fetch at a time
- * to populate the result set.
+ * @param numRows The number of rows the driver should fetch at a time
+ * to populate the result set.
* @exception SQLException If an error occurs.
*/
- void setFetchSize(int rows) throws SQLException;
+ void setFetchSize(int numRows) throws SQLException;
/**
* This method returns the number of rows the driver believes should be
diff --git a/libjava/classpath/java/sql/Time.java b/libjava/classpath/java/sql/Time.java
index 57551528b43..2d1a433fa41 100644
--- a/libjava/classpath/java/sql/Time.java
+++ b/libjava/classpath/java/sql/Time.java
@@ -1,5 +1,6 @@
/* Time.java -- Wrapper around java.util.Date
- Copyright (C) 1999, 2000, 2002, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2003, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -177,10 +178,10 @@ public class Time extends java.util.Date
/**
* This method initializes a new instance of this class with the
- * specified time value representing the number of seconds since
+ * specified time value representing the number of milliseconds since
* Jan 1, 1970 at 12:00 midnight GMT.
*
- * @param time The time value to intialize this <code>Time</code> to.
+ * @param date The time value to intialize this <code>Time</code> to.
*/
public Time(long date)
{
diff --git a/libjava/classpath/java/sql/Timestamp.java b/libjava/classpath/java/sql/Timestamp.java
index f3459b22f3e..66a57641a02 100644
--- a/libjava/classpath/java/sql/Timestamp.java
+++ b/libjava/classpath/java/sql/Timestamp.java
@@ -1,5 +1,5 @@
/* Time.java -- Wrapper around java.util.Date
- Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -143,7 +143,7 @@ public class Timestamp extends java.util.Date
* specified time value representing the number of milliseconds since
* Jan 1, 1970 at 12:00 midnight GMT.
*
- * @param time The time value to intialize this <code>Time</code> to.
+ * @param date The time value to intialize this <code>Time</code> to.
*/
public Timestamp(long date)
{
@@ -279,12 +279,13 @@ public class Timestamp extends java.util.Date
}
/**
- * Compare two Timestamp
- * @param when the other Timestamp.
- * @return 0, if the date represented
- * by obj is exactly the same as the time represented by this
- * object, a negative if this Timestamp is before the other Timestamp, and
- * a positive value otherwise.
+ * Compares this <code>Timestamp</code> to another one.
+ *
+ * @param ts The other Timestamp.
+ * @return <code>0</code>, if both <code>Timestamp</code>'s represent exactly
+ * the same date, a negative value if this <code>Timestamp</code> is
+ * before the specified <code>Timestamp</code> and a positive value
+ * otherwise.
* @since 1.2
*/
public int compareTo(Timestamp ts)
@@ -297,15 +298,18 @@ public class Timestamp extends java.util.Date
}
/**
- * Compares this Timestamp to another. This behaves like
+ * Compares this <code>Timestamp</code> to another one. This behaves like
* <code>compareTo(Timestamp)</code>, but it may throw a
- * <code>ClassCastException</code>
- * @param obj the other Timestamp.
- * @return 0, if the Timestamp represented
- * by obj is exactly the same as the time represented by this
- * object, a negative if this Timestamp is before the other Timestamp, and
- * a positive value otherwise.
+ * <code>ClassCastException</code>, if the specified object is not of type
+ * <code>Timestamp</code>.
+ *
+ * @param obj The object to compare with.
+ * @return <code>0</code>, if both <code>Timestamp</code>'s represent exactly
+ * the same date, a negative value if this <code>Timestamp</code> is
+ * before the specified <code>Timestamp</code> and a positive value
+ * otherwise.
* @exception ClassCastException if obj is not of type Timestamp.
+ * @see #compareTo(Timestamp)
* @since 1.2
*/
public int compareTo(Object obj)