com.ibm.xsp.model
Class AbstractDataModel

java.lang.Object
  extended by javax.faces.model.DataModel
      extended by com.ibm.xsp.model.TabularDataModel
          extended by com.ibm.xsp.model.AbstractDataModel
All Implemented Interfaces:
ValueBindingObject, DataModelEx
Direct Known Subclasses:
AbstractViewDataModel

public abstract class AbstractDataModel
extends TabularDataModel
implements ValueBindingObject


Field Summary
protected  int _rowIndex
           
protected  java.lang.Object _wrappedData
           
 
Fields inherited from class com.ibm.xsp.model.TabularDataModel
dataControl, RESORT_ASCENDING, RESORT_BOTH, RESORT_DESCENDING, RESORT_NONE, SORT_ASCENDING, SORT_DESCENDING, SORT_TOGGLE, TYPE_CATEGORY, TYPE_ENTRY, TYPE_TOTAL, TYPE_UNKNOWN
 
Constructor Summary
AbstractDataModel()
          Construct an AbstractDataModel instance
 
Method Summary
protected  java.lang.String getPropertyAsString(java.lang.String name, java.lang.String value, boolean checkRequest)
          Helper method to return a property value
protected  java.lang.Object getPropertyValue(java.lang.String name, java.lang.Object value, boolean checkRequest)
          Helper method to return a property value
 int getRowIndex()
          Note: this does not delegate to ValueBindingObject.getValueBinding(String) because the row index cannot be a value binding.
 javax.faces.el.ValueBinding getValueBinding(java.lang.String name)
          Return the ValueBinding instance to used to calculate the value for the specified property.
 java.lang.Object getWrappedData()
          Delegates to ValueBindingObject.getValueBinding(String)
 boolean isRowAvailable()
          Return true is a row is available, i.e.
protected  void setDisplayParameters(int first, int rows)
          No implementation.
 void setRowIndex(int rowIndex)
           
 void setValueBinding(java.lang.String name, javax.faces.el.ValueBinding binding)
          Set the ValueBinding instance to used to calculate the value for the specified property.
 void setWrappedData(java.lang.Object data)
           
 
Methods inherited from class com.ibm.xsp.model.TabularDataModel
addSelectedId, canHaveMoreRows, clearSelectedIds, codeToParameter, collapseRow, deleteSelectedItems, duplicateRowData, expandRow, getCategoryColumnIndex, getCategoryCount, getCategoryFilter, getCategoryIndentLevel, getCategoryName, getColumnIndentLevel, getColumnValues, getDataControl, getIndentLevel, getResortColumn, getResortState, getResortType, getRowId, getRowPosition, getRowType, getSelectedIds, hasCategoryFilter, hasFTFilter, hasKeysFilter, hasMoreRows, insertRowData, isCategorized, isColumnCategorized, isColumnSortable, isRowCategory, isRowCollapsed, isRowData, isRowExpanded, isRowLeaf, isRowNonData, isRowTotal, isRowUnread, isRowUnread, isSelectedId, parameterToCode, removeRowData, removeSelectedId, resetResortState, setDataControl, setResortOrder, setRowData, toggleRow
 
Methods inherited from class javax.faces.model.DataModel
addDataModelListener, getDataModelListeners, getRowCount, getRowData, removeDataModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_rowIndex

protected int _rowIndex

_wrappedData

protected java.lang.Object _wrappedData
Constructor Detail

AbstractDataModel

public AbstractDataModel()
Construct an AbstractDataModel instance

Method Detail

isRowAvailable

public boolean isRowAvailable()
Description copied from class: TabularDataModel
Return true is a row is available, i.e. current row index is between the first and last row indexes. (non-Javadoc)

Overrides:
isRowAvailable in class TabularDataModel
See Also:
DataModel.isRowAvailable()

getRowIndex

public int getRowIndex()
Note: this does not delegate to ValueBindingObject.getValueBinding(String) because the row index cannot be a value binding.

Overrides:
getRowIndex in class TabularDataModel
See Also:
DataModel.getRowIndex()

setRowIndex

public void setRowIndex(int rowIndex)
Overrides:
setRowIndex in class TabularDataModel

getWrappedData

public java.lang.Object getWrappedData()
Delegates to ValueBindingObject.getValueBinding(String)

Overrides:
getWrappedData in class TabularDataModel
See Also:
DataModel.getWrappedData()

setValueBinding

public void setValueBinding(java.lang.String name,
                            javax.faces.el.ValueBinding binding)
Description copied from interface: ValueBindingObject
Set the ValueBinding instance to used to calculate the value for the specified property.

Specified by:
setValueBinding in interface ValueBindingObject
Parameters:
name - Name of the property
binding - The ValueBinding to set, or null to remove an existing ValueBinding

setWrappedData

public void setWrappedData(java.lang.Object data)
Overrides:
setWrappedData in class TabularDataModel

getValueBinding

public javax.faces.el.ValueBinding getValueBinding(java.lang.String name)
Description copied from interface: ValueBindingObject
Return the ValueBinding instance to used to calculate the value for the specified property.

Specified by:
getValueBinding in interface ValueBindingObject
Parameters:
name - Name of the property
Returns:
ValueBinding instance to used to calculate the value for the specified property

getPropertyAsString

protected java.lang.String getPropertyAsString(java.lang.String name,
                                               java.lang.String value,
                                               boolean checkRequest)
Helper method to return a property value


getPropertyValue

protected java.lang.Object getPropertyValue(java.lang.String name,
                                            java.lang.Object value,
                                            boolean checkRequest)
Helper method to return a property value


setDisplayParameters

protected void setDisplayParameters(int first,
                                    int rows)
No implementation.

Parameters:
first - row to start at
rows - number of rows to display