Class TableModelBean

    • Constructor Detail

      • TableModelBean

        public TableModelBean()
    • Method Detail

      • addTableModelListener

        public void addTableModelListener​(javax.swing.event.TableModelListener l)
        Specified by:
        addTableModelListener in interface javax.swing.table.TableModel
      • getHeading

        public java.lang.String[] getHeading()
      • getColumnsClasses

        public java.lang.String[] getColumnsClasses()
      • getColumnClass

        public java.lang.Class getColumnClass​(int columnIndex)
        Specified by:
        getColumnClass in interface javax.swing.table.TableModel
      • getColumnCount

        public int getColumnCount()
        Specified by:
        getColumnCount in interface javax.swing.table.TableModel
      • getColumnName

        public java.lang.String getColumnName​(int columnIndex)
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
      • getPKIndexes

        public int[] getPKIndexes()
        Indexes of columns that contains the primary key.
        Primary key is used for create the object associated to row.
      • getObjectAt

        public java.lang.Object getObjectAt​(int rowIndex)
                                     throws javax.ejb.FinderException
        Description copied from interface: IObjectTableModel
        Return the object associated to indicated row.
        Specified by:
        getObjectAt in interface IObjectTableModel
        Specified by:
        getObjectAt in interface IXTableModel
        Throws:
        javax.ejb.FinderException
      • getRowCount

        public int getRowCount()
        Specified by:
        getRowCount in interface javax.swing.table.TableModel
      • getValueAt

        public java.lang.Object getValueAt​(int rowIndex,
                                           int columnIndex)
                                    throws java.util.NoSuchElementException
        Specified by:
        getValueAt in interface javax.swing.table.TableModel
        Throws:
        java.util.NoSuchElementException
      • invariant

        public void invariant()
                       throws java.lang.IllegalStateException
        Verify object invariant.
        Invariant:
        • headers != null
        • entityTab != null
        • indexesPK != null
        Throws:
        java.lang.IllegalStateException - If invariant is broken
      • isCellEditable

        public boolean isCellEditable​(int rowIndex,
                                      int columnIndex)
        Specified by:
        isCellEditable in interface javax.swing.table.TableModel
      • removeTableModelListener

        public void removeTableModelListener​(javax.swing.event.TableModelListener l)
        Specified by:
        removeTableModelListener in interface javax.swing.table.TableModel
      • setHeading

        public void setHeading​(java.lang.String[] heading)
      • setColumnsClasses

        public void setColumnsClasses​(java.lang.String[] columnsClasses)
      • setEntityTab

        public void setEntityTab​(IEntityTabImpl entityTab)
      • setPKIndexes

        public void setPKIndexes​(int[] indicesPK)
        Indexes of columns that contains the primary key.
        Primary key is used for create the object associated to row.
      • setValueAt

        public void setValueAt​(java.lang.Object aValue,
                               int rowIndex,
                               int columnIndex)
        Specified by:
        setValueAt in interface javax.swing.table.TableModel
      • toString

        public java.lang.String toString()
        Return TablaModelBean> Rows: x, Columns: x.
        Overrides:
        toString in class java.lang.Object
      • getTotalSize

        public int getTotalSize()
                         throws java.rmi.RemoteException
        Description copied from interface: IXTableModel
        Total count of objects represented by this table model.

        Cantidad de objetos total representados por el table model.

        getRowCount() in another side, return the loaded objects count, not total.

        Specified by:
        getTotalSize in interface IXTableModel
        Throws:
        java.rmi.RemoteException
      • getSum

        public java.lang.Number getSum​(java.lang.String property)
                                throws java.rmi.RemoteException
        Specified by:
        getSum in interface IXTableModel
        Throws:
        java.rmi.RemoteException
      • isTranslateHeading

        public boolean isTranslateHeading()
        If true tries to translate the heading.

        If a dot is found in heading label assume resourceFile.nombreId.
        For example, if the label is MyAplicationResources.plazo then find in MyAplicationResources resource bundle the identifier plazo.
        If no dot the take the label as is.
        Of course, if this properti is false do nothing.
        By default is true

      • setTranslateHeading

        public void setTranslateHeading​(boolean b)
      • setPropertiesNames

        public void setPropertiesNames​(java.util.List propertiesNames)
      • getPropertiesNames

        public java.util.List getPropertiesNames()
      • removeRow

        public void removeRow​(java.util.Map keyValues)
                       throws javax.ejb.FinderException
        Specified by:
        removeRow in interface IXTableModel
        Throws:
        javax.ejb.FinderException