// **********************************************************************
//
// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.5.1
//
// <auto-generated>
//
// Generated from file `TicketServer.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//

package org.purchasenear.service.ticket.interf;

public class Order implements java.lang.Cloneable, java.io.Serializable
{
    public long orderId;

    public String phone;

    public String orderNum;

    public int orderDate;

    public int ticketType;

    public double amount;

    public int orderStatus;

    public Order()
    {
    }

    public Order(long orderId, String phone, String orderNum, int orderDate, int ticketType, double amount, int orderStatus)
    {
        this.orderId = orderId;
        this.phone = phone;
        this.orderNum = orderNum;
        this.orderDate = orderDate;
        this.ticketType = ticketType;
        this.amount = amount;
        this.orderStatus = orderStatus;
    }

    public boolean
    equals(java.lang.Object rhs)
    {
        if(this == rhs)
        {
            return true;
        }
        Order _r = null;
        if(rhs instanceof Order)
        {
            _r = (Order)rhs;
        }

        if(_r != null)
        {
            if(orderId != _r.orderId)
            {
                return false;
            }
            if(phone != _r.phone)
            {
                if(phone == null || _r.phone == null || !phone.equals(_r.phone))
                {
                    return false;
                }
            }
            if(orderNum != _r.orderNum)
            {
                if(orderNum == null || _r.orderNum == null || !orderNum.equals(_r.orderNum))
                {
                    return false;
                }
            }
            if(orderDate != _r.orderDate)
            {
                return false;
            }
            if(ticketType != _r.ticketType)
            {
                return false;
            }
            if(amount != _r.amount)
            {
                return false;
            }
            if(orderStatus != _r.orderStatus)
            {
                return false;
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int __h = 5381;
        __h = IceInternal.HashUtil.hashAdd(__h, "::interf::Order");
        __h = IceInternal.HashUtil.hashAdd(__h, orderId);
        __h = IceInternal.HashUtil.hashAdd(__h, phone);
        __h = IceInternal.HashUtil.hashAdd(__h, orderNum);
        __h = IceInternal.HashUtil.hashAdd(__h, orderDate);
        __h = IceInternal.HashUtil.hashAdd(__h, ticketType);
        __h = IceInternal.HashUtil.hashAdd(__h, amount);
        __h = IceInternal.HashUtil.hashAdd(__h, orderStatus);
        return __h;
    }

    public java.lang.Object
    clone()
    {
        java.lang.Object o = null;
        try
        {
            o = super.clone();
        }
        catch(CloneNotSupportedException ex)
        {
            assert false; // impossible
        }
        return o;
    }

    public void
    __write(IceInternal.BasicStream __os)
    {
        __os.writeLong(orderId);
        __os.writeString(phone);
        __os.writeString(orderNum);
        __os.writeInt(orderDate);
        __os.writeInt(ticketType);
        __os.writeDouble(amount);
        __os.writeInt(orderStatus);
    }

    public void
    __read(IceInternal.BasicStream __is)
    {
        orderId = __is.readLong();
        phone = __is.readString();
        orderNum = __is.readString();
        orderDate = __is.readInt();
        ticketType = __is.readInt();
        amount = __is.readDouble();
        orderStatus = __is.readInt();
    }

    public static final long serialVersionUID = 1162963671L;
}
