Class GenericDataRecord
- java.lang.Object
-
- org.silverpeas.core.contribution.content.form.record.GenericDataRecord
-
- All Implemented Interfaces:
Serializable
,DataRecord
public class GenericDataRecord extends Object implements DataRecord, Serializable
A GenericDataRecord use a Field[] and a GenericRecordTemplate.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GenericDataRecord(RecordTemplate template)
A GenericDataRecord is built from a RecordTemplate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Field
getField(int fieldIndex)
Returns the field at the index position in the record.Field
getField(String fieldName)
Returns the named field.Field
getField(String fieldName, int occurrence)
String[]
getFieldNames()
Field[]
getFields()
Returns all the fieldsString
getId()
Returns the data record id.String
getLanguage()
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)
-
-
-
Constructor Detail
-
GenericDataRecord
public GenericDataRecord(RecordTemplate template) throws FormException
A GenericDataRecord is built from a RecordTemplate.- Throws:
FormException
-
-
Method Detail
-
getId
public String getId()
Returns the data record id. The record is known by its external id.- Specified by:
getId
in interfaceDataRecord
-
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 interfaceDataRecord
-
getFields
public Field[] getFields()
Returns all the fields
-
getField
public Field getField(String fieldName) throws FormException
Returns the named field.- Specified by:
getField
in interfaceDataRecord
- Throws:
FormException
- when the fieldName is unknown.
-
getField
public Field getField(String fieldName, int occurrence)
- Specified by:
getField
in interfaceDataRecord
-
getField
public Field getField(int fieldIndex) throws FormException
Returns the field at the index position in the record.- Specified by:
getField
in interfaceDataRecord
- Throws:
FormException
- when the fieldIndex is unknown.
-
isNew
public boolean isNew()
Return true if this record has not been inserted in a RecordSet.- Specified by:
isNew
in interfaceDataRecord
-
getFieldNames
public String[] getFieldNames()
- Specified by:
getFieldNames
in interfaceDataRecord
-
getLanguage
public String getLanguage()
- Specified by:
getLanguage
in interfaceDataRecord
-
setLanguage
public void setLanguage(String language)
- Specified by:
setLanguage
in interfaceDataRecord
-
getValues
public Map<String,String> getValues(String language)
- Specified by:
getValues
in interfaceDataRecord
-
getResourceReference
public ResourceReference getResourceReference()
- Specified by:
getResourceReference
in interfaceDataRecord
-
-