Package org.silverpeas.processmanager.record

## Class QuestionRecord

- java.lang.Object
- - org.silverpeas.processmanager.record.QuestionRecord

- All Implemented Interfaces:
    `Serializable`, `org.silverpeas.core.contribution.content.form.DataRecord`

      public class QuestionRecord
      extends Object
      implements org.silverpeas.core.contribution.content.form.DataRecord

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `QuestionRecord​(String content)` | A QuestionRecord is built from a Question

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `org.silverpeas.core.contribution.content.form.Field` | `getField​(int fieldIndex)` | Returns the field at the index position in the record.
    `org.silverpeas.core.contribution.content.form.Field` | `getField​(String fieldName)` | Returns the named field.
    `org.silverpeas.core.contribution.content.form.Field` | `getField​(String fieldName, int occurrence)` |
    `String[]` | `getFieldNames()` |
    `org.silverpeas.core.contribution.content.form.Field[]` | `getFields()` | Returns all the fields
    `String` | `getId()` | Returns the data record id.
    `String` | `getLanguage()` |
    `org.silverpeas.core.ResourceReference` | `getResourceReference()` |
    `org.silverpeas.core.contribution.content.form.RecordTemplate` | `getTemplate()` |
    `Map<String,​String>` | `getValues​(String language)` |
    `boolean` | `isNew()` | Return true if this record has not been inserted in a RecordSet.
    `void` | `setId​(String id)` | Gives an id to the record.
    `void` | `setLanguage​(String language)` |
    `int` | `size()` |

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

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

- - ### Constructor Detail

    - #### QuestionRecord

          public QuestionRecord​(String content)

      A QuestionRecord is built from a Question

  - ### Method Detail

    - #### getId

          public String getId()

      Returns the data record id. The record is known by its external id.
      Specified by:
        `getId` in interface `org.silverpeas.core.contribution.content.form.DataRecord`

    - #### setId

          public void setId​(String id)

      Gives an id to the record. Caution ! the record is known by its external id.
      Specified by:
        `setId` in interface `org.silverpeas.core.contribution.content.form.DataRecord`

    - #### getFields

          public org.silverpeas.core.contribution.content.form.Field[] getFields()

      Returns all the fields

    - #### getField

          public org.silverpeas.core.contribution.content.form.Field getField​(String fieldName)
                                                                       throws org.silverpeas.core.contribution.content.form.FormException

      Returns the named field.
      Specified by:
        `getField` in interface `org.silverpeas.core.contribution.content.form.DataRecord`
      Throws:
        `org.silverpeas.core.contribution.content.form.FormException` - when the fieldName is unknown.

    - #### getField

          public org.silverpeas.core.contribution.content.form.Field getField​(String fieldName,
                                                                              int occurrence)

      Specified by:
        `getField` in interface `org.silverpeas.core.contribution.content.form.DataRecord`

    - #### getField

          public org.silverpeas.core.contribution.content.form.Field getField​(int fieldIndex)
                                                                       throws org.silverpeas.core.contribution.content.form.FormException

      Returns the field at the index position in the record.
      Specified by:
        `getField` in interface `org.silverpeas.core.contribution.content.form.DataRecord`
      Throws:
        `org.silverpeas.core.contribution.content.form.FormException` - when the fieldIndex is unknown.

    - #### size

          public int size()

      Specified by:
        `size` in interface `org.silverpeas.core.contribution.content.form.DataRecord`

    - #### getFieldNames

          public String[] getFieldNames()

      Specified by:
        `getFieldNames` in interface `org.silverpeas.core.contribution.content.form.DataRecord`

    - #### isNew

          public boolean isNew()

      Return true if this record has not been inserted in a RecordSet.
      Specified by:
        `isNew` in interface `org.silverpeas.core.contribution.content.form.DataRecord`

    - #### getLanguage

          public String getLanguage()

      Specified by:
        `getLanguage` in interface `org.silverpeas.core.contribution.content.form.DataRecord`

    - #### setLanguage

          public void setLanguage​(String language)

      Specified by:
        `setLanguage` in interface `org.silverpeas.core.contribution.content.form.DataRecord`

    - #### getValues

          public Map<String,​String> getValues​(String language)

      Specified by:
        `getValues` in interface `org.silverpeas.core.contribution.content.form.DataRecord`

    - #### getResourceReference

          public org.silverpeas.core.ResourceReference getResourceReference()

      Specified by:
        `getResourceReference` in interface `org.silverpeas.core.contribution.content.form.DataRecord`

    - #### getTemplate

          public org.silverpeas.core.contribution.content.form.RecordTemplate getTemplate()

      Specified by:
        `getTemplate` in interface `org.silverpeas.core.contribution.content.form.DataRecord`