org.starhope.appius.util
Interface RecordSetLoader<T extends DataRecordSet<?>>

Type Parameters:
T - the type of record set to be loaded
All Known Subinterfaces:
NotificationSetLoader

public interface RecordSetLoader<T extends DataRecordSet<?>>

WRITEME: Document this type.

Author:
brpocock@star-hope.org

Method Summary
 void initializeStorage(String storageURL)
          Prepare the RecordSetLoader for accessing a given storage medium.
 T loadRecordSet(Collection<String> identifiers, long offset, long limit)
          Load the data record identified from the storage system.
 T loadRecordSetByIDs(Collection<Integer> ids, long offset, long limit)
          Load the records with the given ID number from the storage system
 void saveRecordSet(T recordSet)
          WRITEME: Document this method brpocock@star-hope.org
 

Method Detail

initializeStorage

void initializeStorage(String storageURL)
                       throws NotReadyException
Prepare the RecordSetLoader for accessing a given storage medium. Usually identifies a URL for the storage mechanism, but can also pull information from AppiusConfig.

Parameters:
storageURL - A URL or identifier of the storage engine. The syntax is specific to the RecordLoader implementation.
Throws:
NotReadyException - if the storage engine can't be initialized

loadRecordSet

T loadRecordSet(Collection<String> identifiers,
                long offset,
                long limit)
Load the data record identified from the storage system. The format and interpretation of the identifier is specific to the data record type, but must be a guaranteed-unique

Parameters:
identifiers - the identifiers for the record set
offset - the first record to include
limit - the maximum number of records to include
Returns:
the data record in question

loadRecordSetByIDs

T loadRecordSetByIDs(Collection<Integer> ids,
                     long offset,
                     long limit)
Load the records with the given ID number from the storage system

Parameters:
ids - the ID numbers for the records
offset - the first record to include
limit - the maximum number of records to include
Returns:
the data record in question

saveRecordSet

void saveRecordSet(T recordSet)
WRITEME: Document this method brpocock@star-hope.org

Parameters:
recordSet - the records to be saved