com.silverpeas.form.record
Class IdentifiedRecordTemplate

java.lang.Object
  extended by com.silverpeas.form.record.IdentifiedRecordTemplate
All Implemented Interfaces:
RecordTemplate, Serializable

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
IdentifiedRecordTemplate(RecordTemplate wrappedTemplate)
          A IdentifiedRecordTemplate is built upon a wrapped template.
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface RecordTemplate

getFieldTemplates

public FieldTemplate[] getFieldTemplates()
                                  throws FormException
Returns all the field templates.

Specified by:
getFieldTemplates in interface RecordTemplate
Throws:
FormException

getFieldTemplate

public FieldTemplate getFieldTemplate(String fieldName)
                               throws FormException
Returns the FieldTemplate of the named field.

Specified by:
getFieldTemplate in interface RecordTemplate
Throws:
FormException

getFieldIndex

public int getFieldIndex(String fieldName)
                  throws FormException
Returns the field index of the named field.

Specified by:
getFieldIndex in interface RecordTemplate
Throws:
FormException

getEmptyRecord

public DataRecord getEmptyRecord()
                          throws FormException
Returns an empty DataRecord built on this template.

Specified by:
getEmptyRecord in interface RecordTemplate
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 interface RecordTemplate

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()


Copyright © 2016 Silverpeas. All Rights Reserved.