de.esprit.appsuite.database.dbase

## Class DBColumnChoice

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.database.dbase.DBColumnChoice

- All Implemented Interfaces:
    Dumpable

      public class DBColumnChoice
      extends DumpableObject

  This class encapsulates a possible value for a particular database column whereas the value is associated with a translated textual description for it. This object is supposed to be added as menu items into JComboBoxes.
  The static method getChoices(tableColumn) returns a list of choices for the given database column for loading them into a JComboBox.
  Note that this class contains static code that loads all known choice values before this class is actually used.
  Note that each column also may have a description. The translation key for the description is generated automatically and the translated description text is requested from the Translation class.
  Author:
    Rainer Buesch
  See Also:
    `Translation`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.lang.String` | `descr`
    `java.lang.String` | `name`
    `java.lang.String` | `tableColumn`
    `java.lang.String` | `value`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DBColumnChoice(boolean isTranslated, NlsDatabaseKey dbKey, java.lang.String value)`
    `DBColumnChoice(NlsDatabaseKey dbKey, int value)`
    `DBColumnChoice(NlsDatabaseKey dbKey, java.lang.String value)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `dumpChoices()`
    `static DBColumnChoice[]` | `getChoices(java.lang.String tableColumn)` Returns a list of choices to be added to a JCheckBox for the requested column.
    `static int` | `getItemCount(java.lang.String tableColumn)` Returns the number of available `DBColumnChoice` objects for the particular database column.
    `java.lang.String` | `getName()`
    `static java.lang.String` | `getName(java.lang.String tableColumn, java.lang.String value)`
    `static java.lang.String[]` | `getNames(java.lang.String tableColumn)` This method is called by the DynamIT ColumnChoiceTool
    `java.lang.String` | `getTableColumn()`
    `java.lang.String` | `getToolTipText()`
    `java.lang.String` | `getValue()`
    `static java.lang.String[]` | `getValues(java.lang.String tableColumn)` Returns the choice values for the particular database column as a String array.
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `java.lang.String` | `toString()` Returns a single line String that shows the values of the most important state variables of this object.
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString`

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

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

- - ### Field Detail

    - #### tableColumn

          public final java.lang.String tableColumn

    - #### name

          public final java.lang.String name

    - #### value

          public final java.lang.String value

    - #### descr

          public final java.lang.String descr

  - ### Constructor Detail

    - #### DBColumnChoice

          public DBColumnChoice(NlsDatabaseKey dbKey,
                        int value)

    - #### DBColumnChoice

          public DBColumnChoice(NlsDatabaseKey dbKey,
                        java.lang.String value)

    - #### DBColumnChoice

          public DBColumnChoice(boolean isTranslated,
                        NlsDatabaseKey dbKey,
                        java.lang.String value)

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Description copied from interface: `Dumpable`
      Returns a single line String that shows the values of the most important state variables of this object. This is intentionally the same toString() method which is already provided by Object per se.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `DumpableObject`

    - #### getTableColumn

          public java.lang.String getTableColumn()

    - #### getName

          public java.lang.String getName()

    - #### getValue

          public java.lang.String getValue()

    - #### getToolTipText

          public java.lang.String getToolTipText()

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `DumpableObject`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `DumpableObject`

    - #### getChoices

          public static DBColumnChoice[] getChoices(java.lang.String tableColumn)

      Returns a list of choices to be added to a JCheckBox for the requested column. The column name must be passed in the syntax .

    - #### dumpChoices

          public static void dumpChoices()

    - #### getItemCount

          public static int getItemCount(java.lang.String tableColumn)

      Returns the number of available `DBColumnChoice` objects for the particular database column. The column name must be passed in the syntax .

    - #### getValues

          public static java.lang.String[] getValues(java.lang.String tableColumn)

      Returns the choice values for the particular database column as a String array. The column name must be passed in the syntax .

    - #### getNames

          public static java.lang.String[] getNames(java.lang.String tableColumn)

      This method is called by the DynamIT ColumnChoiceTool

    - #### getName

          public static java.lang.String getName(java.lang.String tableColumn,
                                 java.lang.String value)

Copyright © 2014 EsprIT-Systems. All Rights Reserved.