## org.eclipse.datatools.sqltools.result
Class ResultSetRow

    java.lang.Object
      org.eclipse.datatools.sqltools.result.ResultSetRow

All Implemented Interfaces:
  IResultSetRow, java.io.Serializable

public class ResultSetRow
extends java.lang.Object
implements IResultSetRow, java.io.Serializable

The `ResultSetRow` is a standard implementation of `IResultSetRow`.

There are two ways to initiate an instance of `ResultSetRow`, two examples are given below:

Example I:

     Object[] data = new Object[3];
     data[0] = new Integer(1);
     data[1] = new Integer(23);
     data[2] = new String("Jack");
     IResultSetRow row = new ResultSetRow(data);

Example II:

     IResultSetRow row = new ResultSetRow(3);
     row.setData(new Integer(1), 0);
     row.setData(new Integer(23), 1);
     row.setData(new String("Jack"), 2);

Author:
  Dafan Yang
See Also:
  Serialized Form

Constructor Summary
`ResultSetRow(int columnCount)` Constructs a result set row, specify the column count.
`ResultSetRow(java.lang.Object[] values)` Constructs a result set row given the row values

Method Summary
`java.lang.Object[]` `getData()` Returns the data of this result set row
`java.lang.Object` `getData(int index)` Returns the data object at the given column
`void` `setData(java.lang.Object[] values)` Sets the data for this result set row.
`void` `setData(java.lang.Object obj, int index)` Sets the data of this result set at given column

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ResultSetRow

    public ResultSetRow(java.lang.Object[] values)

  Constructs a result set row given the row values

Parameters:
  `values` - data of this row

### ResultSetRow

    public ResultSetRow(int columnCount)

  Constructs a result set row, specify the column count.

Parameters:
  `columnCount` - the column count (must be greater than or equals to 0)
Throws:
  `java.lang.NegativeArraySizeException` - - if a negative column count is given

Method Detail

### getData

    public java.lang.Object[] getData()

  Returns the data of this result set row

  Specified by:
    `getData` in interface `IResultSetRow`
  Returns:
    the row data

### getData

    public java.lang.Object getData(int index)

  Returns the data object at the given column

  Specified by:
    `getData` in interface `IResultSetRow`
  Parameters:
    `index` - the column index
  Returns:
    the data at the given column

### setData

    public void setData(java.lang.Object[] values)

  Sets the data for this result set row.

  Specified by:
    `setData` in interface `IResultSetRow`
  Parameters:
    `values` - data of this row

### setData

    public void setData(java.lang.Object obj,
                        int index)

  Sets the data of this result set at given column

  Specified by:
    `setData` in interface `IResultSetRow`
  Parameters:
    `obj` - data of this row at given column
    `index` - column index (based on 0)
  Throws:
    `java.lang.ArrayIndexOutOfBoundsException` - - if the index is bigger than the column count or smaller than 0

Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.