1 #include "DependentPriceSpecification.h"
3 #include "smartapi/common/RESOURCE.h"
6 DependentPriceSpecification::DependentPriceSpecification(QString identifierUri) :
7 PriceSpecification(identifierUri)
9 INIT_PROPERTYLIST(mConditions, PROPERTY__LIST);
10 mConditions.setListType(List::ListLinked);
13 DependentPriceSpecification::DependentPriceSpecification(QString unit, QString secondaryUnit, QString secondaryQuantity, QDateTime validFrom, QDateTime validThrough) :
14 DependentPriceSpecification()
16 setQuantity(RESOURCE__CURRENCY);
18 setSecondaryUnit(secondaryUnit);
19 setSecondaryQuantity(secondaryQuantity);
20 setValidFrom(validFrom);
21 setValidThrough(validThrough);
24 DependentPriceSpecification::DependentPriceSpecification(DependentPriceSpecification* o) :
27 SET_PROPERTYLIST_REFERENCE(PROPERTY__LIST,mConditions,Condition);
30 DependentPriceSpecification::~DependentPriceSpecification()
34 void DependentPriceSpecification::clearReferences(QSet<GraphItem*>* trash)
36 INIT_CLEAR(PriceSpecification,trash);
37 FINISH_CLEAR(PriceSpecification,trash);
40 Resource* DependentPriceSpecification::serialize(Model* model)
42 INIT_SERIALIZE(PriceSpecification,model)
43 FINISH_SERIALIZE(PriceSpecification)
46 void DependentPriceSpecification::parse(Statement* statement)
49 PARSE_LIST_AS(PROPERTY__LIST, setConditions, Condition)
50 FINISH_PARSE(PriceSpecification)