com.silverpeas.form.dummy
Class DummyRecordSet

java.lang.Object
  extended by com.silverpeas.form.dummy.DummyRecordSet
All Implemented Interfaces:
RecordSet

public class DummyRecordSet
extends Object
implements RecordSet

A dummy record set.


Constructor Summary
DummyRecordSet()
          The no paramaters constructor.
DummyRecordSet(RecordTemplate template)
           
 
Method Summary
 void clone(String originalExternalId, String originalComponentId, String cloneExternalId, String cloneComponentId, Map<String,String> attachmentIds)
          Clones the given DataRecord.
 void copy(ForeignPK fromPK, ForeignPK toPK, RecordTemplate toRecordTemplate, Map<String,String> attachmentIds)
           
 void delete(DataRecord record)
          This dummy record set simply do nothing.
 void delete(String objectId)
           
 DataRecord getEmptyRecord()
          Returns an empty DataRecord built on the RecordTemplate.
 DataRecord getRecord(String recordId)
          This dummy record set always return a dummy record.
 DataRecord getRecord(String recordId, String language)
           
 RecordTemplate getRecordTemplate()
          Returns the RecordTemplate shared by all the DataRecord of this RecordSet.
 void indexRecord(String recordId, String formName, FullIndexEntry indexEntry)
          Index the given DataRecord into the indexEntry. formName looks like allFields (ie template filename allFields.xml without extension)
 void insert(DataRecord record)
          This dummy record set simply do nothing.
 void merge(String fromExternalId, String fromComponentId, String toExternalId, String toComponentId, Map<String,String> attachmentIds)
           
 void move(ForeignPK fromPK, ForeignPK toPK, RecordTemplate toRecordTemplate)
           
 void save(DataRecord record)
          This dummy record set simply do nothing.
 void update(DataRecord record)
          This dummy record set simply do nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyRecordSet

public DummyRecordSet()
The no paramaters constructor.


DummyRecordSet

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

getRecordTemplate

public RecordTemplate getRecordTemplate()
Returns the RecordTemplate shared by all the DataRecord of this RecordSet.

Specified by:
getRecordTemplate in interface RecordSet
Returns:

getEmptyRecord

public DataRecord getEmptyRecord()
                          throws FormException
Returns an empty DataRecord built on the RecordTemplate.

Specified by:
getEmptyRecord in interface RecordSet
Returns:
Throws:
FormException

getRecord

public DataRecord getRecord(String recordId)
                     throws FormException
This dummy record set always return a dummy record.

Specified by:
getRecord in interface RecordSet
Parameters:
recordId -
Returns:
Throws:
FormException

getRecord

public DataRecord getRecord(String recordId,
                            String language)
                     throws FormException
Specified by:
getRecord in interface RecordSet
Throws:
FormException

insert

public void insert(DataRecord record)
            throws FormException
This dummy record set simply do nothing.

Parameters:
record -
Throws:
FormException

update

public void update(DataRecord record)
            throws FormException
This dummy record set simply do nothing.

Parameters:
record -
Throws:
FormException

save

public void save(DataRecord record)
          throws FormException
This dummy record set simply do nothing.

Specified by:
save in interface RecordSet
Parameters:
record -
Throws:
FormException

delete

public void delete(DataRecord record)
            throws FormException
This dummy record set simply do nothing.

Specified by:
delete in interface RecordSet
Parameters:
record -
Throws:
FormException

delete

public void delete(String objectId)
            throws FormException
Specified by:
delete in interface RecordSet
Throws:
FormException

clone

public void clone(String originalExternalId,
                  String originalComponentId,
                  String cloneExternalId,
                  String cloneComponentId,
                  Map<String,String> attachmentIds)
           throws FormException
Description copied from interface: RecordSet
Clones the given DataRecord. Set to cloneExternalId its externalId and insert it.

Specified by:
clone in interface RecordSet
Throws:
FormException

merge

public void merge(String fromExternalId,
                  String fromComponentId,
                  String toExternalId,
                  String toComponentId,
                  Map<String,String> attachmentIds)
           throws FormException
Specified by:
merge in interface RecordSet
Throws:
FormException

indexRecord

public void indexRecord(String recordId,
                        String formName,
                        FullIndexEntry indexEntry)
                 throws FormException
Description copied from interface: RecordSet
Index the given DataRecord into the indexEntry. formName looks like allFields (ie template filename allFields.xml without extension)

Specified by:
indexRecord in interface RecordSet
Throws:
FormException

copy

public void copy(ForeignPK fromPK,
                 ForeignPK toPK,
                 RecordTemplate toRecordTemplate,
                 Map<String,String> attachmentIds)
          throws FormException
Specified by:
copy in interface RecordSet
Throws:
FormException

move

public void move(ForeignPK fromPK,
                 ForeignPK toPK,
                 RecordTemplate toRecordTemplate)
          throws FormException
Specified by:
move in interface RecordSet
Throws:
FormException


Copyright © 2016 Silverpeas. All Rights Reserved.