diff options
Diffstat (limited to 'common/domain/applicationdomaintype.h')
-rw-r--r-- | common/domain/applicationdomaintype.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index a41882d..b011eb5 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <QDebug> | 27 | #include <QDebug> |
28 | #include <QUuid> | 28 | #include <QUuid> |
29 | #include "bufferadaptor.h" | 29 | #include "bufferadaptor.h" |
30 | #include "storage.h" //for generateUid() | ||
31 | 30 | ||
32 | #define SINK_ENTITY(TYPE) \ | 31 | #define SINK_ENTITY(TYPE) \ |
33 | typedef QSharedPointer<TYPE> Ptr; \ | 32 | typedef QSharedPointer<TYPE> Ptr; \ |
@@ -102,11 +101,13 @@ public: | |||
102 | return QSharedPointer<DomainType>::create(domainType.mResourceInstanceIdentifier, QByteArray(domainType.mIdentifier.constData(), domainType.mIdentifier.size()), domainType.mRevision, memoryAdaptor); | 101 | return QSharedPointer<DomainType>::create(domainType.mResourceInstanceIdentifier, QByteArray(domainType.mIdentifier.constData(), domainType.mIdentifier.size()), domainType.mRevision, memoryAdaptor); |
103 | } | 102 | } |
104 | 103 | ||
104 | static QByteArray generateUid(); | ||
105 | |||
105 | template <class DomainType> | 106 | template <class DomainType> |
106 | static DomainType createEntity() | 107 | static DomainType createEntity() |
107 | { | 108 | { |
108 | DomainType object; | 109 | DomainType object; |
109 | object.mIdentifier = Sink::Storage::generateUid(); | 110 | object.mIdentifier = generateUid(); |
110 | return object; | 111 | return object; |
111 | } | 112 | } |
112 | 113 | ||
@@ -114,7 +115,7 @@ public: | |||
114 | static DomainType createEntity(const QByteArray &resourceInstanceIdentifier) | 115 | static DomainType createEntity(const QByteArray &resourceInstanceIdentifier) |
115 | { | 116 | { |
116 | DomainType object(resourceInstanceIdentifier); | 117 | DomainType object(resourceInstanceIdentifier); |
117 | object.mIdentifier = Sink::Storage::generateUid(); | 118 | object.mIdentifier = generateUid(); |
118 | return object; | 119 | return object; |
119 | } | 120 | } |
120 | 121 | ||