/*
 * This class was automatically generated with 
 * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
 * Schema.
 * $Id$
 */

package nz.co.cks.tms.xml;

  //---------------------------------/
 //- Imported classes and packages -/
//---------------------------------/

import java.io.Reader;
import java.io.Serializable;
import java.io.Writer;
import java.math.BigDecimal;
import org.exolab.castor.xml.Marshaller;
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.ValidationException;

/**
 * Class PurchaseItemType.
 * 
 * @version $Revision$ $Date$
 */
public abstract class PurchaseItemType implements java.io.Serializable {


      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * Field _itemCode
     */
    private java.lang.String _itemCode;

    /**
     * Field _itemCost
     */
    private java.math.BigDecimal _itemCost;

    /**
     * Field _itemQuantity
     */
    private int _itemQuantity;

    /**
     * keeps track of state for field: _itemQuantity
     */
    private boolean _has_itemQuantity;

    /**
     * Field _serviceCode
     */
    private java.lang.String _serviceCode;

    /**
     * Field _serviceRequest
     */
    private java.lang.String _serviceRequest;

    /**
     * Field _serviceResponse
     */
    private java.lang.String _serviceResponse;

    /**
     * Field _serviceSessionId
     */
    private java.lang.String _serviceSessionId;

    /**
     * Field _customerOnChargeRef
     */
    private java.lang.String _customerOnChargeRef;

    /**
     * Field _deliveryMethod
     */
    private java.lang.String _deliveryMethod;

    /**
     * Field _deliveryTrackingRef
     */
    private java.lang.String _deliveryTrackingRef;

    /**
     * Field _voucherPresented
     */
    private java.lang.String _voucherPresented;


      //----------------/
     //- Constructors -/
    //----------------/

    public PurchaseItemType() {
        super();
    } //-- nz.co.cks.tms.xml.PurchaseItemType()


      //-----------/
     //- Methods -/
    //-----------/

    /**
     * Method getCustomerOnChargeRefReturns the value of field
     * 'customerOnChargeRef'.
     * 
     * @return the value of field 'customerOnChargeRef'.
     */
    public java.lang.String getCustomerOnChargeRef()
    {
        return this._customerOnChargeRef;
    } //-- java.lang.String getCustomerOnChargeRef() 

    /**
     * Method getDeliveryMethodReturns the value of field
     * 'deliveryMethod'.
     * 
     * @return the value of field 'deliveryMethod'.
     */
    public java.lang.String getDeliveryMethod()
    {
        return this._deliveryMethod;
    } //-- java.lang.String getDeliveryMethod() 

    /**
     * Method getDeliveryTrackingRefReturns the value of field
     * 'deliveryTrackingRef'.
     * 
     * @return the value of field 'deliveryTrackingRef'.
     */
    public java.lang.String getDeliveryTrackingRef()
    {
        return this._deliveryTrackingRef;
    } //-- java.lang.String getDeliveryTrackingRef() 

    /**
     * Method getItemCodeReturns the value of field 'itemCode'.
     * 
     * @return the value of field 'itemCode'.
     */
    public java.lang.String getItemCode()
    {
        return this._itemCode;
    } //-- java.lang.String getItemCode() 

    /**
     * Method getItemCostReturns the value of field 'itemCost'.
     * 
     * @return the value of field 'itemCost'.
     */
    public java.math.BigDecimal getItemCost()
    {
        return this._itemCost;
    } //-- java.math.BigDecimal getItemCost() 

    /**
     * Method getItemQuantityReturns the value of field
     * 'itemQuantity'.
     * 
     * @return the value of field 'itemQuantity'.
     */
    public int getItemQuantity()
    {
        return this._itemQuantity;
    } //-- int getItemQuantity() 

    /**
     * Method getServiceCodeReturns the value of field
     * 'serviceCode'.
     * 
     * @return the value of field 'serviceCode'.
     */
    public java.lang.String getServiceCode()
    {
        return this._serviceCode;
    } //-- java.lang.String getServiceCode() 

    /**
     * Method getServiceRequestReturns the value of field
     * 'serviceRequest'.
     * 
     * @return the value of field 'serviceRequest'.
     */
    public java.lang.String getServiceRequest()
    {
        return this._serviceRequest;
    } //-- java.lang.String getServiceRequest() 

    /**
     * Method getServiceResponseReturns the value of field
     * 'serviceResponse'.
     * 
     * @return the value of field 'serviceResponse'.
     */
    public java.lang.String getServiceResponse()
    {
        return this._serviceResponse;
    } //-- java.lang.String getServiceResponse() 

    /**
     * Method getServiceSessionIdReturns the value of field
     * 'serviceSessionId'.
     * 
     * @return the value of field 'serviceSessionId'.
     */
    public java.lang.String getServiceSessionId()
    {
        return this._serviceSessionId;
    } //-- java.lang.String getServiceSessionId() 

