DataRow
Leave feedback
On this page
Inheritance: java.lang.Object
public class DataRow
Represents a row of data in a DataTable.
| Method | Description |
|---|---|
| readFrom(ResultSet resultSet) | Reads values from the java.sql.ResultSet |
| get(int columnIndex) | Gets the data stored in the column specified by index. |
| get(String columnName) | Gets the data stored in the column specified by name. |
| get(DataColumn column) | Gets the data stored in the specified DataColumn. |
| getTable() | Gets the DataTable for which this row has a schema. |
| getChildRows(DataRelation relation) | Gets the child rows of this DataRow using the specified DataRelation. |
| getParentRow(DataRelation relation) | Gets the parent row of a DataRow using the specified DataRelation. |
| getParentRows(DataRelation relation) | Gets the parent rows of a DataRow using the specified DataRelation. |
| set(int value, Object columnIndex) | Sets the data stored in the column specified by index. |
| set(String value, Object columnName) | Sets the data stored in the column specified by name. |
| set(DataColumn value, Object column) | Sets the data stored in the specified DataColumn. |
| getRowState() | Gets the current state of the row with regard to its relationship to the DataRowCollection. |
| setRowState(int state) | |
| delete() | Deletes the DataRow. |
| setOriginalValue(String columnName, Object data) | |
| getOriginalValue(String columnName) | |
| getItemArray() | Gets all the values for this row through an array. |
| setItemArray(Object[] value) | Sets all the values for this row through an array. |
| getKeyValues(DataKey childKey) | |
| remove(int index) | |
| toString() |
public boolean readFrom(ResultSet resultSet)
Reads values from the java.sql.ResultSet
Parameters:
| Parameter | Type | Description |
|---|---|---|
| resultSet | java.sql.ResultSet | storage to read from |
Returns: boolean - true if no read errors occurred
public Object get(int columnIndex)
Gets the data stored in the column specified by index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| columnIndex | int | The zero-based index of the column. |
Returns: java.lang.Object - An java.lang.Object that contains the data.
public Object get(String columnName)
Gets the data stored in the column specified by name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| columnName | java.lang.String | The name of the column. |
Returns: java.lang.Object - An java.lang.Object that contains the data.
public Object get(DataColumn column)
Gets the data stored in the specified DataColumn.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| column | DataColumn | A DataColumn that contains the data. |
Returns: java.lang.Object - An java.lang.Object that contains the data.
public DataTable getTable()
Gets the DataTable for which this row has a schema.
Returns: DataTable - The DataTable to which this row belongs.
public DataRow[] getChildRows(DataRelation relation)
Gets the child rows of this DataRow using the specified DataRelation.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| relation | DataRelation | The DataRelation to use. |
Returns: com.groupdocs.assembly.system.data.DataRow[] - An array of DataRow objects or an array of length zero.
public DataRow getParentRow(DataRelation relation)
Gets the parent row of a DataRow using the specified DataRelation.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| relation | DataRelation | The DataRelation to use. |
Returns: DataRow - The parent DataRow of the current row.
public DataRow[] getParentRows(DataRelation relation)
Gets the parent rows of a DataRow using the specified DataRelation.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| relation | DataRelation | The DataRelation to use. |
Returns: com.groupdocs.assembly.system.data.DataRow[] - An array of DataRow objects or an array of length zero.
public void set(int value, Object columnIndex)
Sets the data stored in the column specified by index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int | An java.lang.Object that contains the data. |
| columnIndex | java.lang.Object | The zero-based index of the column. |
public void set(String value, Object columnName)
Sets the data stored in the column specified by name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | An java.lang.Object that contains the data. |
| columnName | java.lang.Object | The name of the column. |
public void set(DataColumn value, Object column)
Sets the data stored in the specified DataColumn.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | DataColumn | An java.lang.Object that contains the data. |
| column | java.lang.Object | A DataColumn that contains the data. |
public int getRowState()
Gets the current state of the row with regard to its relationship to the DataRowCollection.
Returns: int - One of the DataRowState values. The returned value is a bitwise combination of DataRowState constants.
public void setRowState(int state)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| state | int |
public void delete()
Deletes the DataRow.
public void setOriginalValue(String columnName, Object data)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| columnName | java.lang.String | |
| data | java.lang.Object |
public Object getOriginalValue(String columnName)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| columnName | java.lang.String |
Returns: java.lang.Object
public Object[] getItemArray()
Gets all the values for this row through an array.
Returns: java.lang.Object[] - An array of type java.lang.Object.
public void setItemArray(Object[] value)
Sets all the values for this row through an array.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.Object[] | An array of type java.lang.Object. |
public Object[] getKeyValues(DataKey childKey)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| childKey | DataKey |
Returns: java.lang.Object[]
public void remove(int index)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | int |
public String toString()
Returns: java.lang.String
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.