* must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnIndex the first column is <code>1</code>, the second * is <code>2</code>, and so on; must be <code>1</code> or larger * and equal to or less than the number of columns in this rowset * @param ref the new <code>Ref</code> column value * @throws SQLException if (1) the given column index is out of bounds, * (2) the cursor is not on one of this rowset's rows or its * insert row, or (3) this rowset is * <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateRef(int columnIndex, java.sql.Ref ref) throws SQLException { checkState(); rs.updateRef(columnIndex, ref); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>double</code> value. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnName a <code>String</code> object that must match the * SQL name of a column in this rowset, ignoring case * @param ref the new column value * @throws SQLException if (1) the given column name does not match the * name of a column in this rowset, (2) the cursor is not on * one of this rowset's rows or its insert row, or (3) this * rowset is <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateRef(String columnName, java.sql.Ref ref) throws SQLException { updateRef(findColumn(columnName), ref); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>double</code> value. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnIndex the first column is <code>1</code>, the second * is <code>2</code>, and so on; must be <code>1</code> or larger * and equal to or less than the number of columns in this rowset * @param c the new column <code>Clob</code> value * @throws SQLException if (1) the given column index is out of bounds, * (2) the cursor is not on one of this rowset's rows or its * insert row, or (3) this rowset is * <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateClob(int columnIndex, Clob c) throws SQLException { checkState(); rs.updateClob(columnIndex, c); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>double</code> value. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnName a <code>String</code> object that must match the * SQL name of a column in this rowset, ignoring case * @param c the new column <code>Clob</code> value * @throws SQLException if (1) the given column name does not match the * name of a column in this rowset, (2) the cursor is not on * one of this rowset's rows or its insert row, or (3) this * rowset is <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateClob(String columnName, Clob c) throws SQLException { updateClob(findColumn(columnName), c); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>java.sql.Blob</code> value. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnIndex the first column is <code>1</code>, the second * is <code>2</code>, and so on; must be <code>1</code> or larger * and equal to or less than the number of columns in this rowset * @param b the new column <code>Blob</code> value * @throws SQLException if (1) the given column index is out of bounds, * (2) the cursor is not on one of this rowset's rows or its * insert row, or (3) this rowset is * <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateBlob(int columnIndex, Blob b) throws SQLException { checkState(); rs.updateBlob(columnIndex, b); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>java.sql.Blob </code> value. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnName a <code>String</code> object that must match the * SQL name of a column in this rowset, ignoring case * @param b the new column <code>Blob</code> value * @throws SQLException if (1) the given column name does not match the * name of a column in this rowset, (2) the cursor is not on * one of this rowset's rows or its insert row, or (3) this * rowset is <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateBlob(String columnName, Blob b) throws SQLException { updateBlob(findColumn(columnName), b); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>java.sql.Array</code> values. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnIndex the first column is <code>1</code>, the second * is <code>2</code>, and so on; must be <code>1</code> or larger * and equal to or less than the number of columns in this rowset * @param a the new column <code>Array</code> value * @throws SQLException if (1) the given column index is out of bounds, * (2) the cursor is not on one of this rowset's rows or its * insert row, or (3) this rowset is * <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateArray(int columnIndex, Array a) throws SQLException { checkState(); rs.updateArray(columnIndex, a); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>java.sql.Array</code> value. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnName a <code>String</code> object that must match the * SQL name of a column in this rowset, ignoring case * @param a the new column <code>Array</code> value * @throws SQLException if (1) the given column name does not match the * name of a column in this rowset, (2) the cursor is not on * one of this rowset's rows or its insert row, or (3) this * rowset is <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateArray(String columnName, Array a) throws SQLException { updateArray(findColumn(columnName), a); } /** * Provide interface coverage for getURL(int) in ResultSet->RowSet */ public java.net.URL getURL(int columnIndex) throws SQLException { checkState(); return rs.getURL(columnIndex); } /** * Provide interface coverage for getURL(String) in ResultSet->RowSet */ public java.net.URL getURL(String columnName) throws SQLException { return getURL(findColumn(columnName)); } /** * Return the RowSetWarning object for the current row of a * <code>JdbcRowSetImpl</code> */ public RowSetWarning getRowSetWarnings() throws SQLException { return null; } /** * Unsets the designated parameter to the given int array. * This was set using <code>setMatchColumn</code> * as the column which will form the basis of the join. * <P> * The parameter value unset by this method should be same * as was set. * * @param columnIdxes the index into this rowset * object's internal representation of parameter values * @throws SQLException if an error occurs or the * parameter index is out of bounds or if the columnIdx is * not the same as set using <code>setMatchColumn(int [])</code> */ public void unsetMatchColumn(int[] columnIdxes) throws SQLException { int i_val; for( int j= 0 ;j < columnIdxes.length; j++) { i_val = (Integer.parseInt(iMatchColumns.get(j).toString())); if(columnIdxes[j] != i_val) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString()); } } for( int i = 0;i < columnIdxes.length ;i++) { iMatchColumns.set(i,Integer.valueOf(-1)); } } /** * Unsets the designated parameter to the given String array. * This was set using <code>setMatchColumn</code> * as the column which will form the basis of the join. * <P> * The parameter value unset by this method should be same * as was set. * * @param columnIdxes the index into this rowset * object's internal representation of parameter values * @throws SQLException if an error occurs or the * parameter index is out of bounds or if the columnName is * not the same as set using <code>setMatchColumn(String [])</code> */ public void unsetMatchColumn(String[] columnIdxes) throws SQLException { for(int j = 0 ;j < columnIdxes.length; j++) { if( !columnIdxes[j].equals(strMatchColumns.get(j)) ){ throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString()); } } for(int i = 0 ; i < columnIdxes.length; i++) { strMatchColumns.set(i,null); } } /** * Retrieves the column name as <code>String</code> array * that was set using <code>setMatchColumn(String [])</code> * for this rowset. * * @return a <code>String</code> array object that contains the column names * for the rowset which has this the match columns * * @throws SQLException if an error occurs or column name is not set */ public String[] getMatchColumnNames() throws SQLException { String []str_temp = new String[strMatchColumns.size()]; if( strMatchColumns.get(0) == null) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString()); } strMatchColumns.copyInto(str_temp); return str_temp; } /** * Retrieves the column id as <code>int</code> array that was set using * <code>setMatchColumn(int [])</code> for this rowset. * * @return a <code>int</code> array object that contains the column ids * for the rowset which has this as the match columns. * * @throws SQLException if an error occurs or column index is not set */ public int[] getMatchColumnIndexes() throws SQLException { Integer []int_temp = new Integer[iMatchColumns.size()]; int [] i_temp = new int[iMatchColumns.size()]; int i_val; i_val = ((Integer)iMatchColumns.get(0)).intValue(); if( i_val == -1 ) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString()); } iMatchColumns.copyInto(int_temp); for(int i = 0; i < int_temp.length; i++) { i_temp[i] = (int_temp[i]).intValue(); } return i_temp; } /** * Sets the designated parameter to the given int array. * This forms the basis of the join for the * <code>JoinRowSet</code> as the column which will form the basis of the * join. * <P> * The parameter value set by this method is stored internally and * will be supplied as the appropriate parameter in this rowset's * command when the method <code>getMatchColumnIndexes</code> is called. * * @param columnIdxes the indexes into this rowset * object's internal representation of parameter values; the * first parameter is 0, the second is 1, and so on; must be * <code>0</code> or greater * @throws SQLException if an error occurs or the * parameter index is out of bounds */ public void setMatchColumn(int[] columnIdxes) throws SQLException { for(int j = 0 ; j < columnIdxes.length; j++) { if( columnIdxes[j] < 0 ) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString()); } } for(int i = 0 ;i < columnIdxes.length; i++) { iMatchColumns.add(i,Integer.valueOf(columnIdxes[i])); } } /** * Sets the designated parameter to the given String array. * This forms the basis of the join for the * <code>JoinRowSet</code> as the column which will form the basis of the * join. * <P> * The parameter value set by this method is stored internally and * will be supplied as the appropriate parameter in this rowset's * command when the method <code>getMatchColumn</code> is called. * * @param columnNames the name of the column into this rowset * object's internal representation of parameter values * @throws SQLException if an error occurs or the * parameter index is out of bounds */ public void setMatchColumn(String[] columnNames) throws SQLException { for(int j = 0; j < columnNames.length; j++) { if( columnNames[j] == null || columnNames[j].equals("")) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString()); } } for( int i = 0; i < columnNames.length; i++) { strMatchColumns.add(i,columnNames[i]); } } /** * Sets the designated parameter to the given <code>int</code> * object. This forms the basis of the join for the * <code>JoinRowSet</code> as the column which will form the basis of the * join. * <P> * The parameter value set by this method is stored internally and * will be supplied as the appropriate parameter in this rowset's * command when the method <code>getMatchColumn</code> is called. * * @param columnIdx the index into this rowset * object's internal representation of parameter values; the * first parameter is 0, the second is 1, and so on; must be * <code>0</code> or greater * @throws SQLException if an error occurs or the * parameter index is out of bounds */ public void setMatchColumn(int columnIdx) throws SQLException { // validate, if col is ok to be set if(columnIdx < 0) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString()); } else { // set iMatchColumn iMatchColumns.set(0, Integer.valueOf(columnIdx)); //strMatchColumn = null; } } /** * Sets the designated parameter to the given <code>String</code> * object. This forms the basis of the join for the * <code>JoinRowSet</code> as the column which will form the basis of the * join. * <P> * The parameter value set by this method is stored internally and * will be supplied as the appropriate parameter in this rowset's * command when the method <code>getMatchColumn</code> is called. * * @param columnName the name of the column into this rowset * object's internal representation of parameter values * @throws SQLException if an error occurs or the * parameter index is out of bounds */ public void setMatchColumn(String columnName) throws SQLException { // validate, if col is ok to be set if(columnName == null || (columnName= columnName.trim()).equals("")) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString()); } else { // set strMatchColumn strMatchColumns.set(0, columnName); //iMatchColumn = -1; } } /** * Unsets the designated parameter to the given <code>int</code> * object. This was set using <code>setMatchColumn</code> * as the column which will form the basis of the join. * <P> * The parameter value unset by this method should be same * as was set. * * @param columnIdx the index into this rowset * object's internal representation of parameter values * @throws SQLException if an error occurs or the * parameter index is out of bounds or if the columnIdx is * not the same as set using <code>setMatchColumn(int)</code> */ public void unsetMatchColumn(int columnIdx) throws SQLException { // check if we are unsetting the SAME column if(! iMatchColumns.get(0).equals(Integer.valueOf(columnIdx) ) ) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString()); } else if(strMatchColumns.get(0) != null) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolname").toString()); } else { // that is, we are unsetting it. iMatchColumns.set(0, Integer.valueOf(-1)); } } /** * Unsets the designated parameter to the given <code>String</code> * object. This was set using <code>setMatchColumn</code> * as the column which will form the basis of the join. * <P> * The parameter value unset by this method should be same * as was set. * * @param columnName the index into this rowset * object's internal representation of parameter values * @throws SQLException if an error occurs or the * parameter index is out of bounds or if the columnName is * not the same as set using <code>setMatchColumn(String)</code> * */ public void unsetMatchColumn(String columnName) throws SQLException { // check if we are unsetting the same column columnName = columnName.trim(); if(!((strMatchColumns.get(0)).equals(columnName))) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString()); } else if( ((Integer)(iMatchColumns.get(0))).intValue() > 0) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolid").toString());Lines 3501–4000 of 7047. Previous lines Load more
* must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnIndex the first column is <code>1</code>, the second * is <code>2</code>, and so on; must be <code>1</code> or larger * and equal to or less than the number of columns in this rowset * @param ref the new <code>Ref</code> column value * @throws SQLException if (1) the given column index is out of bounds, * (2) the cursor is not on one of this rowset's rows or its * insert row, or (3) this rowset is * <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateRef(int columnIndex, java.sql.Ref ref) throws SQLException { checkState(); rs.updateRef(columnIndex, ref); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>double</code> value. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnName a <code>String</code> object that must match the * SQL name of a column in this rowset, ignoring case * @param ref the new column value * @throws SQLException if (1) the given column name does not match the * name of a column in this rowset, (2) the cursor is not on * one of this rowset's rows or its insert row, or (3) this * rowset is <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateRef(String columnName, java.sql.Ref ref) throws SQLException { updateRef(findColumn(columnName), ref); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>double</code> value. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnIndex the first column is <code>1</code>, the second * is <code>2</code>, and so on; must be <code>1</code> or larger * and equal to or less than the number of columns in this rowset * @param c the new column <code>Clob</code> value * @throws SQLException if (1) the given column index is out of bounds, * (2) the cursor is not on one of this rowset's rows or its * insert row, or (3) this rowset is * <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateClob(int columnIndex, Clob c) throws SQLException { checkState(); rs.updateClob(columnIndex, c); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>double</code> value. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnName a <code>String</code> object that must match the * SQL name of a column in this rowset, ignoring case * @param c the new column <code>Clob</code> value * @throws SQLException if (1) the given column name does not match the * name of a column in this rowset, (2) the cursor is not on * one of this rowset's rows or its insert row, or (3) this * rowset is <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateClob(String columnName, Clob c) throws SQLException { updateClob(findColumn(columnName), c); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>java.sql.Blob</code> value. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnIndex the first column is <code>1</code>, the second * is <code>2</code>, and so on; must be <code>1</code> or larger * and equal to or less than the number of columns in this rowset * @param b the new column <code>Blob</code> value * @throws SQLException if (1) the given column index is out of bounds, * (2) the cursor is not on one of this rowset's rows or its * insert row, or (3) this rowset is * <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateBlob(int columnIndex, Blob b) throws SQLException { checkState(); rs.updateBlob(columnIndex, b); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>java.sql.Blob </code> value. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnName a <code>String</code> object that must match the * SQL name of a column in this rowset, ignoring case * @param b the new column <code>Blob</code> value * @throws SQLException if (1) the given column name does not match the * name of a column in this rowset, (2) the cursor is not on * one of this rowset's rows or its insert row, or (3) this * rowset is <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateBlob(String columnName, Blob b) throws SQLException { updateBlob(findColumn(columnName), b); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>java.sql.Array</code> values. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnIndex the first column is <code>1</code>, the second * is <code>2</code>, and so on; must be <code>1</code> or larger * and equal to or less than the number of columns in this rowset * @param a the new column <code>Array</code> value * @throws SQLException if (1) the given column index is out of bounds, * (2) the cursor is not on one of this rowset's rows or its * insert row, or (3) this rowset is * <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateArray(int columnIndex, Array a) throws SQLException { checkState(); rs.updateArray(columnIndex, a); } /** * Sets the designated column in either the current row or the insert * row of this <code>JdbcRowSetImpl</code> object with the given * <code>java.sql.Array</code> value. * * This method updates a column value in either the current row or * the insert row of this rowset, but it does not update the * database. If the cursor is on a row in the rowset, the * method {@link #updateRow} must be called to update the database. * If the cursor is on the insert row, the method {@link #insertRow} * must be called, which will insert the new row into both this rowset * and the database. Both of these methods must be called before the * cursor moves to another row. * * @param columnName a <code>String</code> object that must match the * SQL name of a column in this rowset, ignoring case * @param a the new column <code>Array</code> value * @throws SQLException if (1) the given column name does not match the * name of a column in this rowset, (2) the cursor is not on * one of this rowset's rows or its insert row, or (3) this * rowset is <code>ResultSet.CONCUR_READ_ONLY</code> */ public void updateArray(String columnName, Array a) throws SQLException { updateArray(findColumn(columnName), a); } /** * Provide interface coverage for getURL(int) in ResultSet->RowSet */ public java.net.URL getURL(int columnIndex) throws SQLException { checkState(); return rs.getURL(columnIndex); } /** * Provide interface coverage for getURL(String) in ResultSet->RowSet */ public java.net.URL getURL(String columnName) throws SQLException { return getURL(findColumn(columnName)); } /** * Return the RowSetWarning object for the current row of a * <code>JdbcRowSetImpl</code> */ public RowSetWarning getRowSetWarnings() throws SQLException { return null; } /** * Unsets the designated parameter to the given int array. * This was set using <code>setMatchColumn</code> * as the column which will form the basis of the join. * <P> * The parameter value unset by this method should be same * as was set. * * @param columnIdxes the index into this rowset * object's internal representation of parameter values * @throws SQLException if an error occurs or the * parameter index is out of bounds or if the columnIdx is * not the same as set using <code>setMatchColumn(int [])</code> */ public void unsetMatchColumn(int[] columnIdxes) throws SQLException { int i_val; for( int j= 0 ;j < columnIdxes.length; j++) { i_val = (Integer.parseInt(iMatchColumns.get(j).toString())); if(columnIdxes[j] != i_val) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString()); } } for( int i = 0;i < columnIdxes.length ;i++) { iMatchColumns.set(i,Integer.valueOf(-1)); } } /** * Unsets the designated parameter to the given String array. * This was set using <code>setMatchColumn</code> * as the column which will form the basis of the join. * <P> * The parameter value unset by this method should be same * as was set. * * @param columnIdxes the index into this rowset * object's internal representation of parameter values * @throws SQLException if an error occurs or the * parameter index is out of bounds or if the columnName is * not the same as set using <code>setMatchColumn(String [])</code> */ public void unsetMatchColumn(String[] columnIdxes) throws SQLException { for(int j = 0 ;j < columnIdxes.length; j++) { if( !columnIdxes[j].equals(strMatchColumns.get(j)) ){ throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols").toString()); } } for(int i = 0 ; i < columnIdxes.length; i++) { strMatchColumns.set(i,null); } } /** * Retrieves the column name as <code>String</code> array * that was set using <code>setMatchColumn(String [])</code> * for this rowset. * * @return a <code>String</code> array object that contains the column names * for the rowset which has this the match columns * * @throws SQLException if an error occurs or column name is not set */ public String[] getMatchColumnNames() throws SQLException { String []str_temp = new String[strMatchColumns.size()]; if( strMatchColumns.get(0) == null) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString()); } strMatchColumns.copyInto(str_temp); return str_temp; } /** * Retrieves the column id as <code>int</code> array that was set using * <code>setMatchColumn(int [])</code> for this rowset. * * @return a <code>int</code> array object that contains the column ids * for the rowset which has this as the match columns. * * @throws SQLException if an error occurs or column index is not set */ public int[] getMatchColumnIndexes() throws SQLException { Integer []int_temp = new Integer[iMatchColumns.size()]; int [] i_temp = new int[iMatchColumns.size()]; int i_val; i_val = ((Integer)iMatchColumns.get(0)).intValue(); if( i_val == -1 ) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.setmatchcols").toString()); } iMatchColumns.copyInto(int_temp); for(int i = 0; i < int_temp.length; i++) { i_temp[i] = (int_temp[i]).intValue(); } return i_temp; } /** * Sets the designated parameter to the given int array. * This forms the basis of the join for the * <code>JoinRowSet</code> as the column which will form the basis of the * join. * <P> * The parameter value set by this method is stored internally and * will be supplied as the appropriate parameter in this rowset's * command when the method <code>getMatchColumnIndexes</code> is called. * * @param columnIdxes the indexes into this rowset * object's internal representation of parameter values; the * first parameter is 0, the second is 1, and so on; must be * <code>0</code> or greater * @throws SQLException if an error occurs or the * parameter index is out of bounds */ public void setMatchColumn(int[] columnIdxes) throws SQLException { for(int j = 0 ; j < columnIdxes.length; j++) { if( columnIdxes[j] < 0 ) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString()); } } for(int i = 0 ;i < columnIdxes.length; i++) { iMatchColumns.add(i,Integer.valueOf(columnIdxes[i])); } } /** * Sets the designated parameter to the given String array. * This forms the basis of the join for the * <code>JoinRowSet</code> as the column which will form the basis of the * join. * <P> * The parameter value set by this method is stored internally and * will be supplied as the appropriate parameter in this rowset's * command when the method <code>getMatchColumn</code> is called. * * @param columnNames the name of the column into this rowset * object's internal representation of parameter values * @throws SQLException if an error occurs or the * parameter index is out of bounds */ public void setMatchColumn(String[] columnNames) throws SQLException { for(int j = 0; j < columnNames.length; j++) { if( columnNames[j] == null || columnNames[j].equals("")) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString()); } } for( int i = 0; i < columnNames.length; i++) { strMatchColumns.add(i,columnNames[i]); } } /** * Sets the designated parameter to the given <code>int</code> * object. This forms the basis of the join for the * <code>JoinRowSet</code> as the column which will form the basis of the * join. * <P> * The parameter value set by this method is stored internally and * will be supplied as the appropriate parameter in this rowset's * command when the method <code>getMatchColumn</code> is called. * * @param columnIdx the index into this rowset * object's internal representation of parameter values; the * first parameter is 0, the second is 1, and so on; must be * <code>0</code> or greater * @throws SQLException if an error occurs or the * parameter index is out of bounds */ public void setMatchColumn(int columnIdx) throws SQLException { // validate, if col is ok to be set if(columnIdx < 0) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString()); } else { // set iMatchColumn iMatchColumns.set(0, Integer.valueOf(columnIdx)); //strMatchColumn = null; } } /** * Sets the designated parameter to the given <code>String</code> * object. This forms the basis of the join for the * <code>JoinRowSet</code> as the column which will form the basis of the * join. * <P> * The parameter value set by this method is stored internally and * will be supplied as the appropriate parameter in this rowset's * command when the method <code>getMatchColumn</code> is called. * * @param columnName the name of the column into this rowset * object's internal representation of parameter values * @throws SQLException if an error occurs or the * parameter index is out of bounds */ public void setMatchColumn(String columnName) throws SQLException { // validate, if col is ok to be set if(columnName == null || (columnName= columnName.trim()).equals("")) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString()); } else { // set strMatchColumn strMatchColumns.set(0, columnName); //iMatchColumn = -1; } } /** * Unsets the designated parameter to the given <code>int</code> * object. This was set using <code>setMatchColumn</code> * as the column which will form the basis of the join. * <P> * The parameter value unset by this method should be same * as was set. * * @param columnIdx the index into this rowset * object's internal representation of parameter values * @throws SQLException if an error occurs or the * parameter index is out of bounds or if the columnIdx is * not the same as set using <code>setMatchColumn(int)</code> */ public void unsetMatchColumn(int columnIdx) throws SQLException { // check if we are unsetting the SAME column if(! iMatchColumns.get(0).equals(Integer.valueOf(columnIdx) ) ) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString()); } else if(strMatchColumns.get(0) != null) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolname").toString()); } else { // that is, we are unsetting it. iMatchColumns.set(0, Integer.valueOf(-1)); } } /** * Unsets the designated parameter to the given <code>String</code> * object. This was set using <code>setMatchColumn</code> * as the column which will form the basis of the join. * <P> * The parameter value unset by this method should be same * as was set. * * @param columnName the index into this rowset * object's internal representation of parameter values * @throws SQLException if an error occurs or the * parameter index is out of bounds or if the columnName is * not the same as set using <code>setMatchColumn(String)</code> * */ public void unsetMatchColumn(String columnName) throws SQLException { // check if we are unsetting the same column columnName = columnName.trim(); if(!((strMatchColumns.get(0)).equals(columnName))) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString()); } else if( ((Integer)(iMatchColumns.get(0))).intValue() > 0) { throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolid").toString());