org.eobjects.metamodel.data
Class DefaultRow

java.lang.Object
  extended by org.eobjects.metamodel.data.AbstractRow
      extended by org.eobjects.metamodel.data.DefaultRow
All Implemented Interfaces:
Serializable, Cloneable, Row

public final class DefaultRow
extends AbstractRow
implements Row

Default Row implementation. Holds values in memory.

Author:
Kasper Sørensen
See Also:
Serialized Form

Constructor Summary
DefaultRow(DataSetHeader header, Object[] values)
          Constructs a row.
DefaultRow(DataSetHeader header, Object[] values, Style[] styles)
          Constructs a row.
DefaultRow(List<SelectItem> items, Object[] values)
          Deprecated. use DefaultRow(DataSetHeader, Object[]) or DefaultRow(DataSetHeader, Object[], Style[]) instead.
DefaultRow(List<SelectItem> items, Object[] values, Style[] styles)
          Deprecated. use DefaultRow(DataSetHeader, Object[]) or DefaultRow(DataSetHeader, Object[], Style[]) instead.
DefaultRow(SelectItem[] items, Object[] values)
          Deprecated. use DefaultRow(DataSetHeader, Object[]) or DefaultRow(DataSetHeader, Object[], Style[]) instead.
DefaultRow(SelectItem[] items, Object[] values, Style[] styles)
          Deprecated. use DefaultRow(DataSetHeader, Object[]) or DefaultRow(DataSetHeader, Object[], Style[]) instead.
 
Method Summary
protected  DataSetHeader getHeader()
           
 Style getStyle(int index)
           
 Style[] getStyles()
           
 Object getValue(int index)
          Gets the value of the row at a given index
 Object[] getValues()
          Gets the values of the row, represented as an object array
 
Methods inherited from class org.eobjects.metamodel.data.AbstractRow
clone, equals, getSelectItems, getStyle, getStyle, getSubSelection, getSubSelection, getValue, getValue, hashCode, indexOf, indexOf, size, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eobjects.metamodel.data.Row
getSelectItems, getStyle, getStyle, getSubSelection, getSubSelection, getValue, getValue, indexOf, indexOf, size
 

Constructor Detail

DefaultRow

public DefaultRow(DataSetHeader header,
                  Object[] values,
                  Style[] styles)
Constructs a row.

Parameters:
header -
values -
styles -

DefaultRow

public DefaultRow(DataSetHeader header,
                  Object[] values)
Constructs a row.

Parameters:
header -
values -

DefaultRow

@Deprecated
public DefaultRow(SelectItem[] items,
                             Object[] values)
Deprecated. use DefaultRow(DataSetHeader, Object[]) or DefaultRow(DataSetHeader, Object[], Style[]) instead.

Constructs a row from an array of SelectItems and an array of corresponding values

Parameters:
items - the array of SelectItems
values - the array of values

DefaultRow

@Deprecated
public DefaultRow(SelectItem[] items,
                             Object[] values,
                             Style[] styles)
Deprecated. use DefaultRow(DataSetHeader, Object[]) or DefaultRow(DataSetHeader, Object[], Style[]) instead.

Constructs a row from an array of SelectItems and an array of corresponding values

Parameters:
items - the array of SelectItems
values - the array of values
styles - an optional array of styles

DefaultRow

@Deprecated
public DefaultRow(List<SelectItem> items,
                             Object[] values)
Deprecated. use DefaultRow(DataSetHeader, Object[]) or DefaultRow(DataSetHeader, Object[], Style[]) instead.

Constructs a row from a list of SelectItems and an array of corresponding values

Parameters:
items - the list of SelectItems
values - the array of values

DefaultRow

@Deprecated
public DefaultRow(List<SelectItem> items,
                             Object[] values,
                             Style[] styles)
Deprecated. use DefaultRow(DataSetHeader, Object[]) or DefaultRow(DataSetHeader, Object[], Style[]) instead.

Constructs a row from a list of SelectItems and an array of corresponding values

Parameters:
items - the list of SelectItems
values - the array of values
styles - an optional array of styles
Method Detail

getValue

public Object getValue(int index)
                throws ArrayIndexOutOfBoundsException
Description copied from interface: Row
Gets the value of the row at a given index

Specified by:
getValue in interface Row
Returns:
the value at the specified index
Throws:
ArrayIndexOutOfBoundsException

getValues

public Object[] getValues()
Description copied from interface: Row
Gets the values of the row, represented as an object array

Specified by:
getValues in interface Row
Overrides:
getValues in class AbstractRow
Returns:
an array of objects, containing the values of this row.

getStyle

public Style getStyle(int index)
               throws IndexOutOfBoundsException
Specified by:
getStyle in interface Row
Throws:
IndexOutOfBoundsException

getStyles

public Style[] getStyles()
Specified by:
getStyles in interface Row
Overrides:
getStyles in class AbstractRow

getHeader

protected DataSetHeader getHeader()
Specified by:
getHeader in class AbstractRow


Copyright © 2007-2013. All Rights Reserved.