Class 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 Detail

      • EntityTab

        public EntityTab()
    • 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.

        Specified by:
        search in interface ISearch
        Parameters:
        condition - Condition to use in search.
        key - Key to send to search
        Throws:
        javax.ejb.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 javax.ejb.FinderException,
                                           java.rmi.RemoteException
        Return a map with key values.
        Specified by:
        findEntity in interface IEntityTabImpl
        Throws:
        javax.ejb.FinderException
        java.rmi.RemoteException
      • 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)
      • setChunkSize

        public void setChunkSize​(int chunkSize)