DataRow

Inheritance: java.lang.Object

public class DataRow

Represents a row of data in a DataTable.

Methods

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()

readFrom(ResultSet resultSet)

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

get(int index)

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.

get(String columnName)

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.

get(DataColumn column)

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.

getTable()

public DataTable getTable()

Gets the DataTable for which this row has a schema

Returns: DataTable - he DataTable to which this row belongs.

getChildRows(DataRelation relation)

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.

getParentRow(DataRelation relation)

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.

getParentRows(DataRelation relation)

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[]

set(int columnIndex, Object value)

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.

set(String columnName, Object value)

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.

set(DataColumn column, Object value)

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.

getRowState()

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.

setRowState(int state)

public void setRowState(int state)

Parameters:

Parameter Type Description
state int

delete()

public void delete()

Deletes the DataRow.

setOriginalValue(String columnName, Object data)

public void setOriginalValue(String columnName, Object data)

Parameters:

Parameter Type Description
columnName java.lang.String
data java.lang.Object

getOriginalValue(String columnName)

public Object getOriginalValue(String columnName)

Parameters:

Parameter Type Description
columnName java.lang.String

Returns: java.lang.Object

getItemArray()

public Object[] getItemArray()

Gets all the values for this row through an array.

Returns: java.lang.Object[] - the values of this row.

setItemArray(Object[] array)

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.

getKeyValues(DataKey childKey)

public Object[] getKeyValues(DataKey childKey)

Parameters:

Parameter Type Description
childKey DataKey

Returns: java.lang.Object[]

remove(int index)

public void remove(int index)

Parameters:

Parameter Type Description
index int

toString()

public String toString()

Returns: java.lang.String