Package org.openxava.tab.impl
Class EntityTab
- java.lang.Object
-
- org.openxava.tab.impl.EntityTab
-
- All Implemented Interfaces:
java.io.Serializable,IDataReader,IEntityTabImpl,ISearch,IWithXTableModel
public class EntityTab extends java.lang.Object implements IEntityTabImpl, java.io.Serializable
Provides a TableModel for reading tabular data of an entity.This tab is valid for all components, you only need to indicate the model name on create.
- Author:
- Javier Paniza
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CHUNK_SIZE
-
Constructor Summary
Constructors Constructor Description EntityTab()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectfindEntity(java.lang.Object[] key)Return a map with key values.intgetChunkSize()java.lang.StringgetComponentName()MetaTabgetMetaTab()intgetResultSize()Record (or object, or row) count of last consult.java.lang.NumbergetSum(java.lang.String property)IXTableModelgetTable()java.lang.StringgetTabName()voidinit()DataChunknextChunk()Obtain the next data chunk.voidreset()If you call this method the next time that you callIDataReader.nextChunk()you will obtain the first chunk and fresh data from db.voidsearch(java.lang.String condition, java.lang.Object key)Execute search.voidsetChunkSize(int chunkSize)voidsetComponentName(java.lang.String string)voidsetMetaTab(MetaTab tab)voidsetTabName(java.lang.String string)booleanusesConverters()
-
-
-
Field Detail
-
DEFAULT_CHUNK_SIZE
public static final int DEFAULT_CHUNK_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
usesConverters
public boolean usesConverters()
-
search
public void search(java.lang.String condition, java.lang.Object key) throws javax.ejb.FinderException, java.rmi.RemoteExceptionDescription copied from interface:ISearchExecute search.If there are no object then generate a empty result, but does not throw a exception.
-
findEntity
public java.lang.Object findEntity(java.lang.Object[] key) throws javax.ejb.FinderException, java.rmi.RemoteExceptionReturn a map with key values.- Specified by:
findEntityin interfaceIEntityTabImpl- Throws:
javax.ejb.FinderExceptionjava.rmi.RemoteException
-
getTable
public IXTableModel getTable() throws java.rmi.RemoteException
- Specified by:
getTablein interfaceIWithXTableModel- Throws:
java.rmi.RemoteException
-
init
public void init() throws InitException- Throws:
InitException
-
nextChunk
public DataChunk nextChunk() throws java.rmi.RemoteException
Description copied from interface:IDataReaderObtain the next data chunk.This method can be call from a
TableModelto obtain data on demand.- Specified by:
nextChunkin interfaceIDataReader- Throws:
java.rmi.RemoteException
-
getComponentName
public java.lang.String getComponentName()
-
getTabName
public java.lang.String getTabName()
-
setComponentName
public void setComponentName(java.lang.String string)
-
setTabName
public void setTabName(java.lang.String string)
-
getResultSize
public int getResultSize() throws java.rmi.RemoteExceptionDescription copied from interface:IDataReaderRecord (or object, or row) count of last consult.- Specified by:
getResultSizein interfaceIDataReader- Throws:
java.rmi.RemoteException
-
getSum
public java.lang.Number getSum(java.lang.String property) throws java.rmi.RemoteException- Specified by:
getSumin interfaceIEntityTabImpl- Throws:
java.rmi.RemoteException
-
reset
public void reset() throws java.rmi.RemoteExceptionDescription copied from interface:IDataReaderIf you call this method the next time that you callIDataReader.nextChunk()you will obtain the first chunk and fresh data from db.- Specified by:
resetin interfaceIDataReader- Throws:
java.rmi.RemoteException
-
getMetaTab
public MetaTab getMetaTab()
-
setMetaTab
public void setMetaTab(MetaTab tab)
-
getChunkSize
public int getChunkSize()
- Specified by:
getChunkSizein interfaceIEntityTabImpl
-
setChunkSize
public void setChunkSize(int chunkSize)
-
-