de.vc.report

## Class ReportData

- java.lang.Object
- - de.vc.report.ReportData

-     public class ReportData
      extends java.lang.Object

  Report data contains all informations of a single report. It contains a list of key-value pairs and table models.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReportData()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTableModel(ReportTableModel model)` Adds a table model to this report data.
    `java.lang.String` | `getId()` Gets the ID of this data, can be NULL.
    `ReportTableModel` | `getTableModelByColName(java.lang.String columnName)` This methode returns a report table model that has a column with given columnName.
    `java.util.Set<ReportTableModel>` | `getTableModels()` Gets the set of all table models.
    `java.lang.Object` | `getValue(java.lang.String keyword)` Gets the value of a field.
    `java.util.Map` | `getValueMap()`
    `boolean` | `hasValue(java.lang.String keyword)` Determinates if a value is assigned to a keyword.
    `boolean` | `isAutoTableColumn(java.lang.String columnName)`
    `void` | `setId(java.lang.String id)` Sets an optional ID of this data.
    `void` | `setImageValue(java.lang.String keyword, java.lang.String imageFile)` Sets an image of a field, which means the field shall be replaced by a graphic.
    `void` | `setImageValue(java.lang.String keyword, java.lang.String imageFile, Measure width, Measure height)` Sets an image of a field, which means the field shall be replaced by a graphic.
    `void` | `setValue(java.lang.String keyword, java.lang.Object value)` Sets the value of a field.
    `void` | `setValues(java.util.Map<java.lang.String,java.lang.Object> map)` Sets multiple values.

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

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

- - ### Constructor Detail

    - #### ReportData

          public ReportData()

  - ### Method Detail

    - #### addTableModel

          public void addTableModel(ReportTableModel model)

      Adds a table model to this report data. Notice: The report build decide by the column name what table model is to use to fill the table. Thus two different table models must not have equal column names; otherwise it's unclear what table model is to use to fill a column.
      Parameters:
        `model` - Tablemodel.

    - #### getId

          public java.lang.String getId()

      Gets the ID of this data, can be NULL.
      Returns:
        ID of data.

    - #### getTableModelByColName

          public ReportTableModel getTableModelByColName(java.lang.String columnName)

      This methode returns a report table model that has a column with given columnName. Note that 2 different table models must not have equal column names!
      Parameters:
        `columnName` - Name of column.
      Returns:
        Tabel model.

    - #### getTableModels

          public java.util.Set<ReportTableModel> getTableModels()

      Gets the set of all table models.
      Returns:
        Unmodifiably set containing Object of class ReportTableModel.

    - #### getValue

          public java.lang.Object getValue(java.lang.String keyword)

      Gets the value of a field.
      Parameters:
        `keyword` - Keyword (fill-in name) of field.
      Returns:
        Value of field or NULL if not defined.

    - #### getValueMap

          public java.util.Map getValueMap()

    - #### hasValue

          public boolean hasValue(java.lang.String keyword)

      Determinates if a value is assigned to a keyword.
      Parameters:
        `keyword` - Keyword.
      Returns:
        true if a value is assigned.

    - #### isAutoTableColumn

          public boolean isAutoTableColumn(java.lang.String columnName)

    - #### setId

          public void setId(java.lang.String id)

      Sets an optional ID of this data.
      Parameters:
        `id` - ID of data.

    - #### setValue

          public void setValue(java.lang.String keyword,
                      java.lang.Object value)

      Sets the value of a field.
      Parameters:
        `keyword` - Keyword or ID of field.
        `value` - Value of field.

    - #### setImageValue

          public void setImageValue(java.lang.String keyword,
                           java.lang.String imageFile)

      Sets an image of a field, which means the field shall be replaced by a graphic.
      Parameters:
        `keyword` -
        `imageFile` -
      Throws:
        `ReportException`

    - #### setImageValue

          public void setImageValue(java.lang.String keyword,
                           java.lang.String imageFile,
                           Measure width,
                           Measure height)

      Sets an image of a field, which means the field shall be replaced by a graphic.
      Parameters:
        `keyword` -
        `imageFile` -
      Throws:
        `ReportException`

    - #### setValues

          public void setValues(java.util.Map<java.lang.String,java.lang.Object> map)

      Sets multiple values.
      Parameters:
        `map` - Map with key-value pairs, Key must be a String.

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