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 int
DEFAULT_CHUNK_SIZE
-
Constructor Summary
Constructors Constructor Description EntityTab()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
findEntity(java.lang.Object[] key)
Return a map with key values.int
getChunkSize()
java.lang.String
getComponentName()
MetaTab
getMetaTab()
int
getResultSize()
Record (or object, or row) count of last consult.java.lang.Number
getSum(java.lang.String property)
IXTableModel
getTable()
java.lang.String
getTabName()
void
init()
DataChunk
nextChunk()
Obtain the next data chunk.void
reset()
If you call this method the next time that you callIDataReader.nextChunk()
you will obtain the first chunk and fresh data from db.void
search(java.lang.String condition, java.lang.Object key)
Execute search.void
setChunkSize(int chunkSize)
void
setComponentName(java.lang.String string)
void
setMetaTab(MetaTab tab)
void
setTabName(java.lang.String string)
boolean
usesConverters()
-
-
-
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.RemoteException
Description copied from interface:ISearch
Execute 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.RemoteException
Return a map with key values.- Specified by:
findEntity
in interfaceIEntityTabImpl
- Throws:
javax.ejb.FinderException
java.rmi.RemoteException
-
getTable
public IXTableModel getTable() throws java.rmi.RemoteException
- Specified by:
getTable
in 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:IDataReader
Obtain the next data chunk.This method can be call from a
TableModel
to obtain data on demand.- Specified by:
nextChunk
in 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.RemoteException
Description copied from interface:IDataReader
Record (or object, or row) count of last consult.- Specified by:
getResultSize
in interfaceIDataReader
- Throws:
java.rmi.RemoteException
-
getSum
public java.lang.Number getSum(java.lang.String property) throws java.rmi.RemoteException
- Specified by:
getSum
in interfaceIEntityTabImpl
- Throws:
java.rmi.RemoteException
-
reset
public void reset() throws java.rmi.RemoteException
Description copied from interface:IDataReader
If you call this method the next time that you callIDataReader.nextChunk()
you will obtain the first chunk and fresh data from db.- Specified by:
reset
in interfaceIDataReader
- Throws:
java.rmi.RemoteException
-
getMetaTab
public MetaTab getMetaTab()
-
setMetaTab
public void setMetaTab(MetaTab tab)
-
getChunkSize
public int getChunkSize()
- Specified by:
getChunkSize
in interfaceIEntityTabImpl
-
setChunkSize
public void setChunkSize(int chunkSize)
-
-