SMILA (incubation) API documentation

org.eclipse.smila.recordstorage
Interface RecordStorage

All Known Implementing Classes:
RecordStorageImpl

public interface RecordStorage

RecordStorage service interface.


Method Summary
 boolean existsRecord(java.lang.String id)
          Checks if a Record exists in the storage.
 Record loadRecord(java.lang.String id)
          Load the record from storage.
 java.util.Iterator<Record> loadRecords(java.lang.String source)
          Loads all records of the given source.
 void removeRecord(java.lang.String id)
          Removes the record.
 void storeRecord(Record record)
          Stores the given Record object.
 

Method Detail

loadRecord

Record loadRecord(java.lang.String id)
                  throws RecordStorageException
Load the record from storage.

Parameters:
id - Id of the record
Returns:
a Record object or null, if no record with the given Id exists
Throws:
RecordStorageException - if any error occurs

storeRecord

void storeRecord(Record record)
                 throws RecordStorageException
Stores the given Record object. An existing Record with the same ID is overwritten by the given record.

Parameters:
record - the Record object
Throws:
RecordStorageException - if any error occurs

removeRecord

void removeRecord(java.lang.String id)
                  throws RecordStorageException
Removes the record.

Parameters:
id - Id of the record
Throws:
RecordStorageException - if any error occurs

existsRecord

boolean existsRecord(java.lang.String id)
                     throws RecordStorageException
Checks if a Record exists in the storage.

Parameters:
id - Id of the record
Returns:
true if a record with the given Id exists, false otherwise
Throws:
RecordStorageException - if any error occurs

loadRecords

java.util.Iterator<Record> loadRecords(java.lang.String source)
                                       throws RecordStorageException
Loads all records of the given source.

Parameters:
source - the name of the data source
Returns:
an Iterator over the Record objects
Throws:
RecordStorageException - if any error occurs

SMILA (incubation) API documentation