org.jminor.framework.client.model
Class DefaultEntityTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.jminor.common.model.AbstractFilteredTableModel<Entity,Property>
          extended by org.jminor.framework.client.model.DefaultEntityTableModel
All Implemented Interfaces:
Serializable, TableModel, FilteredModel<Entity>, FilteredTableModel<Entity,Property>, Refreshable, EntityDataProvider, EntityTableModel

public class DefaultEntityTableModel
extends AbstractFilteredTableModel<Entity,Property>
implements EntityTableModel

A TableModel implementation for displaying and working with entities.

 String entityID = "some.entity";
 String clientTypeID = "JavadocDemo";
 User user = new User("scott", "tiger");

 EntityConnectionProvider connectionProvider = EntityConnectionProviders.createConnectionProvider(user, clientTypeID);

 EntityTableModel tableModel = new DefaultEntityTableModel(entityID, connectionProvider);

 EntityEditModel editModel = ...;

 tableModel.setEditModel(editModel);

 EntityTablePanel panel = new EntityTablePanel(model);
 

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jminor.common.model.FilteredTableModel
FilteredTableModel.SortingState
 
Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
DefaultEntityTableModel(String entityID, EntityConnectionProvider connectionProvider)
          Instantiates a new DefaultEntityTableModel with default column and search models.
DefaultEntityTableModel(String entityID, EntityConnectionProvider connectionProvider, EntityTableSearchModel searchModel)
          Instantiates a new DefaultEntityTableModel.
 
Method Summary
 void addEntitiesByPrimaryKeys(List<Entity.Key> primaryKeys, boolean atFront)
          Retrieves the entities identified by the given primary keys and adds them to this table model
 void deleteSelected()
          Deletes the selected entities
protected  void doRefresh()
          Refreshes the data in this table model.
 StateObserver getBatchUpdateAllowedState()
          
 Class<?> getColumnClass(int columnIndex)
          
protected  Class getColumnClass(Property columnIdentifier)
          
protected  Comparable getComparable(Object object, Property columnIdentifier)
          
 EntityConnectionProvider getConnectionProvider()
          
 EntityEditModel getEditModel()
          Returns the edit model associated with this table model, throws a RuntimeExcption in case no edit model has been associated with this table model
 List<Entity> getEntitiesByPrimaryKeys(List<Entity.Key> keys)
          Finds entities according to the values in keys
 Collection<Entity> getEntitiesByPropertyValues(Map<String,Object> values)
          Finds entities according to the values of propertyValues
 Entity getEntityByPrimaryKey(Entity.Key primaryKey)
          
 String getEntityID()
          
 int getFetchCount()
          Returns the maximum number of records to fetch via the underlying query, by default this returns -1, meaning all records should be fetched
 List<Entity.Key> getPrimaryKeysOfSelectedEntities()
          
 Color getPropertyBackgroundColor(int row, Property columnProperty)
          
 PropertySummaryModel getPropertySummaryModel(Property property)
          Returns the PropertySummaryModel associated with the given property
 PropertySummaryModel getPropertySummaryModel(String propertyID)
          Returns the PropertySummaryModel associated with the property identified by propertyID
protected  Criteria<Property.ColumnProperty> getQueryCriteria()
           
 ReportDataWrapper getReportDataSource()
          Returns an initialized ReportDataWrapper instance, the default implementation returns null.
 EntityTableSearchModel getSearchModel()
          
protected  String getSearchValueAt(int rowIndex, Property columnIdentifier)
          Returns the value to use when searching through the table.
 Iterator<Entity> getSelectedEntitiesIterator()
          Returns an Iterator which iterates through the selected entities
 Map<String,Collection<Entity>> getSelectionDependencies()
          
 SortingDirective getSortingDirective(String propertyID)
          
 String getStatusMessage()
          
 List<Property> getTableColumnProperties()
          
 Object getValueAt(int rowIndex, int columnIndex)
          
 Collection<Object> getValues(Property property, boolean selectedOnly)
          
protected  void handleDelete(DeleteEvent event)
           
 boolean hasEditModel()
          
 int indexOf(Entity.Key primaryKey)
          
 boolean isBatchUpdateAllowed()
          
 boolean isCellEditable(int rowIndex, int columnIndex)
          
 boolean isDeleteAllowed()
          
 boolean isDetailModel()
          
 boolean isQueryConfigurationAllowed()
          
 boolean isQueryCriteriaRequired()
          
 boolean isReadOnly()
          
 boolean isUpdateAllowed()
          
