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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clone(String originalExternalId, String originalComponentId, String cloneExternalId, String cloneComponentId, Map<String,String> attachmentIds)
Clones the given DataRecord.void
copy(ResourceReference fromPK, ResourceReference toPK, RecordTemplate toRecordTemplate, Map<String,String> oldAndNewFileIds)
void
delete(String objectId)
Deletes all form data for the given objectId in all languagesvoid
delete(String objectId, String language)
Deletes form data for the given objectId in the given language onlyDataRecord
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)
List<DataRecord>
getRecords(String fieldName, String fieldValue)
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(ResourceReference fromPK, ResourceReference 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
- when the id is unknown.
-
getRecord
DataRecord getRecord(String recordId, String language) throws FormException
- Throws:
FormException
-
getRecords
List<DataRecord> getRecords(String fieldName, String fieldValue) 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
- when the record doesn't have the required template or when the record has an unknown id or when the insert or update fail.
-
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)- Throws:
FormException
- if an error occurs
-
delete
void delete(String objectId) throws FormException
Deletes all form data for the given objectId in all languages- Throws:
FormException
-
delete
void delete(String objectId, String language) throws FormException
Deletes form data for the given objectId in the given language only- Throws:
FormException
-
copy
void copy(ResourceReference fromPK, ResourceReference toPK, RecordTemplate toRecordTemplate, Map<String,String> oldAndNewFileIds) throws FormException
- Throws:
FormException
-
move
void move(ResourceReference fromPK, ResourceReference 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
-
-