Package org.openxava.tab.impl
Class TableModelBean
java.lang.Object
org.openxava.tab.impl.TableModelBean
- All Implemented Interfaces:
Serializable,TableModel,IObjectTableModel,IRefreshTableModel,IXTableModel
IXTableModel implementation in JavaBean format.
It's a read only TableModel.
Call to invariant() before use.
- Author:
- Javier Paniza
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidintgetColumnClass(int columnIndex) intgetColumnName(int columnIndex) String[]String[]getObjectAt(int rowIndex) Return the object associated to indicated row.int[]Indexes of columns that contains the primary key.intintTotal count of objects represented by this table model.getValueAt(int rowIndex, int columnIndex) voidVerify object invariant.booleanbooleanisCellEditable(int rowIndex, int columnIndex) booleanIf true tries to translate the heading.voidrefresh()Refresh data from datasource.voidvoidvoidvoidsetColumnsClasses(String[] columnsClasses) voidsetEntityTab(IEntityTabImpl entityTab) voidsetHeading(String[] heading) voidsetPKIndexes(int[] indicesPK) Indexes of columns that contains the primary key.voidsetPropertiesNames(List propertiesNames) voidsetTranslateHeading(boolean b) voidsetValueAt(Object aValue, int rowIndex, int columnIndex) toString()Return TablaModelBean> Rows: x, Columns: x.
-
Constructor Details
-
TableModelBean
public TableModelBean()
-
-
Method Details
-
addTableModelListener
- Specified by:
addTableModelListenerin interfaceTableModel
-
getHeading
-
getColumnsClasses
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCountin interfaceTableModel
-
getColumnName
- Specified by:
getColumnNamein interfaceTableModel
-
getEntityTab
-
getPKIndexes
public int[] getPKIndexes()Indexes of columns that contains the primary key.
Primary key is used for create the object associated to row. -
getObjectAt
Description copied from interface:IObjectTableModelReturn the object associated to indicated row.- Specified by:
getObjectAtin interfaceIObjectTableModel- Specified by:
getObjectAtin interfaceIXTableModel- Throws:
javax.ejb.FinderException
-
getRowCount
public int getRowCount()- Specified by:
getRowCountin interfaceTableModel
-
getValueAt
- Specified by:
getValueAtin interfaceTableModel- Throws:
NoSuchElementException
-
invariant
Verify object invariant.
Invariant:- headers != null
- entityTab != null
- indexesPK != null
- Throws:
IllegalStateException- If invariant is broken
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex) - Specified by:
isCellEditablein interfaceTableModel
-
refresh
public void refresh()Description copied from interface:IRefreshTableModelRefresh data from datasource.- Specified by:
refreshin interfaceIRefreshTableModel- Specified by:
refreshin interfaceIXTableModel
-
removeAllRows
public void removeAllRows()- Specified by:
removeAllRowsin interfaceIXTableModel
-
removeTableModelListener
- Specified by:
removeTableModelListenerin interfaceTableModel
-
setHeading
-
setColumnsClasses
-
setEntityTab
-
setPKIndexes
public void setPKIndexes(int[] indicesPK) Indexes of columns that contains the primary key.
Primary key is used for create the object associated to row. -
setValueAt
- Specified by:
setValueAtin interfaceTableModel
-
toString
Return TablaModelBean> Rows: x, Columns: x. -
getTotalSize
Description copied from interface:IXTableModelTotal count of objects represented by this table model.Cantidad de objetos total representados por el table model.
getRowCount()in another side, return the loaded objects count, not total.- Specified by:
getTotalSizein interfaceIXTableModel- Throws:
RemoteException
-
getSum
- Specified by:
getSumin interfaceIXTableModel- Throws:
RemoteException
-
isTranslateHeading
public boolean isTranslateHeading()If true tries to translate the heading.If a dot is found in heading label assume resourceFile.nombreId.
For example, if the label is MyAplicationResources.plazo then find in MyAplicationResources resource bundle the identifier plazo.
If no dot the take the label as is.
Of course, if this properti is false do nothing.
By default is true -
setTranslateHeading
public void setTranslateHeading(boolean b) -
setPropertiesNames
-
getPropertiesNames
-
removeRow
- Specified by:
removeRowin interfaceIXTableModel- Throws:
javax.ejb.FinderException
-
getChunkSize
public int getChunkSize()- Specified by:
getChunkSizein interfaceIXTableModel- Since:
- 5.7
-
isAllLoaded
public boolean isAllLoaded()- Specified by:
isAllLoadedin interfaceIXTableModel- Since:
- 5.7
-