MagicSmoke  $VERSION$
MOCartOrder Class Reference

The cart as used from the remote (non-web) system, this is a transaction object, it has no equivalent inside the database. More...

#include <srcMOCartOrder.h>

Inheritance diagram for MOCartOrder:

Public Types

enum  ValidationState { Ok =0, Invalid =1 }
 

Public Member Functions

 MOCartOrder ()
 default constructor: constructs an invalid instance of MOCartOrder More...
 
 MOCartOrder (const MOCartOrder &)
 copy constructor: creates a (deep) copy of the object More...
 
 MOCartOrder (const QDomElement &)
 special constructor: create from the XML representation, deserializing the object More...
 
virtual ~MOCartOrder ()
 destructor: deletes this copy of the object More...
 
virtual void additems (Nullable< MOCartItem > a)
 
virtual void addtickets (Nullable< MOCartTicket > a)
 
virtual void addvouchers (Nullable< MOCartVoucher > a)
 
virtual Nullable< qint64 > cartid () const
 optional ID for the cart itself, the calling process can use this to distinguish different carts, the server must preserve it between input and output More...
 
virtual void clearitems ()
 
virtual void cleartickets ()
 
virtual void clearvouchers ()
 
virtual Nullable< QString > comment () const
 
virtual Nullable< QString > couponid () const
 An optional coupon code to be used in this order. More...
 
virtual Nullable< qint64 > customerid () const
 
virtual Nullable< qint64 > deliveryaddressid () const
 
virtual Nullable< qint64 > invoiceaddressid () const
 
virtual QList< MOCartItemitems () const
 
MOCartOrderoperator= (const MOCartOrder &)
 copy assignment: creates a (deep) copy of the object More...
 
 Q_ENUMS (ValidationState)
 
virtual void setcartid (Nullable< qint64 > s)
 optional ID for the cart itself, the calling process can use this to distinguish different carts, the server must preserve it between input and output More...
 
virtual void setcomment (Nullable< QString > s)
 
virtual void setcouponid (Nullable< QString > s)
 An optional coupon code to be used in this order. More...
 
virtual void setcustomerid (Nullable< qint64 > s)
 
virtual void setdeliveryaddressid (Nullable< qint64 > s)
 
virtual void setinvoiceaddressid (Nullable< qint64 > s)
 
virtual void setitems (QList< MOCartItem > s)
 
virtual void setshippingtypeid (Nullable< qint64 > s)
 
virtual void setstatus (Nullable< ValidationState > s)
 set by the server to reflect the processing state of the cart More...
 
virtual void settickets (QList< MOCartTicket > s)
 
virtual void setvouchers (QList< MOCartVoucher > s)
 
virtual Nullable< qint64 > shippingtypeid () const
 
virtual Nullable< ValidationStatestatus () const
 set by the server to reflect the processing state of the cart More...
 
virtual QList< MOCartTickettickets () const
 
QString toString ()
 Serializes the object to XML and returns the string representation of that XML. More...
 
QDomElement toXml (QDomDocument &doc, QString name="CartOrder")
 Transforms the object into its XML representation, the element node returned is not appended to the document - you have to do that yourself. More...
 
void toXml (QDomDocument &, QDomElement &)
 Serializes the object into the given element. More...
 
virtual QList< MOCartVouchervouchers () const
 

Static Public Member Functions

static MOCartOrder fromString (const QString &)
 create MOCartOrder from XML formatted string (inverse of toString) More...
 
static MOCartOrder fromXml (const QDomElement &)
 create MOCartOrder from XML (inverse of toXml) More...
 
static ValidationState locstr2ValidationState (QString, bool *ok=0)
 Converts a localized string into the corresponding enum ValidationState value. More...
 
static ValidationState str2ValidationState (QString, bool *ok=0)
 Converts string into the corresponding enum ValidationState value. More...
 
static QString ValidationState2locstr (ValidationState)
 Converts enum ValidationState value into the corresponding localized string. More...
 
static QString ValidationState2str (ValidationState)
 Converts enum ValidationState value into the corresponding string. More...
 

Protected Attributes

Nullable< qint64 > mp_cartid
 
Nullable< QString > mp_comment
 
Nullable< QString > mp_couponid
 
Nullable< qint64 > mp_customerid
 
Nullable< qint64 > mp_deliveryaddressid
 
Nullable< qint64 > mp_invoiceaddressid
 
QList< MOCartItemmp_items
 
Nullable< qint64 > mp_shippingtypeid
 
Nullable< ValidationStatemp_status
 
QList< MOCartTicketmp_tickets
 
QList< MOCartVouchermp_vouchers
 

Properties

Nullable< qint64 > cartid
 optional ID for the cart itself, the calling process can use this to distinguish different carts, the server must preserve it between input and output More...
 
