org.apache.tapestry.contrib.table.model.common
Class AbstractTableModel

java.lang.Object
  extended by org.apache.tapestry.contrib.table.model.common.AbstractTableModel
All Implemented Interfaces:
Serializable, ITableModel
Direct Known Subclasses:
BasicTableModelWrap, SimpleTableModel, SqlTableModel

public abstract class AbstractTableModel
extends Object
implements ITableModel, Serializable

A base table model that implements the handling of the model state. Used by most standard ITableModel implementations.

Version:
$Id: AbstractTableModel.java 243791 2004-02-19 17:38:13Z hlship $
Author:
mindbridge
See Also:
Serialized Form

Constructor Summary
protected AbstractTableModel()
           
protected AbstractTableModel(SimpleTableState objTableState)
           
 
Method Summary
 int getPageCount()
          Method getPageCount.
 ITablePagingState getPagingState()
          Method getPagingState.
protected abstract  int getRowCount()
           
 ITableSortingState getSortingState()
          Method getSortingState.
 SimpleTableState getState()
          Returns the tableState.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.contrib.table.model.ITableModel
getColumnModel, getCurrentPageRows
 

Constructor Detail

AbstractTableModel

protected AbstractTableModel()

AbstractTableModel

protected AbstractTableModel(SimpleTableState objTableState)
Method Detail

getPagingState

public ITablePagingState getPagingState()
Description copied from interface: ITableModel
Method getPagingState.

Specified by:
getPagingState in interface ITableModel
Returns:
ITablePagingState the paging state of the table
See Also:
ITableModel.getPagingState()

getSortingState

public ITableSortingState getSortingState()
Description copied from interface: ITableModel
Method getSortingState.

Specified by:
getSortingState in interface ITableModel
Returns:
ITableSortingState the sorting state of the table
See Also:
ITableModel.getSortingState()

getState

public SimpleTableState getState()
Returns the tableState.

Returns:
SimpleTableState

getRowCount

protected abstract int getRowCount()

getPageCount

public int getPageCount()
Description copied from interface: ITableModel
Method getPageCount.

Specified by:
getPageCount in interface ITableModel
Returns:
int the number of pages this table would have given the current data and paging state