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 fieldsString
getId()
Returns the data record id.String
getLanguage()
org.silverpeas.core.ResourceReference
getResourceReference()
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()
-
-
-
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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.silverpeas.core.contribution.content.form.DataRecord
-
getFieldNames
public String[] getFieldNames()
- Specified by:
getFieldNames
in interfaceorg.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 interfaceorg.silverpeas.core.contribution.content.form.DataRecord
-
getLanguage
public String getLanguage()
- Specified by:
getLanguage
in interfaceorg.silverpeas.core.contribution.content.form.DataRecord
-
setLanguage
public void setLanguage(String language)
- Specified by:
setLanguage
in interfaceorg.silverpeas.core.contribution.content.form.DataRecord
-
getValues
public Map<String,String> getValues(String language)
- Specified by:
getValues
in interfaceorg.silverpeas.core.contribution.content.form.DataRecord
-
getResourceReference
public org.silverpeas.core.ResourceReference getResourceReference()
- Specified by:
getResourceReference
in interfaceorg.silverpeas.core.contribution.content.form.DataRecord
-
-