Class AbstractDataStore

    • Constructor Detail

      • AbstractDataStore

        public AbstractDataStore()
    • Method Detail

      • getRecord

        public DataRecord getRecord​(DataIdentifier identifier)
                             throws DataStoreException
        Description copied from interface: DataStore
        Returns the identified data record. The given identifier should be the identifier of a previously saved data record. Since records are never removed, there should never be cases where the identified record is not found. Abnormal cases like that are treated as errors and handled by throwing an exception.
        Specified by:
        getRecord in interface DataStore
        Parameters:
        identifier - data identifier
        Returns:
        identified data record
        Throws:
        DataStoreException - if the data store could not be accessed, or if the given identifier is invalid
      • getRecordFromReference

        public DataRecord getRecordFromReference​(java.lang.String reference)
                                          throws DataStoreException
        Description copied from interface: DataStore
        Returns the record that matches the given binary reference. Returns null if the reference is invalid, for example if it points to a record that does not exist.
        Specified by:
        getRecordFromReference in interface DataStore
        Parameters:
        reference - binary reference
        Returns:
        matching record, or null
        Throws:
        DataStoreException - if the data store could not be accessed