Class PPayinfoTableModel

java.lang.Object
javax.swing.table.AbstractTableModel
com.portal.app.cc.PPayinfoTableModel
All Implemented Interfaces:
Serializable, TableModel

public class PPayinfoTableModel extends AbstractTableModel
This is the table model commonly used for payment page, Move into Hierarchy invalid input: '&' View Bill Unit Hierarchy This page has the dynamism to populate appropriate fields as per creation of model
Author:
Ramaprasad,Savitha T.M
See Also:
  • Constructor Details

    • PPayinfoTableModel

      public PPayinfoTableModel(String[] columnNames, Class[] colTypes, int pageType)
  • Method Details

    • setPageType

      public void setPageType(int pageType)
      sets the page type, that is whether this model is for payment page, move hierarchy or view BU hierarchy
      Parameters:
      pageType - int, 0 is for view hierarchy, 1 is move hierarchy and 2 is for payment page
    • setCurrentAcctRowCountDetails

      public void setCurrentAcctRowCountDetails(Object[][] currentAcct)
      sets the current account details to the model
      Parameters:
      currentAcct - Object[][], current account data
    • getCurrentAccountRowCount

      public int getCurrentAccountRowCount()
      returns the current account's billunit count
      Returns:
      int
    • getCurrentAccountName

      public String getCurrentAccountName()
      gets the current account name
      Returns:
      String, name of the current account.
    • setBillUnitDetails

      public void setBillUnitDetails(Hashtable billUnitHash)
      bill unit name and details of that bill unit map
      Parameters:
      billUnitHash - Hashtable
    • setHierarchyFlag

      public void setHierarchyFlag(boolean flag)
      set the hierarchy flag true if the account is in hierarchy
      Parameters:
      flag - boolean
    • getBillUnitDetails

      public Hashtable getBillUnitDetails()
      returns the bill unit name and details of that bill unit map
      Returns:
      Hashtable
    • clearData

      public void clearData()
      clears the model data
    • setTotalTableStructure

      public void setTotalTableStructure(Object[][] totalTableObj)
      sets the total table model, that is apart current account, rest of the hierarchy data also set to the model
      Parameters:
      totalTableObj - Object[][]
    • getTotalTableStructure

      public Object[][] getTotalTableStructure()
      returns the total model of the table
      Returns:
      Object[][]
    • isCellEditable

      public boolean isCellEditable(int row, int column)
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
      Parameters:
      row - int
      column - int
      Returns:
      boolean
    • getColumnCount

      public int getColumnCount()
      returns the column count of the table
      Returns:
      int
    • getColumnName

      public String getColumnName(int column)
      returns the column name of the table depending on the index of the column
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
      Parameters:
      column - int, tells which column name has to be returned
      Returns:
      String
    • getColumnClass

      public Class getColumnClass(int column)
      returns the class type of the column
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class AbstractTableModel
      Parameters:
      column - int, ells which column class type has to be returned
      Returns:
      Class
    • getRowCount

      public int getRowCount()
      returns the row count of the table
      Returns:
      int
    • getValueAt

      public Object getValueAt(int rowIndex, int columnIndex)
      returns the value from the model at given row and column index
      Parameters:
      rowIndex - int, row index
      columnIndex - int, column index
      Returns:
      Object
    • updatePayType

      public void updatePayType(int row, int col, String payType)
      updates the data in the model for a given row and column index
      Parameters:
      row - int, row index
      col - int, column index
      payType - String the data to be updated
    • setCurrentDataModel

      public void setCurrentDataModel(Object[][] tableData)
      updates the current account data to the model
      Parameters:
      tableData - Object[][], data to be set to the model
    • setBillInfoIdOpenBills

      public void setBillInfoIdOpenBills(HashMap map)
      sets the bill info names and whether the open bill amount is there for respective BU name map
      Parameters:
      map - HashMap
    • setCurrentAccountNumber

      public void setCurrentAccountNumber(String acctNumber)
      sets the current account's account number
    • getCurrentAccountNumber

      public String getCurrentAccountNumber()
      returns the current account's account number
    • getBillInfoIdOpenBills

      public HashMap getBillInfoIdOpenBills()
      returns the bill info names and whether the open bill amount is there for respective BU name map
      Returns:
      HashMap