com.silverpeas.form.dummy
Class DummyRecordTemplate

java.lang.Object
  extended by com.silverpeas.form.dummy.DummyRecordTemplate
All Implemented Interfaces:
RecordTemplate

public class DummyRecordTemplate
extends Object
implements RecordTemplate

A dummy record template.


Constructor Summary
DummyRecordTemplate()
          A DummyRecordTemplate is empty.
DummyRecordTemplate(RecordTemplate 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.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyRecordTemplate

public DummyRecordTemplate()
A DummyRecordTemplate is empty.


DummyRecordTemplate

public DummyRecordTemplate(RecordTemplate template)
                    throws FormException
Throws:
FormException
Method Detail

getFieldNames

public String[] getFieldNames()
Returns all the field names of the DataRecord built on this template.

Specified by:
getFieldNames in interface RecordTemplate
Returns:

getFieldTemplates

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

Specified by:
getFieldTemplates in interface RecordTemplate
Returns:

getFieldTemplate

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

Specified by:
getFieldTemplate in interface RecordTemplate
Parameters:
fieldName -
Returns:
Throws:
FormException

getFieldIndex

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

Specified by:
getFieldIndex in interface RecordTemplate
Parameters:
fieldName -
Returns:
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 interface RecordTemplate
Returns:
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
Parameters:
record -
Returns:


Copyright © 2016 Silverpeas. All Rights Reserved.