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

readFrom(ResultSet resultSet)

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

get(int columnIndex)

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.

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 java.lang.Object that contains the data.

get(DataColumn column)

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.

getTable()

public DataTable getTable()

Gets the DataTable for which this row has a schema.

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

getChildRows(DataRelation relation)

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.

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 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.

set(int value, Object columnIndex)

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.

set(String value, Object columnName)

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.

set(DataColumn value, Object 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.

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. The returned value is a bitwise combination of DataRowState constants.

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[] - An array of type java.lang.Object.

setItemArray(Object[] value)

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.

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