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 ResultSet |
| get(int index) | 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 specified DataColumn. |
| getTable() | Gets the DataTable for which this row has a schema |
| getChildRows(DataRelation relation) | Gets the child rows of a 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 using the specified DataRelation |
| set(int columnIndex, Object value) | Sets the data stored in the column specified by index. |
| set(String columnName, Object value) | Sets the data stored in the column specified by index. |
| set(DataColumn column, Object value) | Sets the data stored in the column specified by index. |
| 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[] array) | 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 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 index)
Gets the data stored in the column specified by index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | int | The zero-based index of the column. |
Returns: java.lang.Object - An 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 Object that contains the data.
public Object get(DataColumn column)
Gets the specified DataColumn.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| column | DataColumn | A DataColumn that contains information about the column. |
Returns: java.lang.Object - An Object that contains the data.
public DataTable getTable()
Gets the DataTable for which this row has a schema
Returns: DataTable - he DataTable to which this row belongs.
public DataRow[] getChildRows(DataRelation relation)
Gets the child 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.
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 using the specified DataRelation
Parameters:
| Parameter | Type | Description |
|---|---|---|
| relation | DataRelation |
Returns: com.groupdocs.assembly.system.data.DataRow[]
public void set(int columnIndex, Object value)
Sets the data stored in the column specified by index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| columnIndex | int | The zero-based index of the column. |
| value | java.lang.Object | An Object that contains the data. |
public void set(String columnName, Object value)
Sets the data stored in the column specified by index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| columnName | java.lang.String | The name of the column. |
| value | java.lang.Object | An Object that contains the data. |
public void set(DataColumn column, Object value)
Sets the data stored in the column specified by index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| column | DataColumn | The name of the column. |
| value | java.lang.Object | An Object 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.
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[] - the values of this row.
public void setItemArray(Object[] array)
Sets all the values for this row through an array. The array must have the same size and ordering as the column collection. Passing null in the setItemArray indicates that no value was specified.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| array | java.lang.Object[] | new values for this row. |
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.