From a5eb20dd70160f437835d4f5dffb27d8a912709d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 3 May 2016 13:37:50 +0200 Subject: Create entities with set resourceInstanceIdentifier --- common/domain/applicationdomaintype.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'common') diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index f7e681a..1486f00 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h @@ -64,6 +64,14 @@ public: return object; } + template + static DomainType createEntity(const QByteArray &resourceInstanceIdentifier) + { + DomainType object(resourceInstanceIdentifier); + object.mIdentifier = QUuid::createUuid().toByteArray(); + return object; + } + virtual ~ApplicationDomainType(); bool hasProperty(const QByteArray &key) const; -- cgit v1.2.3