GpsDevInfo.java 3.24 KB
// **********************************************************************
//
// 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 `HDao_gps.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//

package com.glsx.ice.HDaoGps;

public class GpsDevInfo implements Cloneable, java.io.Serializable
{
    public long userID;

    public GpsRecord record;

    public short subDevType;

    public short locType;

    public short onlineState;

    public GpsDevInfo()
    {
    }

    public GpsDevInfo(long userID, GpsRecord record, short subDevType, short locType, short onlineState)
    {
        this.userID = userID;
        this.record = record;
        this.subDevType = subDevType;
        this.locType = locType;
        this.onlineState = onlineState;
    }

    public boolean
    equals(Object rhs)
    {
        if(this == rhs)
        {
            return true;
        }
        GpsDevInfo _r = null;
        if(rhs instanceof GpsDevInfo)
        {
            _r = (GpsDevInfo)rhs;
        }

        if(_r != null)
        {
            if(userID != _r.userID)
            {
                return false;
            }
            if(record != _r.record)
            {
                if(record == null || _r.record == null || !record.equals(_r.record))
                {
                    return false;
                }
            }
            if(subDevType != _r.subDevType)
            {
                return false;
            }
            if(locType != _r.locType)
            {
                return false;
            }
            if(onlineState != _r.onlineState)
            {
                return false;
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int __h = 5381;
        __h = IceInternal.HashUtil.hashAdd(__h, "::HDaoGps::GpsDevInfo");
        __h = IceInternal.HashUtil.hashAdd(__h, userID);
        __h = IceInternal.HashUtil.hashAdd(__h, record);
        __h = IceInternal.HashUtil.hashAdd(__h, subDevType);
        __h = IceInternal.HashUtil.hashAdd(__h, locType);
        __h = IceInternal.HashUtil.hashAdd(__h, onlineState);
        return __h;
    }

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

    public void
    __write(IceInternal.BasicStream __os)
    {
        __os.writeLong(userID);
        record.__write(__os);
        __os.writeShort(subDevType);
        __os.writeShort(locType);
        __os.writeShort(onlineState);
    }

    public void
    __read(IceInternal.BasicStream __is)
    {
        userID = __is.readLong();
        record = new GpsRecord();
        record.__read(__is);
        subDevType = __is.readShort();
        locType = __is.readShort();
        onlineState = __is.readShort();
    }

    public static final long serialVersionUID = 8311223133356955085L;
}