org.eobjects.metamodel.data
Interface Row

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractRow, DefaultRow

public interface Row
extends Serializable

Represents a row of data in a DataSet. Each row is a mapping between SelectItems and values for each SelectItem.

See Also:
DataSet, SelectItem

Method Summary
 SelectItem[] getSelectItems()
          Gets the select items that represent the columns of the DataSet that this row pertains to.
 Style getStyle(Column column)
           
 Style getStyle(int index)
           
 Style getStyle(SelectItem item)
           
 Style[] getStyles()
           
 Row getSubSelection(DataSetHeader header)
          Creates a row similar to this one but only with a subset of the values.
 Row getSubSelection(SelectItem[] selectItems)
          Deprecated. use getSubSelection(DataSetHeader) instead.
 Object getValue(Column column)
          Shorthand method for getting the value of a SelectItem based on the provided column.
 Object getValue(int index)
          Gets the value of the row at a given index
 Object getValue(SelectItem item)
          Gets the value of the provided SelectItem.
 Object[] getValues()
          Gets the values of the row, represented as an object array
 int indexOf(Column column)
          Gets the index of a Column in the row.
 int indexOf(SelectItem item)
          Gets the index of a SelectItem in the row.
 int size()
          Gets the amount of values/columns/select items represented in this row.
 

Method Detail

getValue

Object getValue(SelectItem item)
Gets the value of the provided SelectItem.

Parameters:
item -
Returns:
the value that corresponds to the provided SelectItem. Can be null if either the value is null or if no value exists that matches the SelectItem.

getValue

Object getValue(Column column)
Shorthand method for getting the value of a SelectItem based on the provided column. Invoking this method is equivalent to invoking getValue(new SelectItem(column)).

Parameters:
column -
Returns:
the value of the specified column

getValue

Object getValue(int index)
                throws IndexOutOfBoundsException
Gets the value of the row at a given index

Parameters:
index -
Returns:
the value at the specified index
Throws:
IndexOutOfBoundsException - if the provided index is out of range

getStyle

Style getStyle(SelectItem item)

getStyle

Style getStyle(Column column)

getStyle

Style getStyle(int index)
               throws IndexOutOfBoundsException
Throws:
IndexOutOfBoundsException

getStyles

Style[] getStyles()

indexOf

int indexOf(SelectItem item)
Gets the index of a SelectItem in the row.

Parameters:
item - the item to get the index of
Returns:
the index of a SelectItem in the row. If the SelectItem is not found -1 will be returned.

indexOf

int indexOf(Column column)
Gets the index of a Column in the row.

Parameters:
column - the column to get the index of
Returns:
the index of a column in the row. If the Column is not found, -1 will be returned.

getSelectItems

SelectItem[] getSelectItems()
Gets the select items that represent the columns of the DataSet that this row pertains to.

Returns:

getValues

Object[] getValues()
Gets the values of the row, represented as an object array

Returns:
an array of objects, containing the values of this row.

getSubSelection

@Deprecated
Row getSubSelection(SelectItem[] selectItems)
Deprecated. use getSubSelection(DataSetHeader) instead.

Creates a row similar to this one but only with a subset of the values.

Parameters:
selectItems - the select items (~ columns) to sub-select the row with
Returns:
a new Row object containing only the select items requested

getSubSelection

Row getSubSelection(DataSetHeader header)
Creates a row similar to this one but only with a subset of the values.

Parameters:
header - the new header to sub-select the row with
Returns:
a new Row object containing only the select items in the newly requested header

size

int size()
Gets the amount of values/columns/select items represented in this row.

Returns:


Copyright © 2007-2013. All Rights Reserved.