Nullable< QString > comment
 
Nullable< QString > couponid
 An optional coupon code to be used in this order. More...
 
Nullable< qint64 > customerid
 
Nullable< qint64 > deliveryaddressid
 
Nullable< qint64 > invoiceaddressid
 
QList< MOCartItemitems
 
Nullable< qint64 > shippingtypeid
 
Nullable< ValidationStatestatus
 set by the server to reflect the processing state of the cart More...
 
QList< MOCartTickettickets
 
QList< MOCartVouchervouchers
 

Detailed Description

The cart as used from the remote (non-web) system, this is a transaction object, it has no equivalent inside the database.

Member Enumeration Documentation

Enumerator
Ok 

The cart has been processed successfully.

Invalid 

There are problems with the cart, it cannot be processed.

Constructor & Destructor Documentation

MOCartOrder::MOCartOrder ( )
inline

default constructor: constructs an invalid instance of MOCartOrder

Referenced by fromString(), and fromXml().

MOCartOrder::MOCartOrder ( const MOCartOrder o)

copy constructor: creates a (deep) copy of the object

References mp_cartid, mp_comment, mp_couponid, mp_customerid, mp_deliveryaddressid, mp_invoiceaddressid, mp_items, mp_shippingtypeid, mp_status, mp_tickets, and mp_vouchers.

MOCartOrder::MOCartOrder ( const QDomElement &  root)
explicit

special constructor: create from the XML representation, deserializing the object

References additems(), addtickets(), addvouchers(), setcartid(), setcomment(), setcouponid(), setcustomerid(), setdeliveryaddressid(), setinvoiceaddressid(), setshippingtypeid(), setstatus(), and str2ValidationState().

virtual MOCartOrder::~MOCartOrder ( )
inlinevirtual

destructor: deletes this copy of the object

Member Function Documentation

virtual void MOCartOrder::additems ( Nullable< MOCartItem a)
inlinevirtual

Referenced by MOCartOrder().

virtual void MOCartOrder::addtickets ( Nullable< MOCartTicket a)
inlinevirtual

Referenced by MOCartOrder().

virtual void MOCartOrder::addvouchers ( Nullable< MOCartVoucher a)
inlinevirtual

Referenced by MOCartOrder().

virtual Nullable<qint64> MOCartOrder::cartid ( ) const
inlinevirtual

optional ID for the cart itself, the calling process can use this to distinguish different carts, the server must preserve it between input and output

virtual void MOCartOrder::clearitems ( )
inlinevirtual
virtual void MOCartOrder::cleartickets ( )
inlinevirtual
virtual void MOCartOrder::clearvouchers ( )
inlinevirtual
virtual Nullable<QString> MOCartOrder::comment ( ) const
inlinevirtual
virtual Nullable<QString> MOCartOrder::couponid ( ) const
inlinevirtual

An optional coupon code to be used in this order.

virtual Nullable<qint64> MOCartOrder::customerid ( ) const
inlinevirtual
virtual Nullable<qint64> MOCartOrder::deliveryaddressid ( ) const
inlinevirtual
MOCartOrder MOCartOrder::fromString ( const QString &  txt)
static

create MOCartOrder from XML formatted string (inverse of toString)

References MOCartOrder().

MOCartOrder MOCartOrder::fromXml ( const QDomElement &  root)
static

create MOCartOrder from XML (inverse of toXml)

References MOCartOrder().

virtual Nullable<qint64> MOCartOrder::invoiceaddressid ( ) const
inlinevirtual
virtual QList<MOCartItem> MOCartOrder::items ( ) const
inlinevirtual
MOCartOrder::ValidationState MOCartOrder::locstr2ValidationState ( QString  s,
bool *  ok = 0 
)
static

Converts a localized string into the corresponding enum ValidationState value.

References Invalid, and Ok.

MOCartOrder & MOCartOrder::operator= ( const MOCartOrder o)
MOCartOrder::Q_ENUMS ( ValidationState  )
virtual void MOCartOrder::setcartid ( Nullable< qint64 >  s)
inlinevirtual

optional ID for the cart itself, the calling process can use this to distinguish different carts, the server must preserve it between input and output

Referenced by MOCartOrder().

virtual void MOCartOrder::setcomment ( Nullable< QString >  s)
inlinevirtual

Referenced by MOCartOrder().

virtual void MOCartOrder::setcouponid ( Nullable< QString >  s)
inlinevirtual

An optional coupon code to be used in this order.

Referenced by MOCartOrder().

virtual void MOCartOrder::setcustomerid ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOCartOrder().

virtual void MOCartOrder::setdeliveryaddressid ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOCartOrder().

