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(Id id)
          Checks if a Record with the given Id exists in the storeage.
 Record loadRecord(Id id)
          Load the record with the given Id.
 java.util.Iterator<Record> loadRecords(java.lang.String source)
          Loads all records of the given source.
 void removeRecord(Id id)
          Removes the record with the given Id.
 void storeRecord(Record record)
          Stores the given Record object.
 

Method Detail

loadRecord

Record loadRecord(Id id)
                  throws RecordStorageException
Load the record with the given Id.

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(Id id)
                  throws RecordStorageException
Removes the record with the given Id.

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

existsRecord

boolean existsRecord(Id id)
                     throws RecordStorageException
Checks if a Record with the given Id exists in the storeage.

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