borland Packages  Class Hierarchy  jbcl.dataset Package  Index 

DataRow class

java.lang.Object
   +----borland.jbcl.dataset.ReadRow
           +----borland.jbcl.dataset.ReadWriteRow
                   +----borland.jbcl.dataset.DataRow

About the DataRow class

Constructors  Properties  Methods  

Implements Serializable

The DataRow contains one row's worth of storage for Column components of the DataSet it is constructed from. It is useful for adding, updating, and locating rows in a DataSet.

A DataRow must be created with the DataSet it is used with. If the structure of a DataSet changes, old DataRow objects will not work with the updated DataSet and a new DataRow must be created for it.

When using a DataRow to locate data, all columns in the DataRow are included in the locate operation. To limit the locate to include only specified columns, use a "scoped" DataRow. A scoped DataRow includes only specified columns and is created using the DataRow(DataSet, String) or the DataRow(DataSet, String[]) contructor.

To write code that handles columns of any data type, use the setVariant(String, Variant) or the setVariant(int, Variant) method and the getVariant(String, Variant) or getVariant(int, Variant) method. For example, use these methods when writing code for locating data that is not data type dependent.

Setting values in a DataRow no longer performs Column level constraint checks such as minimum value, maximum value or readOnly. To apply constraint tests on all columns, call the DataRow.validate() method.


DataRow constructors

DataRow properties

*Read-only properties **Write-only properties

Properties implemented in borland.jbcl.dataset.ReadRow

Properties implemented in borland.jbcl.dataset.ReadWriteRow

Properties implemented in java.lang.Object

DataRow methods

Methods implemented in this class

Methods implemented in borland.jbcl.dataset.ReadWriteRow

Methods implemented in java.lang.Object


DataRow constructors

DataRow(borland.jbcl.dataset.DataSet)

  public DataRow(borland.jbcl.dataset.DataSet dataSet)
Constructs a DataRow containing all the Column components of the specified DataSet, but no data values. On error, this constructor throws a DataSetException.

Parameters:

dataSet
The DataSet component from which to clone the structure for the DataRow. All Column components of the DataSet are included in the DataRow.

DataRow(borland.jbcl.dataset.DataSet, java.lang.String)

  public DataRow(borland.jbcl.dataset.DataSet dataSet, java.lang.String columnName)
Creates a "scoped" DataRow containing the structure of (but no data from) the specified column of the current row position. On error, this constructor throws a DataSetException.

Parameters:

dataSet
The DataSet component from which to clone the structure for the DataRow. Only the Column component specified in the columnName parameter is included in the DataRow.
columnName
The String name of the Column to include in the DataRow.

DataRow(borland.jbcl.dataset.DataSet, java.lang.String[])

  public DataRow(borland.jbcl.dataset.DataSet dataSet, java.lang.String[] columnNames)
Constructs a "scoped" DataRow containing the data structure (but no data) from specified columns of the DataSet. On error, this constructor throws a DataSetException.

Parameters:

dataSet
The DataSet component from which to clone the structure for the DataRow. All Column components of the DataSet are included in the DataRow.
columnNames
An array of String names of the Column components to include in the DataRow.

DataRow methods

validate()

  public final void validate()
Tests all columns in the DataRow for constraints on the data such as minimum or maximum value, readOnly, and so on.