[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] [generics] Patch: FYI: java.sql
From: |
Tom Tromey |
Subject: |
[cp-patches] [generics] Patch: FYI: java.sql |
Date: |
Sun, 27 Nov 2005 08:11:48 -0700 |
I'm checking this in on the generics branch.
This genericizes java.sql.
Tom
2005-11-27 Tom Tromey <address@hidden>
* java/sql/Struct.java (getAttributes): Genericized.
* java/sql/ResultSet.java (getObject): Genericized.
* java/sql/Ref.java (getObject): Genericized.
* java/sql/DriverManager.java (getDrivers): Genericized.
* java/sql/Connection.java (getTypeMap): Genericized.
(setTypeMap): Likewise.
* java/sql/CallableStatement.java (getObject): Genericized.
(getObject): Likewise.
* java/sql/Array.java (getBaseTypeName): Fixed javadoc.
(getArray): Likewise.
(getResultSet): Likewise.
(getResultSet): Likewise.
(getArray): Genericized.
(getResultSet): Likewise.
Index: java/sql/Array.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/sql/Array.java,v
retrieving revision 1.7.2.1
diff -u -r1.7.2.1 Array.java
--- java/sql/Array.java 2 Aug 2005 20:12:26 -0000 1.7.2.1
+++ java/sql/Array.java 27 Nov 2005 15:22:37 -0000
@@ -50,7 +50,7 @@
* 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;
@@ -84,7 +84,7 @@
* @return The contents of the array as an array of Java objects.
* @exception SQLException If an error occurs.
*/
- Object getArray(Map map) throws SQLException;
+ Object getArray(Map<String, Class<?>> map) throws SQLException;
/**
* Returns a portion of this array starting at <code>index</code>
@@ -94,7 +94,7 @@
* 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 index The offset 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.
@@ -110,13 +110,14 @@
* <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 index The offset 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 index, int count, Map<String, Class<?>> map)
+ throws SQLException;
/**
* Returns the elements in the array as a <code>ResultSet</code>.
@@ -143,7 +144,7 @@
* @exception SQLException If an error occurs.
* @see ResultSet
*/
- ResultSet getResultSet(Map map) throws SQLException;
+ ResultSet getResultSet(Map<String, Class<?>> map) throws SQLException;
/**
* This method returns a portion of the array as a <code>ResultSet</code>.
@@ -154,8 +155,8 @@
* 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 index 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
@@ -173,8 +174,8 @@
* 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 index 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.
Index: java/sql/CallableStatement.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/sql/CallableStatement.java,v
retrieving revision 1.6.2.1
diff -u -r1.6.2.1 CallableStatement.java
--- java/sql/CallableStatement.java 2 Aug 2005 20:12:26 -0000 1.6.2.1
+++ java/sql/CallableStatement.java 27 Nov 2005 15:22:37 -0000
@@ -250,7 +250,7 @@
* @exception SQLException If an error occurs.
* @since 1.2
*/
- Object getObject(int index, Map map) throws SQLException;
+ Object getObject(int index, Map<String, Class<?>> map) throws SQLException;
/**
* This method returns the value of the specified parameter as a Java
@@ -606,7 +606,8 @@
/**
* @since 1.4
*/
- Object getObject(String parameterName, Map map) throws SQLException;
+ Object getObject(String parameterName, Map<String, Class<?>> map)
+ throws SQLException;
/**
* @since 1.4
Index: java/sql/Connection.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/sql/Connection.java,v
retrieving revision 1.7.2.1
diff -u -r1.7.2.1 Connection.java
--- java/sql/Connection.java 2 Aug 2005 20:12:26 -0000 1.7.2.1
+++ java/sql/Connection.java 27 Nov 2005 15:22:37 -0000
@@ -341,7 +341,7 @@
* @return The SQL type to Java class mapping.
* @exception SQLException If an error occurs.
*/
- Map getTypeMap() throws SQLException;
+ Map<String, Class<?>> getTypeMap() throws SQLException;
/**
* This method sets the mapping table for SQL types to Java classes.
@@ -350,7 +350,7 @@
* @param map The new SQL mapping table.
* @exception SQLException If an error occurs.
*/
- void setTypeMap(Map map) throws SQLException;
+ void setTypeMap(Map<String, Class<?>> map) throws SQLException;
/**
* @since 1.4
Index: java/sql/DriverManager.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/sql/DriverManager.java,v
retrieving revision 1.11.2.1
diff -u -r1.11.2.1 DriverManager.java
--- java/sql/DriverManager.java 2 Aug 2005 20:12:26 -0000 1.11.2.1
+++ java/sql/DriverManager.java 27 Nov 2005 15:22:38 -0000
@@ -263,7 +263,7 @@
*
* @return An <code>Enumeration</code> of all currently loaded JDBC drivers.
*/
- public static Enumeration getDrivers()
+ public static Enumeration<Driver> getDrivers()
{
Vector v = new Vector();
Enumeration e = drivers.elements();
Index: java/sql/Ref.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/sql/Ref.java,v
retrieving revision 1.6.2.1
diff -u -r1.6.2.1 Ref.java
--- java/sql/Ref.java 2 Aug 2005 20:12:26 -0000 1.6.2.1
+++ java/sql/Ref.java 27 Nov 2005 15:22:38 -0000
@@ -61,7 +61,7 @@
/**
* @since 1.4
*/
- Object getObject(Map map) throws SQLException;
+ Object getObject(Map<String, Class<?>> map) throws SQLException;
/**
* @since 1.4
Index: java/sql/ResultSet.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/sql/ResultSet.java,v
retrieving revision 1.7.2.1
diff -u -r1.7.2.1 ResultSet.java
--- java/sql/ResultSet.java 2 Aug 2005 20:12:26 -0000 1.7.2.1
+++ java/sql/ResultSet.java 27 Nov 2005 15:22:38 -0000
@@ -1309,7 +1309,7 @@
* @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 i, Map<String, Class<?>> map) throws SQLException;
/**
* This method returns a <code>Ref</code> for the specified column which
@@ -1357,7 +1357,8 @@
* @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 colName, Map<String, Class<?>> map)
+ throws SQLException;
/**
* This method returns a <code>Ref</code> for the specified column which
Index: java/sql/Struct.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/sql/Struct.java,v
retrieving revision 1.6.2.1
diff -u -r1.6.2.1 Struct.java
--- java/sql/Struct.java 2 Aug 2005 20:12:26 -0000 1.6.2.1
+++ java/sql/Struct.java 27 Nov 2005 15:22:38 -0000
@@ -73,5 +73,5 @@
* @return The attributes of this structure type.
* @exception SQLException If a error occurs.
*/
- Object[] getAttributes(Map map) throws SQLException;
+ Object[] getAttributes(Map<String, Class<?>> map) throws SQLException;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] [generics] Patch: FYI: java.sql,
Tom Tromey <=