public class DBRecordTableModel<C extends ApplicationContext,T extends DBRecord> extends AbstractObjectTableModel<T> implements ApplicationObject<C>
DBRecordTable
,
Serialized FormConstructor and Description |
---|
DBRecordTableModel(C ctx,
T masterRec)
This TableModel allows only the given type of DBRecord to be added.
|
Modifier and Type | Method and Description |
---|---|
void |
addRecord(int index,
T dbo)
Places the given DBRecord at the specified index into the TableModel only.
|
int |
addRecord(T dbo)
Adds the given DBRecord to the TableModel only.
|
void |
addRecords(T[] records) |
void |
clear()
Clears the content
|
de.esprit.appsuite.database.dbgui.table.DBRecordTableModel.MyAsyncLoadAction |
getActionLoadAsync() |
C |
getApplicationContext() |
T |
getMasterRecord() |
DBRecord |
getParentRecord() |
T |
getRecord(int index)
Returns the DBRecord at the given index.
|
T |
getRecord(java.lang.String dboId)
Returns the DBRecord at the given index.
|
int |
indexOf(java.lang.String dboId)
Finds the index of the DBRecord which has the given primary key value.
|
int |
indexOf(T dbo)
Finds the index of the DBRecord stored in column 0 of the TableModel.
|
boolean |
isFieldVisible(java.lang.String fieldName)
Is supposed to be overridden by subclasses in order to make particular
fields invisible.
|
void |
load()
Loads the table with all available records.
|
void |
load(SqlCondition condition)
Loads the table with all records
that match the given
SqlCondition . |
void |
load(SqlCondition condition,
SqlOrder order)
Loads the table the given
SqlCondition
and SqlOrder . |
int |
removeRecord(T dbo)
Performs a database request in order to delete the dbobject and - if successful -
removes the record from the TableModel.
|
boolean |
replaceRecord(T dbo) |
void |
search(SqlCondition condition,
SqlOrder order)
Loads the table content by performing a join on all involved tables
if the the managed DBRecord is a ComposedRecord.
|
void |
setParentRecord(DBRecord parentRec) |
void |
setRecord(int index,
T dbo)
Places the given DBRecord at the specified index into the TableModel only.
|
addColumn, addColumn, addColumn, addColumn, addDataLoadListener, addObject, addObject, addObjects, addObjects, addOrderChangeListener, addRowData, addRowData, clearRowData, containsObject, dropRow, dropRow, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, getAllObjects, getColumnCount, getColumnName, getComparator, getObject, getRowCount, getValueAt, getValueAt, indexOf, isEmpty, isNumb, isSortAscending, removeColumn, removeDataLoadListener, removeObject, removeObject, removeOrderChangeListener, removeRowData, replaceObject, setComparator, setNumb, setObject, setSortAscending, setValueAt
public final C getApplicationContext()
getApplicationContext
in interface ApplicationObject<C extends ApplicationContext>
public DBRecord getParentRecord()
public void setParentRecord(DBRecord parentRec)
public de.esprit.appsuite.database.dbgui.table.DBRecordTableModel.MyAsyncLoadAction getActionLoadAsync()
public T getMasterRecord()
public void clear()
Clearable
public void load() throws java.lang.Exception
load
in class AbstractObjectTableModel<T extends DBRecord>
java.lang.Exception
public void load(SqlCondition condition) throws java.lang.Exception
SqlCondition
.java.lang.Exception
public void load(SqlCondition condition, SqlOrder order) throws java.lang.Exception
SqlCondition
and SqlOrder
.
Note that if the the DBRecord is a ComposedRecord
then the condition must only
contain fields of the bottom subclass.java.lang.Exception
search(SqlCondition, SqlOrder)
public void addRecords(T[] records)
public void search(SqlCondition condition, SqlOrder order) throws java.lang.Exception
This call is identical to load() if the managed DBRecord is a DBObject.
java.lang.Exception
load(SqlCondition, SqlOrder)
public int indexOf(T dbo)
public int indexOf(java.lang.String dboId)
public T getRecord(java.lang.String dboId)
public T getRecord(int index)
public int removeRecord(T dbo)
public boolean replaceRecord(T dbo)
public void setRecord(int index, T dbo)
public int addRecord(T dbo)
public void addRecord(int index, T dbo)
public boolean isFieldVisible(java.lang.String fieldName)
fieldName
- Name of the field in the format table.columnCopyright © 2014 EsprIT-Systems. All Rights Reserved.