Interface PersistenceInterface
public interface PersistenceInterface
-
Method Summary
Modifier and TypeMethodDescription<T extends PersistentRecord>
TcreateNew
(RecordMeta<T> meta) Creates a new instance of this type of PersistentRecord.<T extends PersistentRecord>
TcreateNew
(RecordMeta<T> meta, SDataSet owner) Creates a new instance of this type of PersistentRecord that will be a member of the given SDataSet.<T extends PersistentRecord>
Tfind
(RecordMeta<T> meta, Object... primaryKeys) Tries to find a record with the given keys.<T extends PersistentRecord>
Tfind
(SDataSet owner, RecordMeta<T> meta, Object... primaryKeys) Tries to find a record with the given keys.getSession
(SDataSet dataset) void
notifyRecordAdded
(PersistentRecord record) Notifies any listeners of the record's RecordMeta type across the cluster that the record has been added.void
notifyRecordDeleted
(RecordMeta<?> recordType, KeyValue key) Notifies any listeners of the record's RecordMeta type across the cluster that the record has been deleted.void
notifyRecordUpdated
(PersistentRecord record) Notifies any listeners of the record's RecordMeta type across the cluster that the record has been updated.<T extends PersistentRecord>
List<T><T extends PersistentRecord>
TReturns the first result from the query, or null if there were no resultsvoid
save
(PersistentRecord record) Saves a previously loaded PersistentRecord instance with any changes back to the internal database
-
Method Details
-
getSession
PersistenceSession getSession() -
getSession
-
createNew
Creates a new instance of this type of PersistentRecord. Doesn't add to the database. -
createNew
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
Saves a previously loaded PersistentRecord instance with any changes back to the internal database- Throws:
SException
-
find
Tries to find a record with the given keys. Returns null if no matching record is found -
find
Tries to find a record with the given keys. Returns null if no matching record is found -
query
-
queryOne
Returns the first result from the query, or null if there were no results -
notifyRecordAdded
Notifies any listeners of the record's RecordMeta type across the cluster that the record has been added.- Throws:
Exception
-
notifyRecordUpdated
Notifies any listeners of the record's RecordMeta type across the cluster that the record has been updated.- Throws:
Exception
-
notifyRecordDeleted
Notifies any listeners of the record's RecordMeta type across the cluster that the record has been deleted.- Throws:
Exception
-