diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-27 16:00:50 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-27 16:00:50 -0600 |
commit | 5275b0f173579162176e2340cbb9eaedafe8334a (patch) | |
tree | bc0d47d4609c39950a44f0346f6231500b9bc1b0 /common | |
parent | 4333b8fe03d50ae9cfd5dfb5c656cc48302dc072 (diff) | |
download | sink-5275b0f173579162176e2340cbb9eaedafe8334a.tar.gz sink-5275b0f173579162176e2340cbb9eaedafe8334a.zip |
Adjusted docs and test.
Diffstat (limited to 'common')
-rw-r--r-- | common/domain/applicationdomaintype.h | 10 | ||||
-rw-r--r-- | common/store.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index 602d54c..1250455 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h | |||
@@ -270,7 +270,17 @@ public: | |||
270 | bool hasProperty(const QByteArray &key) const; | 270 | bool hasProperty(const QByteArray &key) const; |
271 | 271 | ||
272 | QVariant getProperty(const QByteArray &key) const; | 272 | QVariant getProperty(const QByteArray &key) const; |
273 | |||
274 | /** | ||
275 | * Set a property and record a changed property | ||
276 | * | ||
277 | * If the propery is available and did not change the call will be ignored. | ||
278 | */ | ||
273 | void setProperty(const QByteArray &key, const QVariant &value); | 279 | void setProperty(const QByteArray &key, const QVariant &value); |
280 | |||
281 | /** | ||
282 | * Convenience method to set a reference property. | ||
283 | */ | ||
274 | void setProperty(const QByteArray &key, const ApplicationDomainType &value); | 284 | void setProperty(const QByteArray &key, const ApplicationDomainType &value); |
275 | 285 | ||
276 | QByteArray getBlobProperty(const QByteArray &key) const; | 286 | QByteArray getBlobProperty(const QByteArray &key) const; |
diff --git a/common/store.h b/common/store.h index 34e14df..3ad547e 100644 --- a/common/store.h +++ b/common/store.h | |||
@@ -75,12 +75,15 @@ KAsync::Job<void> SINK_EXPORT create(const DomainType &domainObject); | |||
75 | * Modify an entity. | 75 | * Modify an entity. |
76 | * | 76 | * |
77 | * This includes moving etc. since these are also simple settings on a property. | 77 | * This includes moving etc. since these are also simple settings on a property. |
78 | * Note that the modification will be dropped if there is no changedProperty on the domain object. | ||
78 | */ | 79 | */ |
79 | template <class DomainType> | 80 | template <class DomainType> |
80 | KAsync::Job<void> SINK_EXPORT modify(const DomainType &domainObject); | 81 | KAsync::Job<void> SINK_EXPORT modify(const DomainType &domainObject); |
81 | 82 | ||
82 | /** | 83 | /** |
83 | * Modify a set of entities identified by @param query. | 84 | * Modify a set of entities identified by @param query. |
85 | * | ||
86 | * Note that the modification will be dropped if there is no changedProperty on the domain object. | ||
84 | */ | 87 | */ |
85 | template <class DomainType> | 88 | template <class DomainType> |
86 | KAsync::Job<void> SINK_EXPORT modify(const Query &query, const DomainType &domainObject); | 89 | KAsync::Job<void> SINK_EXPORT modify(const Query &query, const DomainType &domainObject); |