public abstract class TableController<T>
extends java.lang.Object
TableControl
. The loadData(int, java.util.List, java.util.List, java.util.List, int)
is mandatory to be implemented. That method should handle data population for
TableControl
Constructor and Description |
---|
TableController() |
Modifier and Type | Method and Description |
---|---|
boolean |
canDelete(TableControl table)
This method is called by
TableControl.delete() before
it actually executes delete routine. |
boolean |
canEdit(T selectedRecod)
This method is called by
TableControl when edit button is
clicked but before EDIT mode is actually activated. |
void |
delete(java.util.List<T> records)
Override this method to implement delete routine.
|
void |
doubleClick(T record)
Callback method to respond double click or ENTER on table's row
|
void |
exportToExcel(java.lang.String title,
int maxResult,
TableControl<T> tblView,
java.util.List<TableCriteria> lstCriteria)
Generic export to excel.
|
java.util.List<T> |
insert(java.util.List<T> newRecords)
Override this method to implement insert routine.
|
abstract TableData |
loadData(int startIndex,
java.util.List<TableCriteria> filteredColumns,
java.util.List<java.lang.String> sortedColumns,
java.util.List<javafx.scene.control.TableColumn.SortType> sortingOrders,
int maxResult) |
void |
postLoadData()
Callback method that is called after
loadData(int, java.util.List, java.util.List, java.util.List, int) |
void |
postSave(TableControl.Mode previousMode)
Callback method that is called after
TableControl.save() . |
T |
preInsert(T newRecord)
Called after user clicked insert button before a new row is added in the
table.
|
java.util.List<T> |
update(java.util.List<T> records)
Override this method to implement update routine.
|
boolean |
validate(java.util.List<T> changedRecords)
Callback method designed to execute validation.
|
public abstract TableData loadData(int startIndex, java.util.List<TableCriteria> filteredColumns, java.util.List<java.lang.String> sortedColumns, java.util.List<javafx.scene.control.TableColumn.SortType> sortingOrders, int maxResult)
public java.util.List<T> insert(java.util.List<T> newRecords)
newRecords
- public java.util.List<T> update(java.util.List<T> records)
records
- public void delete(java.util.List<T> records)
records
- public T preInsert(T newRecord)
newRecord
- public boolean canEdit(T selectedRecod)
TableControl
when edit button is
clicked but before EDIT mode is actually activated. Override this method to
and return FALSE to cancel EDIT mode change.selectedRecod
- public boolean canDelete(TableControl table)
TableControl.delete()
before
it actually executes delete routine. If this methode returns FALSE,
the delete is cancelled.table
- public void doubleClick(T record)
record
- public void exportToExcel(java.lang.String title, int maxResult, TableControl<T> tblView, java.util.List<TableCriteria> lstCriteria)
title
- maxResult
- tblView
- lstCriteria
- public void postLoadData()
loadData(int, java.util.List, java.util.List, java.util.List, int)
public void postSave(TableControl.Mode previousMode)
TableControl.save()
.previousMode
- Could be Mode.INSERT or Mode.EDITpublic boolean validate(java.util.List<T> changedRecords)
update(java.util.List<T>)
and insert(java.util.List<T>)
changedRecords
-