org.openxava.tab.impl
Class EntityTab

java.lang.Object
  extended by org.openxava.tab.impl.EntityTab
All Implemented Interfaces:
java.io.Serializable, IEntityTab, IEntityTabImpl, ISearch, ITabProvider, IWithXTableModel

public class EntityTab
extends java.lang.Object
implements IEntityTabImpl, java.io.Serializable

Local Tab (IEntityTabImpl) implementation configured from an OpenXava component.

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 ITabProvider.nextChunk() you will obtain the first chunk and fresh data from db.
 void search(int index, java.lang.Object key)
          Execute the search.
 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)
           
 
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

search

public void search(int index,
                   java.lang.Object key)
            throws FinderException,
                   java.rmi.RemoteException
Description copied from interface: ISearch
Execute the search.

If there are no object then generate a empty result, but does not throw a exception.

Specified by:
search in interface ISearch
Parameters:
index - Index of serach to execute
key - Key to send to search
Throws:
FinderException - Any logic problem on search
java.rmi.RemoteException - Any system problem on search

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: ITabProvider
Obtain the next data chunk.

This method can be call from a TableModel to obtain data on demand.

Specified by:
nextChunk in interface ITabProvider
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: ITabProvider
Record (or object, or row) count of last consult.

Specified by:
getResultSize in interface ITabProvider
Throws:
java.rmi.RemoteException

getSum

public java.lang.Number getSum(java.lang.String property)
                        throws java.rmi.RemoteException
Specified by:
getSum in interface IEntityTabImpl
Specified by:
getSum in interface ITabProvider
Throws:
java.rmi.RemoteException

reset

public void reset()
           throws java.rmi.RemoteException
Description copied from interface: ITabProvider
If you call this method the next time that you call ITabProvider.nextChunk() you will obtain the first chunk and fresh data from db.

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

getMetaTab

public MetaTab getMetaTab()

setMetaTab

public void setMetaTab(MetaTab tab)

getChunkSize

public int getChunkSize()

setChunkSize

public void setChunkSize(int chunkSize)