org.jaffa.presentation.portlet.widgets.model
Class GridModelRow

java.lang.Object
  extended byorg.jaffa.presentation.portlet.widgets.model.WidgetModel
      extended byorg.jaffa.presentation.portlet.widgets.model.GridModelRow
All Implemented Interfaces:
IModelMap

public class GridModelRow
extends WidgetModel
implements IModelMap

A GridModel will contain instances of this class, for each row that gets added to it.


Method Summary
 void addElement(String id, Object obj)
          Add an element to the row.
 Object get(String key)
          Returns the value for the input key.
 Object getElement(String id)
          Returns the row element identified by the input element id.
 int getRowId()
          Returns the id for this row.
 boolean hasElement(String id)
          Returns a true if the row has an element having the input id.
 int size()
          Returns the number of key/value pairs stored in the model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRowId

public int getRowId()
Returns the id for this row.

Returns:
the id for this row.

getElement

public Object getElement(String id)
Returns the row element identified by the input element id.

Parameters:
id - The id of the element.
Returns:
the row element identified by the input element id.

addElement

public void addElement(String id,
                       Object obj)
Add an element to the row.

Parameters:
id - The id of the element.
obj - The value of the element.

hasElement

public boolean hasElement(String id)
Returns a true if the row has an element having the input id.

Parameters:
id - The id of the element.
Returns:
a true if the row has an element having the input id.

get

public Object get(String key)
Returns the value for the input key.

Specified by:
get in interface IModelMap
Parameters:
key - The key
Returns:
the value for the input key.

size

public int size()
Returns the number of key/value pairs stored in the model.

Specified by:
size in interface IModelMap
Returns:
the number of key/value pairs stored in the model.


Copyright © 2002-2004 JAFFA Project.