summaryrefslogtreecommitdiffstats
path: root/common/domain
diff options
context:
space:
mode:
Diffstat (limited to 'common/domain')
-rw-r--r--common/domain/applicationdomaintype.cpp16
-rw-r--r--common/domain/applicationdomaintype.h6
2 files changed, 22 insertions, 0 deletions
diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp
index 8bb74e3..c315e33 100644
--- a/common/domain/applicationdomaintype.cpp
+++ b/common/domain/applicationdomaintype.cpp
@@ -184,6 +184,7 @@ ApplicationDomainType& ApplicationDomainType::operator=(const ApplicationDomainT
184 mResourceInstanceIdentifier = other.mResourceInstanceIdentifier; 184 mResourceInstanceIdentifier = other.mResourceInstanceIdentifier;
185 mIdentifier = other.mIdentifier; 185 mIdentifier = other.mIdentifier;
186 mRevision = other.mRevision; 186 mRevision = other.mRevision;
187 mAggreatedIds = other.mAggreatedIds;
187 return *this; 188 return *this;
188} 189}
189 190
@@ -262,6 +263,21 @@ QByteArray ApplicationDomainType::identifier() const
262 return mIdentifier; 263 return mIdentifier;
263} 264}
264 265
266bool ApplicationDomainType::isAggregate() const
267{
268 return !mAggreatedIds.isEmpty();
269}
270
271QVector<QByteArray> ApplicationDomainType::aggregatedIds() const
272{
273 return mAggreatedIds;
274}
275
276QVector<QByteArray> &ApplicationDomainType::aggregatedIds()
277{
278 return mAggreatedIds;
279}
280
265SinkResource::SinkResource(const QByteArray &identifier) 281SinkResource::SinkResource(const QByteArray &identifier)
266 : ApplicationDomainType("", identifier, 0, QSharedPointer<BufferAdaptor>(new MemoryBufferAdaptor())) 282 : ApplicationDomainType("", identifier, 0, QSharedPointer<BufferAdaptor>(new MemoryBufferAdaptor()))
267{ 283{
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h
index b4db54e..dcd401c 100644
--- a/common/domain/applicationdomaintype.h
+++ b/common/domain/applicationdomaintype.h
@@ -268,6 +268,10 @@ public:
268 void setResource(const QByteArray &identifier); 268 void setResource(const QByteArray &identifier);
269 QByteArray identifier() const; 269 QByteArray identifier() const;
270 270
271 bool isAggregate() const;
272 QVector<QByteArray> aggregatedIds() const;
273 QVector<QByteArray> &aggregatedIds();
274
271private: 275private:
272 friend QDebug operator<<(QDebug, const ApplicationDomainType &); 276 friend QDebug operator<<(QDebug, const ApplicationDomainType &);
273 QSharedPointer<BufferAdaptor> mAdaptor; 277 QSharedPointer<BufferAdaptor> mAdaptor;
@@ -278,6 +282,8 @@ private:
278 QByteArray mResourceInstanceIdentifier; 282 QByteArray mResourceInstanceIdentifier;
279 QByteArray mIdentifier; 283 QByteArray mIdentifier;
280 qint64 mRevision; 284 qint64 mRevision;
285
286 QVector<QByteArray> mAggreatedIds;
281}; 287};
282 288
283/* 289/*