summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/domain/applicationdomaintype.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h
index 9650a21..5ecd9eb 100644
--- a/common/domain/applicationdomaintype.h
+++ b/common/domain/applicationdomaintype.h
@@ -24,6 +24,7 @@
24#include <QVariant> 24#include <QVariant>
25#include <QByteArray> 25#include <QByteArray>
26#include <QDebug> 26#include <QDebug>
27#include <QUuid>
27#include "bufferadaptor.h" 28#include "bufferadaptor.h"
28 29
29namespace Sink { 30namespace Sink {
@@ -55,6 +56,14 @@ public:
55 return QSharedPointer<DomainType>::create(domainType.mResourceInstanceIdentifier, QByteArray(domainType.mIdentifier.constData(), domainType.mIdentifier.size()), domainType.mRevision, memoryAdaptor); 56 return QSharedPointer<DomainType>::create(domainType.mResourceInstanceIdentifier, QByteArray(domainType.mIdentifier.constData(), domainType.mIdentifier.size()), domainType.mRevision, memoryAdaptor);
56 } 57 }
57 58
59 template <class DomainType>
60 static DomainType createEntity()
61 {
62 DomainType object;
63 object.mIdentifier = QUuid::createUuid().toByteArray();
64 return object;
65 }
66
58 virtual ~ApplicationDomainType(); 67 virtual ~ApplicationDomainType();
59 68
60 bool hasProperty(const QByteArray &key) const; 69 bool hasProperty(const QByteArray &key) const;