Class 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 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.
      • 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