jdk/src/share/classes/javax/sql/rowset/BaseRowSet.java
changeset 6697 39929804f9d4
parent 6692 aef4e294026f
child 9257 53e6d7bc31b0
equal deleted inserted replaced
6696:7201f23dae0d 6697:39929804f9d4
  1561         Object nullVal[];
  1561         Object nullVal[];
  1562         checkParamIndex(parameterIndex);
  1562         checkParamIndex(parameterIndex);
  1563 
  1563 
  1564         nullVal = new Object[2];
  1564         nullVal = new Object[2];
  1565         nullVal[0] = null;
  1565         nullVal[0] = null;
  1566         nullVal[1] = new Integer(sqlType);
  1566         nullVal[1] = Integer.valueOf(sqlType);
  1567 
  1567 
  1568        if (params == null){
  1568        if (params == null){
  1569             throw new SQLException("Set initParams() before setNull");
  1569             throw new SQLException("Set initParams() before setNull");
  1570        }
  1570        }
  1571 
  1571 
  1572         params.put(new Integer(parameterIndex - 1), nullVal);
  1572         params.put(Integer.valueOf(parameterIndex - 1), nullVal);
  1573     }
  1573     }
  1574 
  1574 
  1575     /**
  1575     /**
  1576      * Sets the designated parameter to SQL <code>NULL</code>.
  1576      * Sets the designated parameter to SQL <code>NULL</code>.
  1577      *
  1577      *
  1642         Object nullVal[];
  1642         Object nullVal[];
  1643         checkParamIndex(parameterIndex);
  1643         checkParamIndex(parameterIndex);
  1644 
  1644 
  1645         nullVal = new Object[3];
  1645         nullVal = new Object[3];
  1646         nullVal[0] = null;
  1646         nullVal[0] = null;
  1647         nullVal[1] = new Integer(sqlType);
  1647         nullVal[1] = Integer.valueOf(sqlType);
  1648         nullVal[2] = typeName;
  1648         nullVal[2] = typeName;
  1649 
  1649 
  1650        if(params == null){
  1650        if(params == null){
  1651             throw new SQLException("Set initParams() before setNull");
  1651             throw new SQLException("Set initParams() before setNull");
  1652        }
  1652        }
  1653 
  1653 
  1654         params.put(new Integer(parameterIndex - 1), nullVal);
  1654         params.put(Integer.valueOf(parameterIndex - 1), nullVal);
  1655     }
  1655     }
  1656 
  1656 
  1657 
  1657 
  1658     /**
  1658     /**
  1659      * Sets the designated parameter to the given <code>boolean</code> in the
  1659      * Sets the designated parameter to the given <code>boolean</code> in the
  1684 
  1684 
  1685        if(params == null){
  1685        if(params == null){
  1686             throw new SQLException("Set initParams() before setNull");
  1686             throw new SQLException("Set initParams() before setNull");
  1687        }
  1687        }
  1688 
  1688 
  1689         params.put(new Integer(parameterIndex - 1), new Boolean(x));
  1689         params.put(Integer.valueOf(parameterIndex - 1), Boolean.valueOf(x));
  1690     }
  1690     }
  1691 
  1691 
  1692     /**
  1692     /**
  1693      * Sets the designated parameter to the given <code>byte</code> in the Java
  1693      * Sets the designated parameter to the given <code>byte</code> in the Java
  1694      * programming language.  The driver converts this to an SQL
  1694      * programming language.  The driver converts this to an SQL
  1718 
  1718 
  1719        if(params == null){
  1719        if(params == null){
  1720             throw new SQLException("Set initParams() before setByte");
  1720             throw new SQLException("Set initParams() before setByte");
  1721        }
  1721        }
  1722 
  1722 
  1723         params.put(new Integer(parameterIndex - 1), new Byte(x));
  1723         params.put(Integer.valueOf(parameterIndex - 1), Byte.valueOf(x));
  1724     }
  1724     }
  1725 
  1725 
  1726     /**
  1726     /**
  1727      * Sets the designated parameter to the given <code>short</code> in the
  1727      * Sets the designated parameter to the given <code>short</code> in the
  1728      * Java programming language.  The driver converts this to an SQL
  1728      * Java programming language.  The driver converts this to an SQL
  1752 
  1752 
  1753         if(params == null){
  1753         if(params == null){
  1754              throw new SQLException("Set initParams() before setShort");
  1754              throw new SQLException("Set initParams() before setShort");
  1755         }
  1755         }
  1756 
  1756 
  1757         params.put(new Integer(parameterIndex - 1), new Short(x));
  1757         params.put(Integer.valueOf(parameterIndex - 1), Short.valueOf(x));
  1758     }
  1758     }
  1759 
  1759 
  1760     /**
  1760     /**
  1761      * Sets the designated parameter to an <code>int</code> in the Java
  1761      * Sets the designated parameter to an <code>int</code> in the Java
  1762      * programming language.  The driver converts this to an SQL
  1762      * programming language.  The driver converts this to an SQL
  1784     public void setInt(int parameterIndex, int x) throws SQLException {
  1784     public void setInt(int parameterIndex, int x) throws SQLException {
  1785         checkParamIndex(parameterIndex);
  1785         checkParamIndex(parameterIndex);
  1786         if(params == null){
  1786         if(params == null){
  1787              throw new SQLException("Set initParams() before setInt");
  1787              throw new SQLException("Set initParams() before setInt");
  1788         }
  1788         }
  1789         params.put(new Integer(parameterIndex - 1), new Integer(x));
  1789         params.put(Integer.valueOf(parameterIndex - 1), Integer.valueOf(x));
  1790     }
  1790     }
  1791 
  1791 
  1792     /**
  1792     /**
  1793      * Sets the designated parameter to the given <code>long</code> in the Java
  1793      * Sets the designated parameter to the given <code>long</code> in the Java
  1794      * programming language.  The driver converts this to an SQL
  1794      * programming language.  The driver converts this to an SQL
  1816     public void setLong(int parameterIndex, long x) throws SQLException {
  1816     public void setLong(int parameterIndex, long x) throws SQLException {
  1817         checkParamIndex(parameterIndex);
  1817         checkParamIndex(parameterIndex);
  1818         if(params == null){
  1818         if(params == null){
  1819              throw new SQLException("Set initParams() before setLong");
  1819              throw new SQLException("Set initParams() before setLong");
  1820         }
  1820         }
  1821         params.put(new Integer(parameterIndex - 1), new Long(x));
  1821         params.put(Integer.valueOf(parameterIndex - 1), Long.valueOf(x));
  1822     }
  1822     }
  1823 
  1823 
  1824     /**
  1824     /**
  1825      * Sets the designated parameter to the given <code>float</code> in the
  1825      * Sets the designated parameter to the given <code>float</code> in the
  1826      * Java programming language.  The driver converts this to an SQL
  1826      * Java programming language.  The driver converts this to an SQL
  1848     public void setFloat(int parameterIndex, float x) throws SQLException {
  1848     public void setFloat(int parameterIndex, float x) throws SQLException {
  1849         checkParamIndex(parameterIndex);
  1849         checkParamIndex(parameterIndex);
  1850         if(params == null){
  1850         if(params == null){
  1851              throw new SQLException("Set initParams() before setFloat");
  1851              throw new SQLException("Set initParams() before setFloat");
  1852         }
  1852         }
  1853         params.put(new Integer(parameterIndex - 1), new Float(x));
  1853         params.put(Integer.valueOf(parameterIndex - 1), new Float(x));
  1854     }
  1854     }
  1855 
  1855 
  1856     /**
  1856     /**
  1857      * Sets the designated parameter to the given <code>double</code> in the
  1857      * Sets the designated parameter to the given <code>double</code> in the
  1858      * Java programming language.  The driver converts this to an SQL
  1858      * Java programming language.  The driver converts this to an SQL
  1880     public void setDouble(int parameterIndex, double x) throws SQLException {
  1880     public void setDouble(int parameterIndex, double x) throws SQLException {
  1881         checkParamIndex(parameterIndex);
  1881         checkParamIndex(parameterIndex);
  1882         if(params == null){
  1882         if(params == null){
  1883              throw new SQLException("Set initParams() before setDouble");
  1883              throw new SQLException("Set initParams() before setDouble");
  1884         }
  1884         }
  1885         params.put(new Integer(parameterIndex - 1), new Double(x));
  1885         params.put(Integer.valueOf(parameterIndex - 1), new Double(x));
  1886     }
  1886     }
  1887 
  1887 
  1888     /**
  1888     /**
  1889      * Sets the designated parameter to the given
  1889      * Sets the designated parameter to the given
  1890      * <code>java.lang.BigDecimal</code> value.  The driver converts this to
  1890      * <code>java.lang.BigDecimal</code> value.  The driver converts this to
  1912     public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws SQLException {
  1912     public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws SQLException {
  1913         checkParamIndex(parameterIndex);
  1913         checkParamIndex(parameterIndex);
  1914         if(params == null){
  1914         if(params == null){
  1915              throw new SQLException("Set initParams() before setBigDecimal");
  1915              throw new SQLException("Set initParams() before setBigDecimal");
  1916         }
  1916         }
  1917         params.put(new Integer(parameterIndex - 1), x);
  1917         params.put(Integer.valueOf(parameterIndex - 1), x);
  1918     }
  1918     }
  1919 
  1919 
  1920     /**
  1920     /**
  1921      * Sets the designated parameter to the given <code>String</code>
  1921      * Sets the designated parameter to the given <code>String</code>
  1922      * value.  The driver converts this to an SQL
  1922      * value.  The driver converts this to an SQL
  1946     public void setString(int parameterIndex, String x) throws SQLException {
  1946     public void setString(int parameterIndex, String x) throws SQLException {
  1947         checkParamIndex(parameterIndex);
  1947         checkParamIndex(parameterIndex);
  1948         if(params == null){
  1948         if(params == null){
  1949              throw new SQLException("Set initParams() before setString");
  1949              throw new SQLException("Set initParams() before setString");
  1950         }
  1950         }
  1951         params.put(new Integer(parameterIndex - 1), x);
  1951         params.put(Integer.valueOf(parameterIndex - 1), x);
  1952     }
  1952     }
  1953 
  1953 
  1954     /**
  1954     /**
  1955      * Sets the designated parameter to the given array of bytes.
  1955      * Sets the designated parameter to the given array of bytes.
  1956      * The driver converts this to an SQL
  1956      * The driver converts this to an SQL
  1980     public void setBytes(int parameterIndex, byte x[]) throws SQLException {
  1980     public void setBytes(int parameterIndex, byte x[]) throws SQLException {
  1981         checkParamIndex(parameterIndex);
  1981         checkParamIndex(parameterIndex);
  1982         if(params == null){
  1982         if(params == null){
  1983              throw new SQLException("Set initParams() before setBytes");
  1983              throw new SQLException("Set initParams() before setBytes");
  1984         }
  1984         }
  1985         params.put(new Integer(parameterIndex - 1), x);
  1985         params.put(Integer.valueOf(parameterIndex - 1), x);
  1986     }
  1986     }
  1987 
  1987 
  1988     /**
  1988     /**
  1989      * Sets the designated parameter to the given <code>java.sql.Date</code>
  1989      * Sets the designated parameter to the given <code>java.sql.Date</code>
  1990      * value. The driver converts this to an SQL
  1990      * value. The driver converts this to an SQL
  2022         checkParamIndex(parameterIndex);
  2022         checkParamIndex(parameterIndex);
  2023 
  2023 
  2024         if(params == null){
  2024         if(params == null){
  2025              throw new SQLException("Set initParams() before setDate");
  2025              throw new SQLException("Set initParams() before setDate");
  2026         }
  2026         }
  2027         params.put(new Integer(parameterIndex - 1), x);
  2027         params.put(Integer.valueOf(parameterIndex - 1), x);
  2028     }
  2028     }
  2029 
  2029 
  2030     /**
  2030     /**
  2031      * Sets the designated parameter to the given <code>java.sql.Time</code>
  2031      * Sets the designated parameter to the given <code>java.sql.Time</code>
  2032      * value.  The driver converts this to an SQL <code>TIME</code> value
  2032      * value.  The driver converts this to an SQL <code>TIME</code> value
  2067         checkParamIndex(parameterIndex);
  2067         checkParamIndex(parameterIndex);
  2068         if(params == null){
  2068         if(params == null){
  2069              throw new SQLException("Set initParams() before setTime");
  2069              throw new SQLException("Set initParams() before setTime");
  2070         }
  2070         }
  2071 
  2071 
  2072         params.put(new Integer(parameterIndex - 1), x);
  2072         params.put(Integer.valueOf(parameterIndex - 1), x);
  2073     }
  2073     }
  2074 
  2074 
  2075     /**
  2075     /**
  2076      * Sets the designated parameter to the given
  2076      * Sets the designated parameter to the given
  2077      * <code>java.sql.Timestamp</code> value.
  2077      * <code>java.sql.Timestamp</code> value.
  2110         checkParamIndex(parameterIndex);
  2110         checkParamIndex(parameterIndex);
  2111         if(params == null){
  2111         if(params == null){
  2112              throw new SQLException("Set initParams() before setTimestamp");
  2112              throw new SQLException("Set initParams() before setTimestamp");
  2113         }
  2113         }
  2114 
  2114 
  2115         params.put(new Integer(parameterIndex - 1), x);
  2115         params.put(Integer.valueOf(parameterIndex - 1), x);
  2116     }
  2116     }
  2117 
  2117 
  2118     /**
  2118     /**
  2119      * Sets the designated parameter to the given
  2119      * Sets the designated parameter to the given
  2120      * <code>java.io.InputStream</code> object,
  2120      * <code>java.io.InputStream</code> object,
  2183         Object asciiStream[];
  2183         Object asciiStream[];
  2184         checkParamIndex(parameterIndex);
  2184         checkParamIndex(parameterIndex);
  2185 
  2185 
  2186         asciiStream = new Object[3];
  2186         asciiStream = new Object[3];
  2187         asciiStream[0] = x;
  2187         asciiStream[0] = x;
  2188         asciiStream[1] = new Integer(length);
  2188         asciiStream[1] = Integer.valueOf(length);
  2189         asciiStream[2] = new Integer(ASCII_STREAM_PARAM);
  2189         asciiStream[2] = Integer.valueOf(ASCII_STREAM_PARAM);
  2190 
  2190 
  2191         if(params == null){
  2191         if(params == null){
  2192              throw new SQLException("Set initParams() before setAsciiStream");
  2192              throw new SQLException("Set initParams() before setAsciiStream");
  2193         }
  2193         }
  2194 
  2194 
  2195         params.put(new Integer(parameterIndex - 1), asciiStream);
  2195         params.put(Integer.valueOf(parameterIndex - 1), asciiStream);
  2196     }
  2196     }
  2197 
  2197 
  2198   /**
  2198   /**
  2199    * Sets the designated parameter in this <code>RowSet</code> object's command
  2199    * Sets the designated parameter in this <code>RowSet</code> object's command
  2200    * to the given input stream.
  2200    * to the given input stream.
  2288         Object binaryStream[];
  2288         Object binaryStream[];
  2289         checkParamIndex(parameterIndex);
  2289         checkParamIndex(parameterIndex);
  2290 
  2290 
  2291         binaryStream = new Object[3];
  2291         binaryStream = new Object[3];
  2292         binaryStream[0] = x;
  2292         binaryStream[0] = x;
  2293         binaryStream[1] = new Integer(length);
  2293         binaryStream[1] = Integer.valueOf(length);
  2294         binaryStream[2] = new Integer(BINARY_STREAM_PARAM);
  2294         binaryStream[2] = Integer.valueOf(BINARY_STREAM_PARAM);
  2295         if(params == null){
  2295         if(params == null){
  2296              throw new SQLException("Set initParams() before setBinaryStream");
  2296              throw new SQLException("Set initParams() before setBinaryStream");
  2297         }
  2297         }
  2298 
  2298 
  2299         params.put(new Integer(parameterIndex - 1), binaryStream);
  2299         params.put(Integer.valueOf(parameterIndex - 1), binaryStream);
  2300     }
  2300     }
  2301 
  2301 
  2302 
  2302 
  2303    /**
  2303    /**
  2304    * Sets the designated parameter in this <code>RowSet</code> object's command
  2304    * Sets the designated parameter in this <code>RowSet</code> object's command
  2394         Object unicodeStream[];
  2394         Object unicodeStream[];
  2395         checkParamIndex(parameterIndex);
  2395         checkParamIndex(parameterIndex);
  2396 
  2396 
  2397         unicodeStream = new Object[3];
  2397         unicodeStream = new Object[3];
  2398         unicodeStream[0] = x;
  2398         unicodeStream[0] = x;
  2399         unicodeStream[1] = new Integer(length);
  2399         unicodeStream[1] = Integer.valueOf(length);
  2400         unicodeStream[2] = new Integer(UNICODE_STREAM_PARAM);
  2400         unicodeStream[2] = Integer.valueOf(UNICODE_STREAM_PARAM);
  2401         if(params == null){
  2401         if(params == null){
  2402              throw new SQLException("Set initParams() before setUnicodeStream");
  2402              throw new SQLException("Set initParams() before setUnicodeStream");
  2403         }
  2403         }
  2404         params.put(new Integer(parameterIndex - 1), unicodeStream);
  2404         params.put(Integer.valueOf(parameterIndex - 1), unicodeStream);
  2405     }
  2405     }
  2406 
  2406 
  2407     /**
  2407     /**
  2408      * Sets the designated parameter to the given <code>java.io.Reader</code>
  2408      * Sets the designated parameter to the given <code>java.io.Reader</code>
  2409      * object, which will have the specified number of characters. The
  2409      * object, which will have the specified number of characters. The
  2473         Object charStream[];
  2473         Object charStream[];
  2474         checkParamIndex(parameterIndex);
  2474         checkParamIndex(parameterIndex);
  2475 
  2475 
  2476         charStream = new Object[2];
  2476         charStream = new Object[2];
  2477         charStream[0] = reader;
  2477         charStream[0] = reader;
  2478         charStream[1] = new Integer(length);
  2478         charStream[1] = Integer.valueOf(length);
  2479         if(params == null){
  2479         if(params == null){
  2480              throw new SQLException("Set initParams() before setCharacterStream");
  2480              throw new SQLException("Set initParams() before setCharacterStream");
  2481         }
  2481         }
  2482         params.put(new Integer(parameterIndex - 1), charStream);
  2482         params.put(Integer.valueOf(parameterIndex - 1), charStream);
  2483     }
  2483     }
  2484 
  2484 
  2485    /**
  2485    /**
  2486    * Sets the designated parameter in this <code>RowSet</code> object's command
  2486    * Sets the designated parameter in this <code>RowSet</code> object's command
  2487    * to the given <code>Reader</code>
  2487    * to the given <code>Reader</code>
  2589         Object obj[];
  2589         Object obj[];
  2590         checkParamIndex(parameterIndex);
  2590         checkParamIndex(parameterIndex);
  2591 
  2591 
  2592         obj = new Object[3];
  2592         obj = new Object[3];
  2593         obj[0] = x;
  2593         obj[0] = x;
  2594         obj[1] = new Integer(targetSqlType);
  2594         obj[1] = Integer.valueOf(targetSqlType);
  2595         obj[2] = new Integer(scale);
  2595         obj[2] = Integer.valueOf(scale);
  2596         if(params == null){
  2596         if(params == null){
  2597              throw new SQLException("Set initParams() before setObject");
  2597              throw new SQLException("Set initParams() before setObject");
  2598         }
  2598         }
  2599         params.put(new Integer(parameterIndex - 1), obj);
  2599         params.put(Integer.valueOf(parameterIndex - 1), obj);
  2600     }
  2600     }
  2601 
  2601 
  2602     /**
  2602     /**
  2603      * Sets the value of the designated parameter with the given
  2603      * Sets the value of the designated parameter with the given
  2604      * <code>Object</code> value.
  2604      * <code>Object</code> value.
  2652         Object obj[];
  2652         Object obj[];
  2653         checkParamIndex(parameterIndex);
  2653         checkParamIndex(parameterIndex);
  2654 
  2654 
  2655         obj = new Object[2];
  2655         obj = new Object[2];
  2656         obj[0] = x;
  2656         obj[0] = x;
  2657         obj[1] = new Integer(targetSqlType);
  2657         obj[1] = Integer.valueOf(targetSqlType);
  2658         if (params == null){
  2658         if (params == null){
  2659              throw new SQLException("Set initParams() before setObject");
  2659              throw new SQLException("Set initParams() before setObject");
  2660         }
  2660         }
  2661         params.put(new Integer(parameterIndex - 1), obj);
  2661         params.put(Integer.valueOf(parameterIndex - 1), obj);
  2662     }
  2662     }
  2663 
  2663 
  2664     /**
  2664     /**
  2665      * Sets the designated parameter to an <code>Object</code> in the Java
  2665      * Sets the designated parameter to an <code>Object</code> in the Java
  2666      * programming language. The second parameter must be an
  2666      * programming language. The second parameter must be an
  2724     public void setObject(int parameterIndex, Object x) throws SQLException {
  2724     public void setObject(int parameterIndex, Object x) throws SQLException {
  2725         checkParamIndex(parameterIndex);
  2725         checkParamIndex(parameterIndex);
  2726         if (params == null) {
  2726         if (params == null) {
  2727              throw new SQLException("Set initParams() before setObject");
  2727              throw new SQLException("Set initParams() before setObject");
  2728         }
  2728         }
  2729         params.put(new Integer(parameterIndex - 1), x);
  2729         params.put(Integer.valueOf(parameterIndex - 1), x);
  2730     }
  2730     }
  2731 
  2731 
  2732     /**
  2732     /**
  2733      * Sets the designated parameter to the given <code>Ref</code> object in
  2733      * Sets the designated parameter to the given <code>Ref</code> object in
  2734      * the Java programming language.  The driver converts this to an SQL
  2734      * the Java programming language.  The driver converts this to an SQL
  2771     public void setRef (int parameterIndex, Ref ref) throws SQLException {
  2771     public void setRef (int parameterIndex, Ref ref) throws SQLException {
  2772         checkParamIndex(parameterIndex);
  2772         checkParamIndex(parameterIndex);
  2773         if (params == null) {
  2773         if (params == null) {
  2774              throw new SQLException("Set initParams() before setRef");
  2774              throw new SQLException("Set initParams() before setRef");
  2775         }
  2775         }
  2776         params.put(new Integer(parameterIndex - 1), new SerialRef(ref));
  2776         params.put(Integer.valueOf(parameterIndex - 1), new SerialRef(ref));
  2777     }
  2777     }
  2778 
  2778 
  2779     /**
  2779     /**
  2780      * Sets the designated parameter to the given <code>Blob</code> object in
  2780      * Sets the designated parameter to the given <code>Blob</code> object in
  2781      * the Java programming language.  The driver converts this to an SQL
  2781      * the Java programming language.  The driver converts this to an SQL
  2815     public void setBlob (int parameterIndex, Blob x) throws SQLException {
  2815     public void setBlob (int parameterIndex, Blob x) throws SQLException {
  2816         checkParamIndex(parameterIndex);
  2816         checkParamIndex(parameterIndex);
  2817         if(params == null){
  2817         if(params == null){
  2818              throw new SQLException("Set initParams() before setBlob");
  2818              throw new SQLException("Set initParams() before setBlob");
  2819         }
  2819         }
  2820         params.put(new Integer(parameterIndex - 1), new SerialBlob(x));
  2820         params.put(Integer.valueOf(parameterIndex - 1), new SerialBlob(x));
  2821     }
  2821     }
  2822 
  2822 
  2823     /**
  2823     /**
  2824      * Sets the designated parameter to the given <code>Clob</code> object in
  2824      * Sets the designated parameter to the given <code>Clob</code> object in
  2825      * the Java programming language.  The driver converts this to an SQL
  2825      * the Java programming language.  The driver converts this to an SQL
  2860     public void setClob (int parameterIndex, Clob x) throws SQLException {
  2860     public void setClob (int parameterIndex, Clob x) throws SQLException {
  2861         checkParamIndex(parameterIndex);
  2861         checkParamIndex(parameterIndex);
  2862         if(params == null){
  2862         if(params == null){
  2863              throw new SQLException("Set initParams() before setClob");
  2863              throw new SQLException("Set initParams() before setClob");
  2864         }
  2864         }
  2865         params.put(new Integer(parameterIndex - 1), new SerialClob(x));
  2865         params.put(Integer.valueOf(parameterIndex - 1), new SerialClob(x));
  2866     }
  2866     }
  2867 
  2867 
  2868     /**
  2868     /**
  2869      * Sets the designated parameter to an <code>Array</code> object in the
  2869      * Sets the designated parameter to an <code>Array</code> object in the
  2870      * Java programming language.  The driver converts this to an SQL
  2870      * Java programming language.  The driver converts this to an SQL
  2908     public void setArray (int parameterIndex, Array array) throws SQLException {
  2908     public void setArray (int parameterIndex, Array array) throws SQLException {
  2909         checkParamIndex(parameterIndex);
  2909         checkParamIndex(parameterIndex);
  2910         if (params == null){
  2910         if (params == null){
  2911              throw new SQLException("Set initParams() before setArray");
  2911              throw new SQLException("Set initParams() before setArray");
  2912         }
  2912         }
  2913         params.put(new Integer(parameterIndex - 1), new SerialArray(array));
  2913         params.put(Integer.valueOf(parameterIndex - 1), new SerialArray(array));
  2914     }
  2914     }
  2915 
  2915 
  2916     /**
  2916     /**
  2917      * Sets the designated parameter to the given <code>java.sql.Date</code>
  2917      * Sets the designated parameter to the given <code>java.sql.Date</code>
  2918      * object.
  2918      * object.
  2973         date[0] = x;
  2973         date[0] = x;
  2974         date[1] = cal;
  2974         date[1] = cal;
  2975         if(params == null){
  2975         if(params == null){
  2976              throw new SQLException("Set initParams() before setDate");
  2976              throw new SQLException("Set initParams() before setDate");
  2977         }
  2977         }
  2978         params.put(new Integer(parameterIndex - 1), date);
  2978         params.put(Integer.valueOf(parameterIndex - 1), date);
  2979     }
  2979     }
  2980 
  2980 
  2981     /**
  2981     /**
  2982      * Sets the designated parameter to the given <code>java.sql.Time</code>
  2982      * Sets the designated parameter to the given <code>java.sql.Time</code>
  2983      * object.  The driver converts this
  2983      * object.  The driver converts this
  3039         time[0] = x;
  3039         time[0] = x;
  3040         time[1] = cal;
  3040         time[1] = cal;
  3041         if(params == null){
  3041         if(params == null){
  3042              throw new SQLException("Set initParams() before setTime");
  3042              throw new SQLException("Set initParams() before setTime");
  3043         }
  3043         }
  3044         params.put(new Integer(parameterIndex - 1), time);
  3044         params.put(Integer.valueOf(parameterIndex - 1), time);
  3045     }
  3045     }
  3046 
  3046 
  3047     /**
  3047     /**
  3048      * Sets the designated parameter to the given
  3048      * Sets the designated parameter to the given
  3049      * <code>java.sql.Timestamp</code> object.  The driver converts this
  3049      * <code>java.sql.Timestamp</code> object.  The driver converts this
  3105         timestamp[0] = x;
  3105         timestamp[0] = x;
  3106         timestamp[1] = cal;
  3106         timestamp[1] = cal;
  3107         if(params == null){
  3107         if(params == null){
  3108              throw new SQLException("Set initParams() before setTimestamp");
  3108              throw new SQLException("Set initParams() before setTimestamp");
  3109         }
  3109         }
  3110         params.put(new Integer(parameterIndex - 1), timestamp);
  3110         params.put(Integer.valueOf(parameterIndex - 1), timestamp);
  3111     }
  3111     }
  3112 
  3112 
  3113     /**
  3113     /**
  3114      * Clears all of the current parameter values in this <code>RowSet</code>
  3114      * Clears all of the current parameter values in this <code>RowSet</code>
  3115      * object's internal representation of the parameters to be set in
  3115      * object's internal representation of the parameters to be set in
  3179             // have been set till the last parameter
  3179             // have been set till the last parameter
  3180             // else throw exception.
  3180             // else throw exception.
  3181 
  3181 
  3182             Object[] paramsArray = new Object[params.size()];
  3182             Object[] paramsArray = new Object[params.size()];
  3183             for (int i = 0; i < params.size(); i++) {
  3183             for (int i = 0; i < params.size(); i++) {
  3184                paramsArray[i] = params.get(new Integer(i));
  3184                paramsArray[i] = params.get(Integer.valueOf(i));
  3185                if (paramsArray[i] == null) {
  3185                if (paramsArray[i] == null) {
  3186                  throw new SQLException("missing parameter: " + (i + 1));
  3186                  throw new SQLException("missing parameter: " + (i + 1));
  3187                } //end if
  3187                } //end if
  3188             } //end for
  3188             } //end for
  3189             return paramsArray;
  3189             return paramsArray;