org.baraza.DB

## Class BTableModel

- java.lang.Object
- - javax.swing.table.AbstractTableModel
  - - org.baraza.DB.BTableModel

- All Implemented Interfaces:
    Serializable, TableModel

      public class BTableModel
      extends AbstractTableModel

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class javax.swing.table.AbstractTableModel

      `listenerList`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BTableModel()`
    `BTableModel(BDB db, BElement desk)`
    `BTableModel(BDB db, BElement desk, String wherefilter)`
    `BTableModel(BDB db, String mysql, int limit)`
    `BTableModel(BDB db, String myfields, String tablename, int limit)`
    `BTableModel(String[] titleArray)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `void` | `filter(String wheresql, String orderby)`
    `Class` | `getColumnClass(int aCol)`
    `int` | `getColumnCount()`
    `String` | `getColumnName(int aCol)`
    `Vector<String>` | `getColumnNames()`
    `BElement` | `getDeskConfig(int cfg)`
    `String` | `getFieldName(int aCol)`
    `List<String>` | `getFields()`
    `BElement` | `getGridConfig()`
    `String` | `getKeyField()`
    `Vector<String>` | `getKeyFieldData()`
    `String` | `getKeyFieldName()`
    `List<BTableLinks>` | `getLinks()`
    `List<BTableLinks>` | `getLinks(List<String> linkTables)`
    `Map<String,String>` | `getParams()`
    `BQuery` | `getQuery()`
    `int` | `getRowCount()`
    `BElement` | `getTableConfig()`
    `String` | `getTableName()`
    `Object` | `getValueAt(int aRow, int aCol)`
    `String` | `getViewSQL()`
    `void` | `importData(Vector<Vector<Object>> newData)`
    `int` | `insertRow()`
    `int` | `insertRow(Vector<Object> dataRow)`
    `boolean` | `isCellEditable(int aRow, int aCol)`
    `boolean` | `movePos(int pos)`
    `String` | `readDocument(boolean heading, boolean trim)`
    `String` | `readField(String fieldName)`
    `void` | `recAudit(String changetype, String recordid)`
    `void` | `recDelete()`
    `void` | `refresh()`
    `void` | `removeRow(int aRow)`
    `void` | `requery()`
    `void` | `savecvs(String filename)`
    `void` | `setQuery(BQuery query)`
    `void` | `setTitles(String[] titleArray)`
    `void` | `setValueAt(Object value, int aRow, int aCol)`

    - ### Methods inherited from class javax.swing.table.AbstractTableModel

      `addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BTableModel

          public BTableModel()

    - #### BTableModel

          public BTableModel(String[] titleArray)

    - #### BTableModel

          public BTableModel(BDB db,
                     BElement desk)

    - #### BTableModel

          public BTableModel(BDB db,
                     BElement desk,
                     String wherefilter)

    - #### BTableModel

          public BTableModel(BDB db,
                     String mysql,
                     int limit)

    - #### BTableModel

          public BTableModel(BDB db,
                     String myfields,
                     String tablename,
                     int limit)

  - ### Method Detail

    - #### setQuery

          public void setQuery(BQuery query)

    - #### isCellEditable

          public boolean isCellEditable(int aRow,
                               int aCol)

      Specified by:
        `isCellEditable` in interface `TableModel`
      Overrides:
        `isCellEditable` in class `AbstractTableModel`

    - #### setValueAt

          public void setValueAt(Object value,
                        int aRow,
                        int aCol)

      Specified by:
        `setValueAt` in interface `TableModel`
      Overrides:
        `setValueAt` in class `AbstractTableModel`

    - #### removeRow

          public void removeRow(int aRow)

    - #### refresh

          public void refresh()

    - #### requery

          public void requery()

    - #### filter

          public void filter(String wheresql,
                    String orderby)

    - #### clear

          public void clear()

    - #### getColumnCount

          public int getColumnCount()

    - #### getRowCount

          public int getRowCount()

    - #### getColumnName

          public String getColumnName(int aCol)

      Specified by:
        `getColumnName` in interface `TableModel`
      Overrides:
        `getColumnName` in class `AbstractTableModel`

    - #### getFieldName

          public String getFieldName(int aCol)

    - #### getColumnNames

          public Vector<String> getColumnNames()

    - #### getValueAt

          public Object getValueAt(int aRow,
                          int aCol)

    - #### getColumnClass

          public Class getColumnClass(int aCol)

      Specified by:
        `getColumnClass` in interface `TableModel`
      Overrides:
        `getColumnClass` in class `AbstractTableModel`

    - #### getKeyFieldData

          public Vector<String> getKeyFieldData()

    - #### movePos

          public boolean movePos(int pos)

    - #### getKeyField

          public String getKeyField()

    - #### getKeyFieldName

          public String getKeyFieldName()

    - #### readField

          public String readField(String fieldName)

    - #### insertRow

          public int insertRow()

    - #### insertRow

          public int insertRow(Vector<Object> dataRow)

    - #### getFields

          public List<String> getFields()

    - #### getViewSQL

          public String getViewSQL()

    - #### getDeskConfig

          public BElement getDeskConfig(int cfg)

    - #### getGridConfig

          public BElement getGridConfig()

    - #### getTableConfig

          public BElement getTableConfig()

    - #### getLinks

          public List<BTableLinks> getLinks()

    - #### getLinks

          public List<BTableLinks> getLinks(List<String> linkTables)

    - #### importData

          public void importData(Vector<Vector<Object>> newData)

    - #### readDocument

          public String readDocument(boolean heading,
                            boolean trim)

    - #### recDelete

          public void recDelete()

    - #### recAudit

          public void recAudit(String changetype,
                      String recordid)

    - #### getTableName

          public String getTableName()

    - #### setTitles

          public void setTitles(String[] titleArray)

    - #### savecvs

          public void savecvs(String filename)

    - #### getParams

          public Map<String,String> getParams()

    - #### getQuery

          public BQuery getQuery()

Copyright © 2016 openBaraza. All Rights Reserved.