com.jidesoft.hibernate
Class HibernatePageTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
com.jidesoft.grid.AbstractPageTableModel
com.jidesoft.grid.AdvancePageTableModel
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
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 |
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.
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)