Class IdentifiedRecordTemplate
- java.lang.Object
-
- org.silverpeas.core.contribution.content.form.record.IdentifiedRecordTemplate
-
- All Implemented Interfaces:
Serializable
,RecordTemplate
public class IdentifiedRecordTemplate extends Object implements RecordTemplate, Serializable
An Identified RecordTemplate adds a database id and an external id to a RecordTemplate.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IdentifiedRecordTemplate(RecordTemplate wrappedTemplate)
A IdentifiedRecordTemplate is built upon a wrapped template.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkDataRecord(DataRecord record)
Returns true if the data record is built on this template and all the constraints are ok.DataRecord
getEmptyRecord()
Returns an empty DataRecord built on this template.String
getExternalId()
Returns the external template id.int
getFieldIndex(String fieldName)
Returns the field index of the named field.String[]
getFieldNames()
Returns all the field names of the DataRecord built on this template.FieldTemplate
getFieldTemplate(String fieldName)
Returns the FieldTemplate of the named field.FieldTemplate[]
getFieldTemplates()
Returns all the field templates.String
getInstanceId()
int
getInternalId()
Gets the internal id.String
getTemplateName()
RecordTemplate
getWrappedTemplate()
Returns the wrapped template.boolean
isEncrypted()
void
setEncrypted(boolean encrypted)
void
setExternalId(String externalId)
Gives an external id to the template.void
setInternalId(int id)
Sets the internal id.void
setTemplateName(String templateName)
-
-
-
Constructor Detail
-
IdentifiedRecordTemplate
public IdentifiedRecordTemplate(RecordTemplate wrappedTemplate)
A IdentifiedRecordTemplate is built upon a wrapped template.
-
-
Method Detail
-
getWrappedTemplate
public RecordTemplate getWrappedTemplate()
Returns the wrapped template.
-
getFieldNames
public String[] getFieldNames()
Returns all the field names of the DataRecord built on this template.- Specified by:
getFieldNames
in interfaceRecordTemplate
-
getFieldTemplates
public FieldTemplate[] getFieldTemplates() throws FormException
Returns all the field templates.- Specified by:
getFieldTemplates
in interfaceRecordTemplate
- Throws:
FormException
-
getFieldTemplate
public FieldTemplate getFieldTemplate(String fieldName) throws FormException
Returns the FieldTemplate of the named field.- Specified by:
getFieldTemplate
in interfaceRecordTemplate
- Throws:
FormException
- if the field name is unknown.
-
getFieldIndex
public int getFieldIndex(String fieldName) throws FormException
Returns the field index of the named field.- Specified by:
getFieldIndex
in interfaceRecordTemplate
- Throws:
FormException
- if the field name is unknown.
-
getEmptyRecord
public DataRecord getEmptyRecord() throws FormException
Returns an empty DataRecord built on this template.- Specified by:
getEmptyRecord
in interfaceRecordTemplate
- Throws:
FormException
-
checkDataRecord
public boolean checkDataRecord(DataRecord record)
Returns true if the data record is built on this template and all the constraints are ok.- Specified by:
checkDataRecord
in interfaceRecordTemplate
-
getExternalId
public String getExternalId()
Returns the external template id.
-
setExternalId
public void setExternalId(String externalId)
Gives an external id to the template.
-
getInternalId
public int getInternalId()
Gets the internal id.
-
setInternalId
public void setInternalId(int id)
Sets the internal id.
-
getTemplateName
public String getTemplateName()
-
setTemplateName
public void setTemplateName(String templateName)
-
setEncrypted
public void setEncrypted(boolean encrypted)
-
isEncrypted
public boolean isEncrypted()
-
getInstanceId
public String getInstanceId()
-
-