JIDE 3.5.15

com.jidesoft.hibernate
Class HibernatePageTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.jidesoft.grid.AbstractPageTableModel
          extended by com.jidesoft.grid.AdvancePageTableModel
              extended by com.jidesoft.hibernate.HibernatePageTableModel
All Implemented Interfaces:
AutoFilterTableHeaderAdapter, AutoFilterTableModel, ContextSensitiveTableModel, IFilterableTableModel, ISortableTableModel, MultiTableModel, PageNavigationSupport, Serializable, EventListener, TableModelListener, TableModel

public class HibernatePageTableModel
extends AdvancePageTableModel

HibernatePageTableModel extends AdvancePageTableModel by providing support for Hibernate.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.jidesoft.grid.ISortableTableModel
ISortableTableModel.SortItem
 
Nested classes/interfaces inherited from interface com.jidesoft.grid.IFilterableTableModel
IFilterableTableModel.FilterItem
 
Nested classes/interfaces inherited from interface com.jidesoft.grid.AutoFilterTableHeaderAdapter
AutoFilterTableHeaderAdapter.FilterTitleFormatter
 
Field Summary
 
Fields inherited from class com.jidesoft.grid.AdvancePageTableModel
_filterItemSupport, _sortItemSupport
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Fields inherited from interface com.jidesoft.grid.ISortableTableModel
SORT_PRIORITY_FIFO, SORT_PRIORITY_FILO
 
Fields inherited from interface com.jidesoft.grid.IFilterableTableModel
ALL_COLUMNS, ANY_COLUMNS, IDENTIFIER_ALL_COLUMNS, IDENTIFIER_ANY_COLUMNS
 
Fields inherited from interface com.jidesoft.grid.MultiTableModel
FOOTER_COLUMN, HEADER_COLUMN, REGULAR_COLUMN
 
Constructor Summary
HibernatePageTableModel(Session session, Class<?> type)
          Creates a HibernatePageTableModel.
HibernatePageTableModel(Session session, Class<?> type, int pageSize)
          Creates a HibernatePageTableModel.
 
Method Summary
protected  List<Criterion> createCriterions(FilterItemSupport filterItemSupport)
           
protected  TableModel createCurrentPageTableModel(List rows)
           
protected  List<Order> createOrders(SortItemSupport sortItemSupport)
           
protected  Criterion prepareCriterion(IFilterableTableModel.FilterItem filterItem)
           
 void refreshData(SortItemSupport sortItemSupport, FilterItemSupport filterItemSupport, int currentPage, int pageSize)
          Submits the query.
 
Methods inherited from class com.jidesoft.grid.AdvancePageTableModel
addFilter, addFilter, addFilter, addFilterableTableModelListener, addSortListener, clearFilters, fireFilterAdded, fireFilterChanged, fireFilterRemoved, fireSortEvent, fireSortingEvent, getActualRowAt, getColumnClass, getColumnCount, getColumnName, getColumnSortRank, getCurrentPageModel, getDynamicTableFilters, getFilterableTableModelListeners, getFilterIcon, getFilterItems, getFilters, getFilterTitleFormatter, getListCellRenderer, getMasterSortColumns, getMaximumSortColumns, getPossibleValues, getPossibleValuesAndConverters, getSortedRowAt, getSortingColumns, getSortListeners, getSortPriority, getTitleConverter, getTotalRecordCount, getValueAt, hasFilter, hasFilter, isAdjusting, isAllowCustomFilter, isAllowMultipleValues, isAndMode, isCellEditable, isColumnAscending, isColumnAutoFilterable, isColumnFilterable, isColumnSortable, isColumnSorted, isColumnVisible, isFilteringPaused, isFiltersApplied, isMultiColumnSortable, isSameConverterAt, isSortable, isUseTableCellRenderer, isValuePredetermined, pageCountChanged, pageIndexChanged, refresh, removeAllFilters, removeAllFilters, removeFilter, removeFilter, removeFilter, removeFilterableTableModelListener, removeSortListener, reset, resort, reverseColumnSortOrder, setAdjusting, setAndMode, setColumnSortable, setCurrentPageModel, setFilteringPaused, setFiltersApplied, setMasterSortColumns, setMaximumSortColumns, setMultiColumnSortable, setSortable, setSortingColumns, setSortPriority, setTotalRecordCount, setValueAt, sort, sortColumn, sortColumn, sortColumn, toggleSortOrder, unsortColumn
 
Methods inherited from class com.jidesoft.grid.AbstractPageTableModel
addPageNavigationListener, createCompoundTableModelEvent, firePageNavigationEvent, fireTableCellsUpdated, fireTableChanged, firstPage, getCellClassAt, getColumnType, getConverterContextAt, getCurrentPage, getEditorContextAt, getPageCount, getPageNavigationListeners, getPageSize, getRowCount, getTableIndex, lastPage, nextPage, pageSizeChanged, previousPage, removePageNavigationListener, setCurrentPage, setPageCount, setPageSize, tableCellsUpdated, tableChanged, tableDataChanged, tableRowsDeleted, tableRowsInserted, tableRowsUpdated, tableStructureChanged
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getRowCount, removeTableModelListener
 

Constructor Detail

HibernatePageTableModel

public HibernatePageTableModel(Session session,
                               Class<?> type)
Creates a HibernatePageTableModel. The page size is defaulted to 10 in this case.

Parameters:
session - the session object from Hibernate.
type - the data type which is referred as the persistent class in Hibernate.

HibernatePageTableModel

public HibernatePageTableModel(Session session,
                               Class<?> type,
                               int pageSize)
Creates a HibernatePageTableModel.

Parameters:
session - the session object from Hibernate.
type - the data type which is referred as the persistent class in Hibernate.
pageSize - the page size.
Method Detail

createOrders

protected List<Order> createOrders(SortItemSupport sortItemSupport)

prepareCriterion

protected Criterion prepareCriterion(IFilterableTableModel.FilterItem filterItem)

createCriterions

protected List<Criterion> createCriterions(FilterItemSupport filterItemSupport)

refreshData

public void refreshData(SortItemSupport sortItemSupport,
                        FilterItemSupport filterItemSupport,
                        int currentPage,
                        int pageSize)
Submits the query.

Specified by:
refreshData in class AdvancePageTableModel
Parameters:
sortItemSupport - the information for sort items.
filterItemSupport - the information for filter items.
currentPage - the current page.
pageSize - the page size.

createCurrentPageTableModel

protected TableModel createCurrentPageTableModel(List rows)

JIDE 3.5.15