borland Packages Class Hierarchy dx.dataset Package
java.lang.Object +----com.borland.dx.dataset.ReadRow +----com.borland.dx.dataset.ReadWriteRow +----com.borland.dx.dataset.DataRow +----com.borland.dx.dataset.DataSet +----com.borland.dx.dataset.ParameterRow +----com.borland.dx.dataset.RowIterator
Properties Methods
Implements Serializable
The ReadWriteRow class adds write access to its superclass ReadRow. It adds behavior to write values to a single Column according to its data type, as well as methods to write the value from a Column of any data type into a Variant. It also has methods to clear values.
The ReadWriteRow is an abstract class that is extended by DataSet, DataRow, and ParameterRow. These three classes all use the read and write methods in ReadWriteRow and its superclass ReadRow heavily to manipulate data values.
public final void setAssignedNull(String columnName) public final void setAssignedNull(int ordinal)Write-only property that explicitly sets a Column to null (as opposed to a value that is simply not assigned). The Column can be specified by name or by its ordinal position in the ReadWriteRow, though the column name is preferred because the ordinal position may change unexpectedly. The read accessors for this property, isAssignedNull(int) and isAssignedNull(String) are implemented in com.borland.dx.dataset.ReadRow.
The JDBC QueryResolver, used by QueryDataSet to save changes, will use a "set null" clause for columns with assigned null values.
public final void setUnassignedNull(String columnName) public final void setUnassignedNull(int ordinal)Write-only property that sets a Column to an unassigned null value, which represents a value that was never assigned. The Column can be specified by name or by its ordinal position in the ReadWriteRow, though the column name is preferred because the ordinal position may change unexpectedly. The read accessors for this property, isUnassignedNull(int) and isUnassignedNull(java.lang.String) are implemented in com.borland.dx.dataset.ReadRow.
The JDBC QueryResolver does not specify columns with unassigned null values in the INSERT statements submitted to the JDBC driver. This allows the JDBC data source to fill in any server-side defaults for that column.
public final void clearValues()Sets all values of the row to unassigned null. This method throws a DataSetException if any Column components have constraints such as required, or a minimum value.
The JDBC QueryResolver does not specify columns with unassigned null values in the INSERT statements submitted to the JDBC driver. This allows the JDBC data source to fill in any server-side defaults for that column.
public void requiredColumnsCheck()Throws an Exception if any required columns have not been set to a non-null value.
public final void setBigDecimal(int ordinal, BigDecimal value)Sets the Column indicated by its ordinal position to value. A DataSetException is thrown if the position ordinal does not exist, if the data type of the value parameter is not BigDecimal, or if the column's type is not Variant.BIGDECIMAL.
public final void setBigDecimal(String columnName, BigDecimal value)Sets the Column indicated by columnName to value. A DataSetException is thrown if the data type of the value parameter is not BigDecimal, if the columnName does not exist, or if the column's type is not Variant.BIGDECIMAL.
This method is typically preferred over setBigDecimal(int, BigDecimal) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions. Note that ordinal methods can be slightly faster, especially with DataSets that have more than 20 columns.
public final void setBoolean(int ordinal, boolean value)Sets the Column indicated by its ordinal position in the ReadWriteRow to value. A DataSetException is thrown if the ordinal position does not exist, the data type of value is not boolean, or the column's data type is not Variant.BOOLEAN.
public final void setBoolean(String columnName, boolean value)Sets the Column indicated by columnName to value. A DataSetException is thrown if the data type of value is not boolean, the columnName does not exist, or the data type of the column is not Variant.BOOLEAN.
This method is typically preferred over setBoolean(int,boolean) because it does not involve the Column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setByte(int ordinal, byte value)Sets the Column indicated by its ordinal position to value. A DataSetException is thrown if the ordinal position does not exist, if the data type of value is not byte, or if the column's data type is not Variant.BYTE.
public final void setByte(String columnName, byte value)Sets the Column indicated by columnName to value. A DataSetException is thrown if the data type of value is not byte, the data type of the column is not Variant.BYTE, or the columnName does not exist.
This method is typically preferred over setByte(int,byte) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setByteArray(int ordinal, byte[] value, int length)This method is used internally by other com.borland classes. You should never use this method directly.
public final void setByteArray(String columnName, byte[] value, int length)This method is used internally by other com.borland classes. You should never use this method directly.
public final void setDate(int ordinal, java.sql.Date value)Sets the Column indicated by its ordinal position to value. A DataSetException is thrown if the ordinal position does not exist, the data type of value is not java.sql.Date, or the data type of the Column is not Variant.DATE.
public final void setDate(int ordinal, long value)Sets the Column indicated by its ordinal position in the ReadWriteRow to value. The value parameter is expressed in the number of milliseconds since January 1, 1970, 00:00:00 GMT. A DataSetException is thrown if the ordinal position does not exist, the data type of value is not long, or the column's data type is not Variant.DATE.
public final void setDate(String columnName, java.sql.Date value)Sets the Column indicated by columnName in the ReadWriteRow to value. A DataSetException is thrown if the data type of value is not java.sql.Date, columnName does not exist, or the column's data type is not Variant.DATE.
This method is typically preferred over setDate(int,Date) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setDate(String columnName, long value)Sets the Column indicated by columnName in the ReadWriteRow to value. The value parameter is expressed in the number of milliseconds since January 1, 1970, 00:00:00 GMT.
A DataSetException is thrown if the data type of value is not a long, the columnName does not exist, or the column data type is not Variant.LONG.
This method is typically preferred over setDate(int,long) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public void setDefaultValues()Sets all values to column-specified default values.
public final void setDouble(int ordinal, double value)Sets the Column indicated by its ordinal position in the ReadWriteRow as a double. A DataSetException is thrown if the ordinal position does not exist, the data type of value is not double, or the column's data type is not Variant.DOUBLE.
public final void setDouble(String columnName, double value)Sets the Column indicated by columnName in the ReadWriteRow to value A DataSetException is thrown if the data type of value is not double, the columnName does not exist, or the column's data type is not Variant.DOUBLE.
This method is typically preferred over setDouble(int,double) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setFloat(int ordinal, float value)Sets the Column indicated by its ordinal position in the ReadWriteRow to value. A DataSetException is thrown if the ordinal position does not exist, the data type of value is not float, or the data type of the Column is not Variant.FLOAT.
public final void setFloat(String columnName, float value)Sets the Column indicated by columnName in the ReadWriteRow to value. A DataSetException is thrown if the data type of value is not float, the data type of the Column is not Variant.FLOAT, or if the columnName does not exist.
This method is typically preferred over setFloat(int,float) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setInputStream(int ordinal, InputStream value)Sets the Column indicated by its ordinal position in the ReadWriteRow to value. A DataSetException is thrown if the ordinal position does not exist, the data type of value is not java.io.InputStream, or the data type of the Column is not Variant.INPUTSTREAM.
public final void setInputStream(String columnName, InputStream value)Sets the Column indicated by columnName in the ReadWriteRow to value. A DataSetException is thrown if the data type of value is not a java.io.InputStream, the data type of the Column is not Variant.INPUTSTREAM, or the columnName does not exist.
This method is typically preferred over setInputStream(int,InputStream) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setInt(int ordinal, int value)Sets the Column indicated by its ordinal position in the ReadWriteRow to value. A DataSetException is thrown if the ordinal position does not exist, the data type of value is not int, or the column's data type is not Variant.INT.
public final void setInt(String columnName, int value)Sets the Column indicated by columnName in the ReadWriteRow to value. A DataSetException is thrown if the data type of value is not int, the columnName is not found, or the data type of the Column is not Variant.INT.
This method is typically preferred over setInt(int,int) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setLong(int ordinal, long value)Sets the Column indicated by its ordinal position in the ReadWriteRow to value. A DataSetException is thrown if the ordinal position does not exist, the data type of value is not long, or the data type of the Column is not Variant.LONG.
public final void setLong(String columnName, long value)Sets the Column indicated by columnName in the ReadWriteRow to value. A DataSetException is thrown if the data type of value is not long, the data type of the Column is not Variant.LONG, or the columnName does not exist.
This method is typically preferred over setLong(int,long) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setObject(int ordinal, Object value)Sets the Column indicated by its ordinal position in the ReadWriteRow to value. A DataSetException is thrown if the ordinal position does not exist, the data type of value is not Object, or the data type of the Column is not Variant.OBJECT. An exception is thrown if the Column.javaClass property is set, and the value set is not the same class as Column.javaClass.
public final void setObject(String columnName, Object value)Sets the Column indicated by columnName in the ReadWriteRow to value. A DataSetException is thrown if the data type of value is not java.lang.Object, the data type of the Column is not Variant.OBJECT, or the columnName does not exist. An exception is thrown if the Column.javaClass property is set, and the value set is not the same class as Column.javaClass.
This method is typically preferred over setObject(int,Object) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setShort(int ordinal, short value)Sets the Column indicated by its ordinal position in the ReadWriteRow to value A DataSetException is thrown if the ordinal position does not exist, the data type of value is not short, or the data type of the Column is not Variant.SHORT.
public final void setShort(String columnName, short value)Sets the Column indicated by columnName in the ReadWriteRow to value. A DataSetException is thrown if the data type of value is not short, the data type of the Column is not Variant.SHORT, or the columnName does not exist.
This method is typically preferred over setShort(int,short) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setString(int ordinal, String value)Sets the Column indicated by its ordinal position in the ReadWriteRow to value. A DataSetException is thrown if the ordinal position does not exist, the data type of value is not java.lang.String, or the data type of the Column is not Variant.STRING.
public final void setString(String columnName, String value)Sets the Column indicated by columnName in the ReadWriteRow to value. A DataSetException is thrown if the data type of value is not String, the data type of the Column is not Variant.STRING, or columnName does not exist.
This method is typically preferred over setString(int,String) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setTime(int ordinal, Time value)Sets the Column indicated by its ordinal position in the ReadWriteRow to value A DataSetException is thrown if the ordinal position does not exist, the data type of value is not java.sql.Time, or the data type of the Column is not Variant.TIME.
public final void setTime(int ordinal, long value)Sets the Column indicated by columnName in the ReadWriteRow to value. The value parameter is expressed in the number of milliseconds since January 1, 1970, 00:00:00 GMT. A DataSetException is thrown if the data type of value is not long, the data type of the Column is not Variant.LONG, or the specified ordinal is invalid.
public final void setTime(String columnName, Time value)Sets the Column indicated by columnName in the ReadWriteRow to value. A DataSetException is thrown if the data type of value is not Time, the data type of the Column is not Variant.TIME, or columnName does not exist.
This method is typically preferred over setTime(int,Time) or setTime(int,long) since these methods use the column's ordinal position. They are less reliable because the ordinal position may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setTime(String columnName, long value)Sets the Column indicated by columnName in the ReadWriteRow to value. The value parameter is expressed in the number of milliseconds since January 1, 1970, 00:00:00 GMT. A DataSetException is thrown if the data type of value is not long, the data type of the Column is not Variant.TIME, or the columnName does not exist.
This method is typically preferred over setTime(int,Time) or setTime(int,long) since these methods use the column's ordinal position. They are less reliable because the ordinal position may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setTimestamp(int ordinal, Timestamp value)Sets the Column indicated by its ordinal position in the ReadWriteRow to value. A DataSetException is thrown if the ordinal position does not exist, the data type of value is not java.sql.Timestamp, or the data type of the Column is not Variant.TIMESTAMP.
public final void setTimestamp(int ordinal, long value)Sets the Column indicated by its ordinal position in the ReadWriteRow to value. The value parameter is expressed in the number of milliseconds since January 1, 1970, 00:00:00 GMT. A DataSetException is thrown if the ordinal position does not exist, the data type of value is not long, or the data type of the Column is not Variant.TIMESTAMP.
public final void setTimestamp(String columnName, Timestamp value)Sets the Column indicated by columnName in the ReadWriteRow to value. A DataSetException is thrown if the data type of value is not java.sql.Timestamp, the data type of the Column is not Variant.TIMESTAMP, or the columnName does not exist.
This method is typically preferred over setTimestamp(int,Timestamp) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setTimestamp(String columnName, long value)Sets the Column indicated by columnName in the ReadWriteRow to value. The value parameter is expressed in the number of milliseconds since January 1, 1970, 00:00:00 GMT. A DataSetException is thrown if the data type of value is not long, the columnName does not exist, or the data type of the Column is not Variant.TIMESTAMP.
This method is typically preferred over setTimestamp(int,long) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.
public final void setVariant(int ordinal, Variant value)Sets the Column indicated by its ordinal position in the ReadWriteRow to value. A DataSetException is thrown if the ordinal position does not exist, or if the data type of the value stored in the Variant (as returned by Variant.getType()) does not match with the Column's data type (as returned by Column.getDataType()).
public final void setVariant(String columnName, Variant value)Sets the Column indicated by columnName in the ReadWriteRow to value. A DataSetException is thrown if the columnName does not exist, or if the data type of the value stored in the Variant (as returned by Variant.getType()) does not match with the Column's data type (as returned by Column.getDataType()).
This method is typically preferred over setVariant(int,Variant) because it does not involve the column's ordinal position, which is not always reliable. A column's ordinal value may unexpectedly change due to persistent columns, columns that are automatically added to a query to provide a unique row identifier, and other conditions.