virtual void MOCartOrder::setinvoiceaddressid ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOCartOrder().

virtual void MOCartOrder::setitems ( QList< MOCartItem s)
inlinevirtual
virtual void MOCartOrder::setshippingtypeid ( Nullable< qint64 >  s)
inlinevirtual

Referenced by MOCartOrder().

virtual void MOCartOrder::setstatus ( Nullable< ValidationState s)
inlinevirtual

set by the server to reflect the processing state of the cart

Referenced by MOCartOrder().

virtual void MOCartOrder::settickets ( QList< MOCartTicket s)
inlinevirtual
virtual void MOCartOrder::setvouchers ( QList< MOCartVoucher s)
inlinevirtual
virtual Nullable<qint64> MOCartOrder::shippingtypeid ( ) const
inlinevirtual
virtual Nullable<ValidationState> MOCartOrder::status ( ) const
inlinevirtual

set by the server to reflect the processing state of the cart

MOCartOrder::ValidationState MOCartOrder::str2ValidationState ( QString  s,
bool *  ok = 0 
)
static

Converts string into the corresponding enum ValidationState value.

References Invalid, and Ok.

Referenced by MOCartOrder().

virtual QList<MOCartTicket> MOCartOrder::tickets ( ) const
inlinevirtual
QString MOCartOrder::toString ( )

Serializes the object to XML and returns the string representation of that XML.

References toXml().

QDomElement MOCartOrder::toXml ( QDomDocument &  doc,
QString  name = "CartOrder" 
)

Transforms the object into its XML representation, the element node returned is not appended to the document - you have to do that yourself.

Parameters
docthe DOM document node for which to generate the element
namethe name to give the generated element, per default "MOCartOrder" is used

Referenced by toString(), and toXml().

void MOCartOrder::toXml ( QDomDocument &  doc,
QDomElement &  r 
)
QString MOCartOrder::ValidationState2locstr ( ValidationState  e)
static

Converts enum ValidationState value into the corresponding localized string.

References Invalid, and Ok.

QString MOCartOrder::ValidationState2str ( ValidationState  e)
static

Converts enum ValidationState value into the corresponding string.

References Invalid, and Ok.

virtual QList<MOCartVoucher> MOCartOrder::vouchers ( ) const
inlinevirtual

Member Data Documentation

Nullable<qint64> MOCartOrder::mp_cartid
protected

Referenced by MOCartOrder(), operator=(), and toXml().

Nullable<QString> MOCartOrder::mp_comment
protected

Referenced by MOCartOrder(), operator=(), and toXml().

Nullable<QString> MOCartOrder::mp_couponid
protected

Referenced by MOCartOrder(), operator=(), and toXml().

Nullable<qint64> MOCartOrder::mp_customerid
protected

Referenced by MOCartOrder(), operator=(), and toXml().

Nullable<qint64> MOCartOrder::mp_deliveryaddressid
protected

Referenced by MOCartOrder(), operator=(), and toXml().

Nullable<qint64> MOCartOrder::mp_invoiceaddressid
protected

Referenced by MOCartOrder(), operator=(), and toXml().

QList<MOCartItem> MOCartOrder::mp_items
protected

Referenced by MOCartOrder(), operator=(), and toXml().

Nullable<qint64> MOCartOrder::mp_shippingtypeid
protected

Referenced by MOCartOrder(), operator=(), and toXml().

Nullable<ValidationState> MOCartOrder::mp_status
protected

Referenced by MOCartOrder(), operator=(), and toXml().

QList<MOCartTicket> MOCartOrder::mp_tickets
protected

Referenced by MOCartOrder(), operator=(), and toXml().

QList<MOCartVoucher> MOCartOrder::mp_vouchers
protected

Referenced by MOCartOrder(), operator=(), and toXml().

Property Documentation

Nullable<qint64> MOCartOrder::cartid
readwrite

optional ID for the cart itself, the calling process can use this to distinguish different carts, the server must preserve it between input and output

Nullable<QString> MOCartOrder::comment
readwrite
Nullable<QString> MOCartOrder::couponid
readwrite

An optional coupon code to be used in this order.

Nullable<qint64> MOCartOrder::customerid
readwrite
Nullable<qint64> MOCartOrder::deliveryaddressid
readwrite
Nullable<qint64> MOCartOrder::invoiceaddressid
readwrite
QList<MOCartItem> MOCartOrder::items
readwrite
Nullable<qint64> MOCartOrder::shippingtypeid
readwrite
Nullable<ValidationState> MOCartOrder::status
readwrite

set by the server to reflect the processing state of the cart

QList<MOCartTicket> MOCartOrder::tickets
readwrite
QList<MOCartVoucher> MOCartOrder::vouchers
readwrite

The documentation for this class was generated from the following files: