JIDE 3.5.15

com.jidesoft.database
Class CrudTableModelAdapter

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.jidesoft.grid.TableModelWrapperImpl
          extended by com.jidesoft.database.CrudTableModelAdapter
All Implemented Interfaces:
CrudRowOperations, CrudTableModel, ColumnIdentifierTableModel, ContextSensitiveTableModel, EditorStyleTableModel, IndexChangeEventGenerator, MultiTableModel, NavigableModel, SpanModel, StyleModel, TableModelWrapper, Serializable, EventListener, TableModelListener, TableModel

public class CrudTableModelAdapter
extends TableModelWrapperImpl
implements CrudTableModel

An adapter class for the interface CrudTableModel for easy implementation.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jidesoft.grid.TableModelWrapperImpl
_model
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Fields inherited from interface com.jidesoft.grid.MultiTableModel
FOOTER_COLUMN, HEADER_COLUMN, REGULAR_COLUMN
 
Fields inherited from interface com.jidesoft.grid.EditorStyleTableModel
EDITOR_STYLE_EDITABLE, EDITOR_STYLE_NORMAL, EDITOR_STYLE_READ_ONLY, EDITOR_STYLE_SELECT_ONLY
 
Constructor Summary
CrudTableModelAdapter(TableModel tableModel)
           
CrudTableModelAdapter(TableModel tableModel, CrudRowOperations crudOperations)
           
 
Method Summary
 void deleteRow(int rowIndex)
          Delete data of a designated row.
 void insertRow(Record record)
          Add a row to the table model.
 Record readRow(int rowIndex)
          Read data of a designated row.
 void updateRow(int rowIndex, Record record)
          Update data of a designated row with data.
 
Methods inherited from class com.jidesoft.grid.TableModelWrapperImpl
addIndexChangeListener, createCompoundTableModelEvent, fireIndexChanged, fireIndexChanging, fireTableCellsUpdated, fireTableChanged, getActualModel, getCellClassAt, getCellSpanAt, getCellStyleAt, getColumnClass, getColumnCount, getColumnIdentifier, getColumnName, getColumnType, getConverterContextAt, getEditorContextAt, getEditorStyleAt, getIndexChangeListeners, getRowCount, getTableIndex, getValueAt, isCellEditable, isCellSpanOn, isCellStyleOn, isNavigableAt, isNavigationOn, removeIndexChangeListener, setValueAt, tableCellsUpdated, tableChanged, tableDataChanged, 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, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
 

Constructor Detail

CrudTableModelAdapter

public CrudTableModelAdapter(TableModel tableModel)

CrudTableModelAdapter

public CrudTableModelAdapter(TableModel tableModel,
                             CrudRowOperations crudOperations)
Method Detail

insertRow

public void insertRow(Record record)
               throws Exception
Description copied from interface: CrudRowOperations
Add a row to the table model.

Specified by:
insertRow in interface CrudRowOperations
Parameters:
record - the data structure
Throws:
Exception - if encouting any database update error

readRow

public Record readRow(int rowIndex)
               throws Exception
Description copied from interface: CrudRowOperations
Read data of a designated row.

Specified by:
readRow in interface CrudRowOperations
Parameters:
rowIndex - the row index
Returns:
the data structure
Throws:
Exception - if encouting any database read error

updateRow

public void updateRow(int rowIndex,
                      Record record)
               throws Exception
Description copied from interface: CrudRowOperations
Update data of a designated row with data.

Specified by:
updateRow in interface CrudRowOperations
Parameters:
rowIndex - the row index
record - the data array
Throws:
Exception - if encouting any database update error

deleteRow

public void deleteRow(int rowIndex)
               throws Exception
Description copied from interface: CrudRowOperations
Delete data of a designated row.

Specified by:
deleteRow in interface CrudRowOperations
Parameters:
rowIndex - the row index
Throws:
Exception - if encouting any database update error.

JIDE 3.5.15