com.silverpeas.form
Interface RecordSet

All Known Implementing Classes:
DummyRecordSet, GenericRecordSet

public interface RecordSet

A RecordSet manages a set of DataRecord built on a same RecordTemplate.

See Also:
DataRecord, RecordTemplate

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> oldAndNewFileIds)
           
 void delete(DataRecord record)
          Deletes the given DataRecord and set to null its id.
 void delete(String objectId)
           
 DataRecord getEmptyRecord()
          Returns an empty DataRecord built on the RecordTemplate.
 DataRecord getRecord(String id)
          Returns the DataRecord with the given id.
 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 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)
          Save the given DataRecord.
 

Method Detail

getRecordTemplate

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


getEmptyRecord

DataRecord getEmptyRecord()
                          throws FormException
Returns an empty DataRecord built on the RecordTemplate. This record is not yet managed by this RecordSet. This is only an empty record which must be filled and saved in order to become a DataRecord of this RecordSet.

Throws:
FormException

getRecord

DataRecord getRecord(String id)
                     throws FormException
Returns the DataRecord with the given id.

Throws:
FormException

getRecord

DataRecord getRecord(String recordId,
                     String language)
                     throws FormException
Throws:
FormException

save

void save(DataRecord record)
          throws FormException
Save the given DataRecord. If the record id is null then the record is inserted in this RecordSet. Else the record is updated.

Throws:
FormException

indexRecord

void indexRecord(String recordId,
                 String formName,
                 FullIndexEntry indexEntry)
                 throws FormException
Index the given DataRecord into the indexEntry. formName looks like allFields (ie template filename allFields.xml without extension)

Parameters:
formName -
indexEntry -
Throws:
FormException

delete

void delete(DataRecord record)
            throws FormException
Deletes the given DataRecord and set to null its id.

Throws:
FormException

delete

void delete(String objectId)
            throws FormException
Throws:
FormException

copy

void copy(ForeignPK fromPK,
          ForeignPK toPK,
          RecordTemplate toRecordTemplate,
          Map<String,String> oldAndNewFileIds)
          throws FormException
Throws:
FormException

move

void move(ForeignPK fromPK,
          ForeignPK toPK,
          RecordTemplate toRecordTemplate)
          throws FormException
Throws:
FormException

clone

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

Throws:
FormException

merge

void merge(String fromExternalId,
           String fromComponentId,
           String toExternalId,
           String toComponentId,
           Map<String,String> attachmentIds)
           throws FormException
Throws:
FormException


Copyright © 2016 Silverpeas. All Rights Reserved.