    /**
     * Method getVoucherPresentedReturns the value of field
     * 'voucherPresented'.
     * 
     * @return the value of field 'voucherPresented'.
     */
    public java.lang.String getVoucherPresented()
    {
        return this._voucherPresented;
    } //-- java.lang.String getVoucherPresented() 

    /**
     * Method hasItemQuantity
     */
    public boolean hasItemQuantity()
    {
        return this._has_itemQuantity;
    } //-- boolean hasItemQuantity() 

    /**
     * Method isValid
     */
    public boolean isValid()
    {
        try {
            validate();
        }
        catch (org.exolab.castor.xml.ValidationException vex) {
            return false;
        }
        return true;
    } //-- boolean isValid() 

    /**
     * Method setCustomerOnChargeRefSets the value of field
     * 'customerOnChargeRef'.
     * 
     * @param customerOnChargeRef the value of field
     * 'customerOnChargeRef'.
     */
    public void setCustomerOnChargeRef(java.lang.String customerOnChargeRef)
    {
        this._customerOnChargeRef = customerOnChargeRef;
    } //-- void setCustomerOnChargeRef(java.lang.String) 

    /**
     * Method setDeliveryMethodSets the value of field
     * 'deliveryMethod'.
     * 
     * @param deliveryMethod the value of field 'deliveryMethod'.
     */
    public void setDeliveryMethod(java.lang.String deliveryMethod)
    {
        this._deliveryMethod = deliveryMethod;
    } //-- void setDeliveryMethod(java.lang.String) 

    /**
     * Method setDeliveryTrackingRefSets the value of field
     * 'deliveryTrackingRef'.
     * 
     * @param deliveryTrackingRef the value of field
     * 'deliveryTrackingRef'.
     */
    public void setDeliveryTrackingRef(java.lang.String deliveryTrackingRef)
    {
        this._deliveryTrackingRef = deliveryTrackingRef;
    } //-- void setDeliveryTrackingRef(java.lang.String) 

    /**
     * Method setItemCodeSets the value of field 'itemCode'.
     * 
     * @param itemCode the value of field 'itemCode'.
     */
    public void setItemCode(java.lang.String itemCode)
    {
        this._itemCode = itemCode;
    } //-- void setItemCode(java.lang.String) 

    /**
     * Method setItemCostSets the value of field 'itemCost'.
     * 
     * @param itemCost the value of field 'itemCost'.
     */
    public void setItemCost(java.math.BigDecimal itemCost)
    {
        this._itemCost = itemCost;
    } //-- void setItemCost(java.math.BigDecimal) 

    /**
     * Method setItemQuantitySets the value of field
     * 'itemQuantity'.
     * 
     * @param itemQuantity the value of field 'itemQuantity'.
     */
    public void setItemQuantity(int itemQuantity)
    {
        this._itemQuantity = itemQuantity;
        this._has_itemQuantity = true;
    } //-- void setItemQuantity(int) 

    /**
     * Method setServiceCodeSets the value of field 'serviceCode'.
     * 
     * @param serviceCode the value of field 'serviceCode'.
     */
    public void setServiceCode(java.lang.String serviceCode)
    {
        this._serviceCode = serviceCode;
    } //-- void setServiceCode(java.lang.String) 

    /**
     * Method setServiceRequestSets the value of field
     * 'serviceRequest'.
     * 
     * @param serviceRequest the value of field 'serviceRequest'.
     */
    public void setServiceRequest(java.lang.String serviceRequest)
    {
        this._serviceRequest = serviceRequest;
    } //-- void setServiceRequest(java.lang.String) 

    /**
     * Method setServiceResponseSets the value of field
     * 'serviceResponse'.
     * 
     * @param serviceResponse the value of field 'serviceResponse'.
     */
    public void setServiceResponse(java.lang.String serviceResponse)
    {
        this._serviceResponse = serviceResponse;
    } //-- void setServiceResponse(java.lang.String) 

    /**
     * Method setServiceSessionIdSets the value of field
     * 'serviceSessionId'.
     * 
     * @param serviceSessionId the value of field 'serviceSessionId'
     */
    public void setServiceSessionId(java.lang.String serviceSessionId)
    {
        this._serviceSessionId = serviceSessionId;
    } //-- void setServiceSessionId(java.lang.String) 

    /**
     * Method setVoucherPresentedSets the value of field
     * 'voucherPresented'.
     * 
     * @param voucherPresented the value of field 'voucherPresented'
     */
    public void setVoucherPresented(java.lang.String voucherPresented)
    {
        this._voucherPresented = voucherPresented;
    } //-- void setVoucherPresented(java.lang.String) 

    /**
     * Method validate
     */
    public void validate()
        throws org.exolab.castor.xml.ValidationException
    {
        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
        validator.validate(this);
    } //-- void validate() 

}
