org.openxava.tab.impl
Class EntityTab

java.lang.Object
  extended by 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

Constructor Summary
EntityTab()
           
 
Method Summary
 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 call IDataReader.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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityTab

public EntityTab()
Method Detail

usesConverters

public boolean usesConverters()

search

public void search(java.lang.String condition,
                   java.lang.Object key)
            throws 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.

Specified by:
search in interface ISearch
Parameters:
condition - Condition to use in search.
key - Key to send to search
Throws:
FinderException - Any logic problem on search
java.rmi.RemoteException - Any system problem on search

findEntity

public java.lang.Object findEntity(java.lang.Object[] key)
                            throws FinderException,
                                   java.rmi.RemoteException
Return a map with key values.

Specified by:
findEntity in interface IEntityTabImpl
Throws:
FinderException
java.rmi.RemoteException

getTable

public IXTableModel getTable()
                      throws java.rmi.RemoteException
Specified by:
getTable in interface IWithXTableModel
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 interface IDataReader
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 interface IDataReader
Throws:
java.rmi.RemoteException

getSum

public java.lang.Number getSum(java.lang.String property)
                        throws java.rmi.RemoteException
Specified by:
getSum in interface IEntityTabImpl
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 call IDataReader.nextChunk() you will obtain the first chunk and fresh data from db.

Specified by:
reset in interface IDataReader
Throws:
java.rmi.RemoteException

getMetaTab

public MetaTab getMetaTab()

setMetaTab

public void setMetaTab(MetaTab tab)

getChunkSize

public int getChunkSize()

setChunkSize

public void setChunkSize(int chunkSize)