com.jidesoft.database
Class BatchedCrudTableModelWrapper
java.lang.Object
javax.swing.table.AbstractTableModel
com.jidesoft.grid.TableModelWrapperImpl
com.jidesoft.database.BatchedCrudTableModelWrapper
- All Implemented Interfaces:
- BatchedOperations, CrudRowOperations, CrudTableModel, ColumnIdentifierTableModel, ContextSensitiveTableModel, EditorStyleTableModel, IndexChangeEventGenerator, MultiTableModel, NavigableModel, SpanModel, StyleModel, TableModelWrapper, Serializable, EventListener, TableModelListener, TableModel
public class BatchedCrudTableModelWrapper
- extends TableModelWrapperImpl
- implements CrudTableModel, TableModelWrapper, BatchedOperations
- See Also:
- Serialized Form
Field Summary |
protected com.jidesoft.database.TableModelCache |
_cache
|
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, getTableIndex, isCellEditable, isCellSpanOn, isCellStyleOn, isNavigableAt, isNavigationOn, removeIndexChangeListener, 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 |
_cache
protected com.jidesoft.database.TableModelCache _cache
BatchedCrudTableModelWrapper
public BatchedCrudTableModelWrapper(TableModel model)
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interface TableModel
- Overrides:
getRowCount
in class TableModelWrapperImpl
getValueAt
public Object getValueAt(int rowIndex,
int columnIndex)
- Specified by:
getValueAt
in interface TableModel
- Overrides:
getValueAt
in class TableModelWrapperImpl
setValueAt
public void setValueAt(Object aValue,
int rowIndex,
int columnIndex)
- Specified by:
setValueAt
in interface TableModel
- Overrides:
setValueAt
in class TableModelWrapperImpl
rollback
public void rollback()
- Description copied from interface:
BatchedOperations
- Go back to the initial state
- Specified by:
rollback
in interface BatchedOperations
getActualIndexAt
protected int getActualIndexAt(int row)
resetState
protected void resetState()
commit
public void commit()
throws Exception
- Description copied from interface:
BatchedOperations
- Push changes
- Specified by:
commit
in interface BatchedOperations
- Throws:
Exception
insertRow
public void insertRow(Record record)
throws Exception
- CrudTableModel interface implementation
- 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
createRowRecord
protected Record createRowRecord()
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 indexrecord
- 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.
setAutoCommit
public void setAutoCommit(boolean autoCommit)
- Description copied from interface:
BatchedOperations
- Establish if the changes are immediate or belong to a transaction
- Specified by:
setAutoCommit
in interface BatchedOperations
isAutoCommit
public boolean isAutoCommit()
- Description copied from interface:
BatchedOperations
- Return the commit mode
- Specified by:
isAutoCommit
in interface BatchedOperations
- Returns: