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
DataRow methods
Methods implemented in this class
- clearValues()
- requiredColumnsCheck()
- setBigDecimal(int, java.math.BigDecimal)
- setBigDecimal(java.lang.String, java.math.BigDecimal)
- setBinaryStream(int, java.io.InputStream)
- setBinaryStream(java.lang.String, java.io.InputStream)
- setBoolean(int, boolean)
- setBoolean(java.lang.String, boolean)
- setByte(int, byte)
- setByte(java.lang.String, byte)
- setByteArray(int, byte[], int)
- setByteArray(java.lang.String, byte[], int)
- setDate(int, java.sql.Date)
- setDate(int, long)
- setDate(java.lang.String, java.sql.Date)
- setDate(java.lang.String, long)
- setDefaultValues()
- setDouble(int, double)
- setDouble(java.lang.String, double)
- setFloat(int, float)
- setFloat(java.lang.String, float)
- setInputStream(int, java.io.InputStream)
- setInputStream(java.lang.String, java.io.InputStream)
- setInt(int, int)
- setInt(java.lang.String, int)
- setLong(int, long)
- setLong(java.lang.String, long)
- setObject(int, java.lang.Object)
- setObject(java.lang.String, java.lang.Object)
- setShort(int, short)
- setShort(java.lang.String, short)
- setString(int, java.lang.String)
- setString(java.lang.String, java.lang.String)
- setTime(int, java.sql.Time)
- setTime(int, long)
- setTime(java.lang.String, java.sql.Time)
- setTime(java.lang.String, long)
- setTimestamp(int, java.sql.Timestamp)
- setTimestamp(int, long)
- setTimestamp(java.lang.String, java.sql.Timestamp)
- setTimestamp(java.lang.String, long)
- setVariant(int, borland.jbcl.util.Variant)
- setVariant(java.lang.String, borland.jbcl.util.Variant)
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.