protected  List<Entity> performQuery(Criteria<Property.ColumnProperty> criteria)
          Queries for the data used to populate this EntityTableModel when it is refreshed
 void replaceEntities(Collection<Entity> entities)
          Replaces the given entities in this table model
 void replaceForeignKeyValues(String foreignKeyEntityID, Collection<Entity> newForeignKeyValues)
          For every entity in this table model, replaces the foreign key instance bearing the primary key with the corresponding entity from foreignKeyValues, useful when property values have been changed in the referenced entity that must be reflected in the table model.
 EntityTableModel setBatchUpdateAllowed(boolean batchUpdateAllowed)
          
 EntityTableModel setDetailModel(boolean detailModel)
          
 void setEditModel(EntityEditModel editModel)
          Associates the given edit model with this table model, this enables delete/update functionality via this table model as well as enabling it to react to delete events in the edit model.
 EntityTableModel setFetchCount(int fetchCount)
          Sets the maximum number of records to fetch via the underlying query, a value of -1 means all records should be fetched
 void setForeignKeySearchValues(String referencedEntityID, List<Entity> referenceEntities)
          Refreshes this table model according the the given values by finding the first foreign key property referencing the entity identified by referencedEntityID and setting referenceEntities as the criteria values.
 EntityTableModel setQueryConfigurationAllowed(boolean value)
          Specifies whether or not the underlying query should be configurable
 EntityTableModel setQueryCriteriaRequired(boolean value)
          
 EntityTableModel setReportDataSource(ReportDataWrapper reportDataSource)
          Sets the report data source to use during report generation
 void setSelectedByPrimaryKeys(List<Entity.Key> keys)
          Sets the selected entities according to the primary keys in primaryKeys
 void setSortingDirective(String propertyID, SortingDirective directive, boolean addColumnToSort)
          
 void setValueAt(Object aValue, int rowIndex, int columnIndex)
          
 String toString()
          
 void update(List<Entity> entities)
          Updates the given Entities.
 
Methods inherited from class org.jminor.common.model.AbstractFilteredTableModel
addColumnHiddenListener, addColumnShownListener, addFilteringListener, addItems, addRefreshDoneListener, addRefreshStartedListener, addSelectedIndexListener, addSelectedItemIndex, addSelectedItemIndexes, addSelectionChangedListener, addSortingListener, addTableDataChangedListener, clear, clearSelection, clearSortingState, contains, convertColumnIndexToView, filterContents, findNextItemCoordinate, findNextItemCoordinate, getAllItems, getColumnCount, getColumnIdentifer, getColumnModel, getFilterCriteria, getFilteredItemCount, getFilteredItems, getFilterModel, getHiddenColumns, getItemAt, getMultipleSelectionState, getRowCount, getSearchCriteria, getSelectedIndex, getSelectedIndexes, getSelectedItem, getSelectedItems, getSelectionCount, getSelectionEmptyState, getSelectionModel, getSortingDirective, getSortingPriority, getTableColumn, getVisibleItemCount, getVisibleItems, indexOf, isColumnVisible, isFiltered, isFiltering, isRefreshing, isRegularExpressionSearch, isSelectionEmpty, isSorting, isVisible, moveSelectionDown, moveSelectionUp, refresh, removeColumnHiddenListener, removeColumnShownListener, removeFilteringListener, removeItem, removeItems, removeRefreshDoneListener, removeRefreshStartedListener, removeSelectedIndexListener, removeSelectionChangedListener, removeSortingListener, removeTableDataChangedListener, selectAll, setColumnVisible, setFilterCriteria, setRegularExpressionSearch, setSelectedItem, setSelectedItemIndex, setSelectedItemIndexes, setSelectedItems, setSortingDirective
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jminor.common.model.FilteredTableModel
addColumnHiddenListener, addColumnShownListener, addRefreshDoneListener, addRefreshStartedListener, addSelectedIndexListener, addSelectedItemIndex, addSelectedItemIndexes, addSelectionChangedListener, addSortingListener, addTableDataChangedListener, clearSelection, clearSortingState, findNextItemCoordinate, findNextItemCoordinate, getColumnIdentifer, getColumnModel, getFilterModel, getHiddenColumns, getItemAt, getMultipleSelectionState, getSelectedIndex, getSelectedIndexes, getSelectedItem, getSelectedItems, getSelectionCount, getSelectionEmptyState, getSelectionModel, getSortingDirective, getSortingPriority, getTableColumn, indexOf, isColumnVisible, isRegularExpressionSearch, isSelectionEmpty, moveSelectionDown, moveSelectionUp, removeColumnHiddenListener, removeColumnShownListener, removeItem, removeItems, removeRefreshDoneListener, removeRefreshStartedListener, removeSelectedIndexListener, removeSelectionChangedListener, removeSortingListener, removeTableDataChangedListener, selectAll, setColumnVisible, setRegularExpressionSearch, setSelectedItem, setSelectedItemIndex, setSelectedItemIndexes, setSelectedItems, setSortingDirective
 
Methods inherited from interface org.jminor.common.model.FilteredModel
addFilteringListener, contains, filterContents, getAllItems, getFilterCriteria, getFilteredItemCount, getFilteredItems, getVisibleItemCount, getVisibleItems, isFiltered, isVisible, removeFilteringListener, setFilterCriteria
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnCount, getColumnName, getRowCount, removeTableModelListener
 
Methods inherited from interface org.jminor.common.model.Refreshable
clear, refresh
 

Constructor Detail

DefaultEntityTableModel

public DefaultEntityTableModel(String entityID,
                               EntityConnectionProvider connectionProvider)
Instantiates a new DefaultEntityTableModel with default column and search models.

Parameters:
entityID - the entity ID
connectionProvider - the db provider

DefaultEntityTableModel

public DefaultEntityTableModel(String entityID,
                               EntityConnectionProvider connectionProvider,
                               EntityTableSearchModel searchModel)
Instantiates a new DefaultEntityTableModel.

Parameters:
entityID - the entity ID
connectionProvider - the db provider
searchModel - the search model
Method Detail

toString

public final String toString()

Overrides:
toString in class Object

setEditModel

public final void setEditModel(EntityEditModel editModel)
Associates the given edit model with this table model, this enables delete/update functionality via this table model as well as enabling it to react to delete events in the edit model. Throws a RuntimeException in case the edit model has been previously set

Specified by:
setEditModel in interface EntityTableModel
Parameters:
editModel - the edit model to associate with this table model
See Also:
EntityTableModel.deleteSelected(), EntityTableModel.update(java.util.List)

hasEditModel

public final boolean hasEditModel()

Specified by:
hasEditModel in interface EntityTableModel
Returns:
true if this table model contains a edit model

getTableColumnProperties

public final List<Property> getTableColumnProperties()

Specified by:
getTableColumnProperties in interface EntityTableModel
Returns:
the underlying table column properties

isQueryConfigurationAllowed

public final boolean isQueryConfigurationAllowed()

Specified by:
isQueryConfigurationAllowed in interface EntityTableModel
Returns:
true if the underlying query should be configurable

setQueryConfigurationAllowed

public final EntityTableModel setQueryConfigurationAllowed(boolean value)
Specifies whether or not the underlying query should be configurable

Specified by:
setQueryConfigurationAllowed in interface EntityTableModel
Parameters:
value - the value
Returns:
this table model instance

getFetchCount

public final int getFetchCount()
Returns the maximum number of records to fetch via the underlying query, by default this returns -1, meaning all records should be fetched

Specified by:
getFetchCount in interface EntityTableModel
Returns:
the fetch count

setFetchCount

public final EntityTableModel setFetchCount(int fetchCount)
Sets the maximum number of records to fetch via the underlying query, a value of -1 means all records should be fetched

Specified by:
setFetchCount in interface EntityTableModel
Parameters:
fetchCount - the fetch count
Returns:
this table model

isDetailModel

public final boolean isDetailModel()

Specified by:
isDetailModel in interface EntityTableModel
Returns:
true if this table model has a master model

setDetailModel

public final EntityTableModel setDetailModel(boolean detailModel)

Specified by:
setDetailModel in interface EntityTableModel
Parameters:
detailModel - if set to true then this table model will not run a query unless a query criteria has been specified
Returns:
this table model instance
See Also:
EntityTableModel.setQueryCriteriaRequired(boolean)

isQueryCriteriaRequired

public final boolean isQueryCriteriaRequired()

Specified by:
isQueryCriteriaRequired in interface EntityTableModel
Returns:
whether to show all underlying entities when no criteria is applied.

setQueryCriteriaRequired

public final EntityTableModel setQueryCriteriaRequired(boolean value)

Specified by:
setQueryCriteriaRequired in interface EntityTableModel
Parameters:
value - if set to true then all underlying entities are shown when no criteria is applied, which can be problematic in the case of huge datasets.
Returns:
this table model instance

getEntityID

public final String getEntityID()

Specified by:
getEntityID in interface EntityDataProvider
Returns:
the ID of the entity this data provider is based on

getSearchModel

public final EntityTableSearchModel getSearchModel()

Specified by:
getSearchModel in interface EntityTableModel
Returns:
the EntityTableSearcher instance used by this table model

getEditModel

public final EntityEditModel getEditModel()
Returns the edit model associated with this table model, throws a RuntimeExcption in case no edit model has been associated with this table model

Specified by:
getEditModel in interface EntityTableModel
Returns:
the edit model associated with this table model
See Also:
EntityTableModel.setEditModel(EntityEditModel)

getConnectionProvider

public final EntityConnectionProvider getConnectionProvider()

Specified by:
getConnectionProvider in interface EntityDataProvider
Returns:
the db provider this data provider uses

isBatchUpdateAllowed

public final boolean isBatchUpdateAllowed()

Specified by:
isBatchUpdateAllowed in interface EntityTableModel
Returns:
true if this model allows multiple entities to be updated at a time

setBatchUpdateAllowed

public final EntityTableModel setBatchUpdateAllowed(boolean batchUpdateAllowed)

Specified by:
setBatchUpdateAllowed in interface EntityTableModel
Parameters:
batchUpdateAllowed - true if this model should allow multiple entities to be updated at a time
Returns:
this EntityTableModel instance

getBatchUpdateAllowedState

public final StateObserver getBatchUpdateAllowedState()

Specified by:
getBatchUpdateAllowedState in interface EntityTableModel
Returns:
the state used to determine if batch updating of entities should be enabled
See Also:
EntityTableModel.isBatchUpdateAllowed()

isDeleteAllowed

public final boolean isDeleteAllowed()

Specified by:
isDeleteAllowed in interface EntityTableModel
Returns:
true if this model allows records to be deleted

isUpdateAllowed

public boolean isUpdateAllowed()

Specified by:
isUpdateAllowed in interface EntityTableModel
Returns:
true if this model allows records to be deleted

isReadOnly

public final boolean isReadOnly()

Specified by:
isReadOnly in interface EntityTableModel
Returns:
true if this model is read only or if no edit model has been specified.
See Also:
EntityTableModel.setEditModel(EntityEditModel)

getReportDataSource

public final ReportDataWrapper getReportDataSource()
Returns an initialized ReportDataWrapper instance, the default implementation returns null.

Specified by:
getReportDataSource in interface EntityTableModel
Returns:
an initialized ReportDataWrapper
See Also:
EntityTableModel.getSelectedEntitiesIterator()

setReportDataSource

public final EntityTableModel setReportDataSource(ReportDataWrapper reportDataSource)
Sets the report data source to use during report generation

Specified by:
setReportDataSource in interface EntityTableModel
Parameters:
reportDataSource - the data source
Returns:
this table model instance

getColumnClass

public final Class<?> getColumnClass(int columnIndex)

Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

getValueAt

public final Object getValueAt(int rowIndex,
                               int columnIndex)

Specified by:
getValueAt in interface TableModel

isCellEditable

public final boolean isCellEditable(int rowIndex,
                                    int columnIndex)

Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel

setValueAt

public final void setValueAt(Object aValue,
                             int rowIndex,
                             int columnIndex)

Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel

getPropertyBackgroundColor

public Color getPropertyBackgroundColor(int row,
                                        Property columnProperty)

Specified by:
getPropertyBackgroundColor in interface EntityTableModel
Parameters:
row - the row for which to retrieve the background color
columnProperty - the column property for which to retrieve the background color
Returns:
the background color for this row and property, specified by the row entity
See Also:
Entity.Definition.setBackgroundColorProvider(org.jminor.framework.domain.Entity.BackgroundColorProvider), EntityTableCellRenderer

getValues

public final Collection<Object> getValues(Property property,
                                          boolean selectedOnly)

Specified by:
getValues in interface EntityTableModel
Parameters:
property - the property for which to retrieve the values
selectedOnly - if true only values from the selected entities are returned
Returns:
the values of property from the entities in the table model

getEntityByPrimaryKey

public final Entity getEntityByPrimaryKey(Entity.Key primaryKey)

Specified by:
getEntityByPrimaryKey in interface EntityTableModel
Parameters:
primaryKey - the primary key to search by
Returns:
the entity with the given primary key from the table model, null if it's not found

indexOf

public final int indexOf(Entity.Key primaryKey)

Specified by:
indexOf in interface EntityTableModel
Parameters:
primaryKey - the primary key
Returns:
the row index of the entity with the given primary key, -1 if not found

getStatusMessage

public final String getStatusMessage()

Specified by:
getStatusMessage in interface EntityTableModel
Returns:
a String describing the selected/filtered state of this table model

addEntitiesByPrimaryKeys

public final void addEntitiesByPrimaryKeys(List<Entity.Key> primaryKeys,
                                           boolean atFront)
Retrieves the entities identified by the given primary keys and adds them to this table model

Specified by:
addEntitiesByPrimaryKeys in interface EntityTableModel
Parameters:
primaryKeys - the primary keys
atFront - if true the entities are added to the front

replaceEntities

public final void replaceEntities(Collection<Entity> entities)
Replaces the given entities in this table model

Specified by:
replaceEntities in interface EntityTableModel
Parameters:
entities - the entities to replace

setForeignKeySearchValues

public void setForeignKeySearchValues(String referencedEntityID,
                                      List<Entity> referenceEntities)
Refreshes this table model according the the given values by finding the first foreign key property referencing the entity identified by referencedEntityID and setting referenceEntities as the criteria values. If no foreign key property is found this method has no effect.

Specified by:
setForeignKeySearchValues in interface EntityTableModel
Parameters:
referencedEntityID - the ID of the master entity
referenceEntities - the entities to use as criteria values
See Also:
EntityTableModel.isDetailModel()

replaceForeignKeyValues

public final void replaceForeignKeyValues(String foreignKeyEntityID,
                                          Collection<Entity> newForeignKeyValues)
For every entity in this table model, replaces the foreign key instance bearing the primary key with the corresponding entity from foreignKeyValues, useful when property values have been changed in the referenced entity that must be reflected in the table model.

Specified by:
replaceForeignKeyValues in interface EntityTableModel
Parameters:
foreignKeyEntityID - the entity ID of the foreign key values
newForeignKeyValues - the foreign key entities

getPrimaryKeysOfSelectedEntities

public final List<Entity.Key> getPrimaryKeysOfSelectedEntities()

Specified by:
getPrimaryKeysOfSelectedEntities in interface EntityTableModel
Returns:
a list containing the primary keys of the selected entities, if none are selected an empty list is returned

setSelectedByPrimaryKeys

public final void setSelectedByPrimaryKeys(List<Entity.Key> keys)
Sets the selected entities according to the primary keys in primaryKeys

Specified by:
setSelectedByPrimaryKeys in interface EntityTableModel
Parameters:
keys - the primary keys of the entities to select

getEntitiesByPrimaryKeys

public final List<Entity> getEntitiesByPrimaryKeys(List<Entity.Key> keys)
Finds entities according to the values in keys

Specified by:
getEntitiesByPrimaryKeys in interface EntityTableModel
Parameters:
keys - the primary key values to use as condition
Returns:
the entities having the primary key values as in keys

getEntitiesByPropertyValues

public final Collection<Entity> getEntitiesByPropertyValues(Map<String,Object> values)
Finds entities according to the values of propertyValues

Specified by:
getEntitiesByPropertyValues in interface EntityTableModel
Parameters:
values - the property values to use as condition mapped to their respective propertyIDs
Returns:
the entities having the exact same property values as in properties

deleteSelected

public final void deleteSelected()
                          throws CancelException,
                                 DatabaseException
