public interface PersistenceInterface
Modifier and Type | Method and Description |
---|---|
<T extends PersistentRecord> |
createNew(RecordMeta<T> meta)
Creates a new instance of this type of PersistentRecord.
|
<T extends PersistentRecord> |
createNew(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> |
find(RecordMeta<T> meta,
java.lang.Object... primaryKeys)
Tries to find a record with the given keys.
|
<T extends PersistentRecord> |
find(SDataSet owner,
RecordMeta<T> meta,
java.lang.Object... primaryKeys)
Tries to find a record with the given keys.
|
PersistenceSession |
getSession() |
PersistenceSession |
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> |
query(SQuery<T> query) |
<T extends PersistentRecord> |
queryOne(SQuery<T> query)
Returns the first result from the query, or null if there were no results
|
void |
save(PersistentRecord record)
Saves a previously loaded PersistentRecord instance with any changes back to the internal database
|
PersistenceSession getSession()
PersistenceSession getSession(SDataSet dataset)
<T extends PersistentRecord> T createNew(RecordMeta<T> meta)
<T extends PersistentRecord> T createNew(RecordMeta<T> meta, SDataSet owner)
void save(PersistentRecord record) throws SException
SException
<T extends PersistentRecord> T find(RecordMeta<T> meta, java.lang.Object... primaryKeys)
<T extends PersistentRecord> T find(SDataSet owner, RecordMeta<T> meta, java.lang.Object... primaryKeys)
@Nonnull <T extends PersistentRecord> java.util.List<T> query(SQuery<T> query)
<T extends PersistentRecord> T queryOne(SQuery<T> query)
void notifyRecordAdded(PersistentRecord record) throws java.lang.Exception
java.lang.Exception
void notifyRecordUpdated(PersistentRecord record) throws java.lang.Exception
java.lang.Exception
void notifyRecordDeleted(RecordMeta<?> recordType, KeyValue key) throws java.lang.Exception
java.lang.Exception