Interface PersistenceInterface


  • public interface PersistenceInterface
    • Method Detail

      • createNew

        <T extends PersistentRecord> T createNew​(RecordMeta<T> meta)
        Creates a new instance of this type of PersistentRecord. Doesn't add to the database.
      • createNew

        <T extends PersistentRecord> T createNew​(RecordMeta<T> meta,
                                                 SDataSet owner)
        Creates a new instance of this type of PersistentRecord that will be a member of the given SDataSet. Doesn't add to the database.
      • save

        void save​(PersistentRecord record)
           throws SException
        Saves a previously loaded PersistentRecord instance with any changes back to the internal database
        Throws:
        SException
      • find

        <T extends PersistentRecord> T find​(RecordMeta<T> meta,
                                            java.lang.Object... primaryKeys)
        Tries to find a record with the given keys. Returns null if no matching record is found
      • find

        <T extends PersistentRecord> T find​(SDataSet owner,
                                            RecordMeta<T> meta,
                                            java.lang.Object... primaryKeys)
        Tries to find a record with the given keys. Returns null if no matching record is found
      • queryOne

        <T extends PersistentRecord> T queryOne​(SQuery<T> query)
        Returns the first result from the query, or null if there were no results
      • notifyRecordAdded

        void notifyRecordAdded​(PersistentRecord record)
                        throws java.lang.Exception
        Notifies any listeners of the record's RecordMeta type across the cluster that the record has been added.
        Throws:
        java.lang.Exception
      • notifyRecordUpdated

        void notifyRecordUpdated​(PersistentRecord record)
                          throws java.lang.Exception
        Notifies any listeners of the record's RecordMeta type across the cluster that the record has been updated.
        Throws:
        java.lang.Exception
      • notifyRecordDeleted

        void notifyRecordDeleted​(RecordMeta<?> recordType,
                                 KeyValue key)
                          throws java.lang.Exception
        Notifies any listeners of the record's RecordMeta type across the cluster that the record has been deleted.
        Throws:
        java.lang.Exception