Deletes the selected entities

Specified by:
deleteSelected in interface EntityTableModel
Throws:
CancelException - in case the user cancels the operation
DatabaseException - in case of a database exception

update

public final void update(List<Entity> entities)
                  throws CancelException,
                         ValidationException,
                         DatabaseException
Updates the given Entities. If the entities are unmodified or the list is empty this method returns silently.

Specified by:
update in interface EntityTableModel
Parameters:
entities - the Entities to update
Throws:
CancelException - in case the user cancels the operation
ValidationException - in case validation fails
DatabaseException - in case of a database exception
RecordModifiedException - in case an entity was modified by another user
See Also:
Entity.Validator.validate(java.util.Collection, int)

getSelectionDependencies

public final Map<String,Collection<Entity>> getSelectionDependencies()

Specified by:
getSelectionDependencies in interface EntityTableModel
Returns:
a Map containing all entities which depend on the selected entities, where the keys are entityIDs and the value is an array of entities of that type

getPropertySummaryModel

public final PropertySummaryModel getPropertySummaryModel(String propertyID)
Returns the PropertySummaryModel associated with the property identified by propertyID

Specified by:
getPropertySummaryModel in interface EntityTableModel
Parameters:
propertyID - the ID of the property
Returns:
the PropertySummaryModel for the given property ID

getPropertySummaryModel

public final PropertySummaryModel getPropertySummaryModel(Property property)
Returns the PropertySummaryModel associated with the given property

Specified by:
getPropertySummaryModel in interface EntityTableModel
Parameters:
property - the property
Returns:
the PropertySummaryModel for the given property

getSelectedEntitiesIterator

public final Iterator<Entity> getSelectedEntitiesIterator()
Returns an Iterator which iterates through the selected entities

Specified by:
getSelectedEntitiesIterator in interface EntityTableModel
Returns:
the iterator used when generating reports
See Also:
EntityTableModel.getReportDataSource()

getSortingDirective

public final SortingDirective getSortingDirective(String propertyID)

Specified by:
getSortingDirective in interface EntityTableModel
Parameters:
propertyID - the propertyID
Returns:
the sorting directive assigned to the given property column

setSortingDirective

public final void setSortingDirective(String propertyID,
                                      SortingDirective directive,
                                      boolean addColumnToSort)

Specified by:
setSortingDirective in interface EntityTableModel
Parameters:
propertyID - the propertyID
directive - the sorting directive
addColumnToSort - if false then the sorting state is cleared, otherwise this column is added to the sorted column set according to getSortingPriority()

doRefresh

protected final void doRefresh()
Refreshes the data in this table model.

Specified by:
doRefresh in class AbstractFilteredTableModel<Entity,Property>

performQuery

protected List<Entity> performQuery(Criteria<Property.ColumnProperty> criteria)
Queries for the data used to populate this EntityTableModel when it is refreshed

Parameters:
criteria - a criteria
Returns:
entities selected from the database according the the query criteria.
See Also:
getQueryCriteria()

getColumnClass

protected final Class getColumnClass(Property columnIdentifier)

Overrides:
getColumnClass in class AbstractFilteredTableModel<Entity,Property>
Parameters:
columnIdentifier - the column identifier
Returns:
the column Class

getComparable

protected final Comparable getComparable(Object object,
                                         Property columnIdentifier)

Overrides:
getComparable in class AbstractFilteredTableModel<Entity,Property>
Parameters:
object - the value
columnIdentifier - the column identifier
Returns:
a Comparable for the given value and column index

getSearchValueAt

protected final String getSearchValueAt(int rowIndex,
                                        Property columnIdentifier)
Returns the value to use when searching through the table.

Overrides:
getSearchValueAt in class AbstractFilteredTableModel<Entity,Property>
Parameters:
rowIndex - the row index
columnIdentifier - the column identifier
Returns:
the search value

getQueryCriteria

protected final Criteria<Property.ColumnProperty> getQueryCriteria()
Returns:
a Criteria object used to filter the result when this table models data is queried, this implementation returns the result retrieved via the getSearchCriteria() method found in the underlying EntityTableSearchModel
See Also:
EntityTableSearchModel.getSearchCriteria()

handleDelete

protected void handleDelete(DeleteEvent event)