From 5275b0f173579162176e2340cbb9eaedafe8334a Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 27 Jul 2017 16:00:50 -0600 Subject: Adjusted docs and test. --- common/domain/applicationdomaintype.h | 10 ++++++++++ common/store.h | 3 +++ 2 files changed, 13 insertions(+) (limited to 'common') 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: bool hasProperty(const QByteArray &key) const; QVariant getProperty(const QByteArray &key) const; + + /** + * Set a property and record a changed property + * + * If the propery is available and did not change the call will be ignored. + */ void setProperty(const QByteArray &key, const QVariant &value); + + /** + * Convenience method to set a reference property. + */ void setProperty(const QByteArray &key, const ApplicationDomainType &value); 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 SINK_EXPORT create(const DomainType &domainObject); * Modify an entity. * * This includes moving etc. since these are also simple settings on a property. + * Note that the modification will be dropped if there is no changedProperty on the domain object. */ template KAsync::Job SINK_EXPORT modify(const DomainType &domainObject); /** * Modify a set of entities identified by @param query. + * + * Note that the modification will be dropped if there is no changedProperty on the domain object. */ template KAsync::Job SINK_EXPORT modify(const Query &query, const DomainType &domainObject); -- cgit v1.2.3