de.vc.report.sources.db

## Class DBTableModel

- java.lang.Object
- - de.vc.report.ReportTableModel
  - - de.vc.report.sources.db.DBTableModel

-     public class DBTableModel
      extends ReportTableModel

  Table model using a database. Works only in combination with DBDataSource!

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `XML_TAG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DBTableModel()`
    `DBTableModel(de.vc.config.Configuration conf)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configure(de.vc.config.Configuration configuration)` Configures this table model.
    `java.lang.String[]` | `definedColumns()` Gets all table columns of this model.
    `protected void` | `doDisposeData()`
    `protected java.lang.Object` | `doGetValueOfCell(java.lang.String columnName)`
    `protected void` | `doReset()`
    `protected void` | `doSelectNextRow()`
    `DBSelection` | `getSelection()` Gets the selection of table rows.
    `boolean` | `hasMoreRows()` Determinates if more rows are available.
    `void` | `setSelection(DBSelection selection)` Sets the selection of table rows.

    - ### Methods inherited from class de.vc.report.ReportTableModel

      `disposeData, getLogger, getRowIndex, getValueOfCell, reset, selectNextRow`

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

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

- - ### Field Detail

    - #### XML_TAG

          public static final java.lang.String XML_TAG

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DBTableModel

          public DBTableModel()

    - #### DBTableModel

          public DBTableModel(de.vc.config.Configuration conf)
                       throws de.vc.config.ConfigurationException

      Throws:
        `de.vc.config.ConfigurationException`

  - ### Method Detail

    - #### configure

          public void configure(de.vc.config.Configuration configuration)
                         throws de.vc.config.ConfigurationException

      Configures this table model.
      Parameters:
        `configuration` - Configuration.
      Throws:
        `de.vc.config.ConfigurationException`

    - #### definedColumns

          public java.lang.String[] definedColumns()

      Gets all table columns of this model. Note that two different table models must not have equal columns!
      Specified by:
        `definedColumns` in class `ReportTableModel`
      Returns:
        String[] Name of columns.

    - #### doDisposeData

          protected void doDisposeData()
                                throws ReportException

      Overrides:
        `doDisposeData` in class `ReportTableModel`
      Throws:
        `ReportException`

    - #### doGetValueOfCell

          protected java.lang.Object doGetValueOfCell(java.lang.String columnName)
                                               throws ReportException

      Specified by:
        `doGetValueOfCell` in class `ReportTableModel`
      Throws:
        `ReportException`

    - #### doReset

          protected void doReset()
                          throws ReportException

      Specified by:
        `doReset` in class `ReportTableModel`
      Throws:
        `ReportException`

    - #### doSelectNextRow

          protected void doSelectNextRow()
                                  throws ReportException

      Specified by:
        `doSelectNextRow` in class `ReportTableModel`
      Throws:
        `ReportException`

    - #### getSelection

          public DBSelection getSelection()

      Gets the selection of table rows.
      Returns:
        Selection.

    - #### hasMoreRows

          public boolean hasMoreRows()
                              throws ReportException

      Description copied from class: `ReportTableModel`
      Determinates if more rows are available.
      Specified by:
        `hasMoreRows` in class `ReportTableModel`
      Returns:
        true, if at least one row is available.
      Throws:
        `ReportException`

    - #### setSelection

          public void setSelection(DBSelection selection)

      Sets the selection of table rows.
      Parameters:
        `selection` - Selection of table rows.

© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.