diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/domain/applicationdomaintype.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index d969cc8..0742cfc 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h | |||
@@ -134,6 +134,17 @@ public: | |||
134 | return object; | 134 | return object; |
135 | } | 135 | } |
136 | 136 | ||
137 | template <class DomainType> | ||
138 | static DomainType createEntity(const QByteArray &resourceInstanceIdentifier, const QByteArray &identifier) | ||
139 | { | ||
140 | if (identifier.isEmpty()) { | ||
141 | return createEntity<DomainType>(resourceInstanceIdentifier); | ||
142 | } | ||
143 | DomainType object(resourceInstanceIdentifier); | ||
144 | object.mIdentifier = identifier; | ||
145 | return object; | ||
146 | } | ||
147 | |||
137 | virtual ~ApplicationDomainType(); | 148 | virtual ~ApplicationDomainType(); |
138 | 149 | ||
139 | bool hasProperty(const QByteArray &key) const; | 150 | bool hasProperty(const QByteArray &key) const; |