de.esprit.appsuite.database.dbase

## Class ResultData

- java.lang.Object
- - javax.swing.table.AbstractTableModel
  - - de.esprit.appsuite.database.dbase.ResultData

- All Implemented Interfaces:
    java.io.Serializable, javax.swing.table.TableModel

      public class ResultData
      extends javax.swing.table.AbstractTableModel

  This is a special TableModel which fills itself from a ResultSet. It can be used directly to be displayed in a JTable. The table-column information is read from the MetaData returned by the ResultSet. There are also some convenience methods for writing the data to a file.
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Field Summary

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

      `listenerList`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResultData(java.sql.ResultSet rs)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(java.lang.String[] record)`
    `void` | `clear()`
    `java.lang.String[]` | `get(int i)`
    `java.lang.Class` | `getColumnClass()`
    `int` | `getColumnCount()`
    `java.lang.String` | `getColumnName(int idx)`
    `int` | `getColumnSize(int idx)`
    `int` | `getRowCount()`
    `java.lang.Object` | `getValueAt(int row, int col)`
    `void` | `setDelimiter(java.lang.String delim)`
    `void` | `setWriteHeader(boolean withHeader)`
    `int` | `size()`
    `void` | `write(java.io.PrintStream ps)`
    `void` | `writeToFile(java.io.File file)`

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

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

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

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

- - ### Constructor Detail

    - #### ResultData

          public ResultData(java.sql.ResultSet rs)
                     throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

  - ### Method Detail

    - #### setDelimiter

          public void setDelimiter(java.lang.String delim)

    - #### setWriteHeader

          public void setWriteHeader(boolean withHeader)

    - #### add

          public void add(java.lang.String[] record)

    - #### get

          public java.lang.String[] get(int i)

    - #### size

          public int size()

    - #### clear

          public void clear()

    - #### getRowCount

          public int getRowCount()

    - #### getColumnCount

          public int getColumnCount()

    - #### getValueAt

          public java.lang.Object getValueAt(int row,
                                    int col)

    - #### getColumnName

          public java.lang.String getColumnName(int idx)

      Specified by:
        `getColumnName` in interface `javax.swing.table.TableModel`
      Overrides:
        `getColumnName` in class `javax.swing.table.AbstractTableModel`

    - #### getColumnSize

          public int getColumnSize(int idx)

    - #### getColumnClass

          public java.lang.Class getColumnClass()

    - #### write

          public void write(java.io.PrintStream ps)

    - #### writeToFile

          public void writeToFile(java.io.File file)
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.