diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-03 12:41:07 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-03 12:41:07 +0200 |
commit | 77562cdae63e0ec7b09e8ece6af97165ba9e48dd (patch) | |
tree | b24d23335fd856881b7284532e7d4d36caa5ca13 /common/sourcewriteback.h | |
parent | 6569a6dceec10c77578184ce68c26e20ba27fa39 (diff) | |
download | sink-77562cdae63e0ec7b09e8ece6af97165ba9e48dd.tar.gz sink-77562cdae63e0ec7b09e8ece6af97165ba9e48dd.zip |
A way to retrieve the last revision during changereplay.
Diffstat (limited to 'common/sourcewriteback.h')
-rw-r--r-- | common/sourcewriteback.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/sourcewriteback.h b/common/sourcewriteback.h index 6c6eaab..9fe5c66 100644 --- a/common/sourcewriteback.h +++ b/common/sourcewriteback.h | |||
@@ -48,6 +48,12 @@ protected: | |||
48 | //Read/Write access to sync storage | 48 | //Read/Write access to sync storage |
49 | RemoteIdMap &syncStore(); | 49 | RemoteIdMap &syncStore(); |
50 | 50 | ||
51 | template <typename T> | ||
52 | T getPrevious(const T &entity) | ||
53 | { | ||
54 | return store().readPrevious<T>(entity.identifier(), entity.revision()); | ||
55 | } | ||
56 | |||
51 | private: | 57 | private: |
52 | //Read only access to main storage | 58 | //Read only access to main storage |
53 | EntityStore &store(); | 59 | EntityStore &store(); |