/**
 * StatisticState.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package com.genesyslab.gis.services.statistic.types;

public class StatisticState  implements java.io.Serializable {
    private long date;

    private com.genesyslab.gis.services.statistic.types.StatisticStateData extendedData;

    private java.lang.String id;

    private com.genesyslab.gis.services.statistic.types.StatisticState[] items;

    private java.lang.String state;

    private com.genesyslab.gis.services.statistic.types.StatisticStateType type;

    public StatisticState() {
    }

    public StatisticState(
           long date,
           com.genesyslab.gis.services.statistic.types.StatisticStateData extendedData,
           java.lang.String id,
           com.genesyslab.gis.services.statistic.types.StatisticState[] items,
           java.lang.String state,
           com.genesyslab.gis.services.statistic.types.StatisticStateType type) {
           this.date = date;
           this.extendedData = extendedData;
           this.id = id;
           this.items = items;
           this.state = state;
           this.type = type;
    }


    /**
     * Gets the date value for this StatisticState.
     * 
     * @return date
     */
    public long getDate() {
        return date;
    }


    /**
     * Sets the date value for this StatisticState.
     * 
     * @param date
     */
    public void setDate(long date) {
        this.date = date;
    }


    /**
     * Gets the extendedData value for this StatisticState.
     * 
     * @return extendedData
     */
    public com.genesyslab.gis.services.statistic.types.StatisticStateData getExtendedData() {
        return extendedData;
    }


    /**
     * Sets the extendedData value for this StatisticState.
     * 
     * @param extendedData
     */
    public void setExtendedData(com.genesyslab.gis.services.statistic.types.StatisticStateData extendedData) {
        this.extendedData = extendedData;
    }


    /**
     * Gets the id value for this StatisticState.
     * 
     * @return id
     */
    public java.lang.String getId() {
        return id;
    }


    /**
     * Sets the id value for this StatisticState.
     * 
     * @param id
     */
    public void setId(java.lang.String id) {
        this.id = id;
    }


    /**
     * Gets the items value for this StatisticState.
     * 
     * @return items
     */
    public com.genesyslab.gis.services.statistic.types.StatisticState[] getItems() {
        return items;
    }


    /**
     * Sets the items value for this StatisticState.
     * 
     * @param items
     */
    public void setItems(com.genesyslab.gis.services.statistic.types.StatisticState[] items) {
        this.items = items;
    }


    /**
     * Gets the state value for this StatisticState.
     * 
     * @return state
     */
    public java.lang.String getState() {
        return state;
    }


    /**
     * Sets the state value for this StatisticState.
     * 
     * @param state
     */
    public void setState(java.lang.String state) {
        this.state = state;
    }


    /**
     * Gets the type value for this StatisticState.
     * 
     * @return type
     */
    public com.genesyslab.gis.services.statistic.types.StatisticStateType getType() {
        return type;
    }


    /**
     * Sets the type value for this StatisticState.
     * 
     * @param type
     */
    public void setType(com.genesyslab.gis.services.statistic.types.StatisticStateType type) {
        this.type = type;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof StatisticState)) return false;
        StatisticState other = (StatisticState) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            this.date == other.getDate() &&
            ((this.extendedData==null && other.getExtendedData()==null) || 
             (this.extendedData!=null &&
              this.extendedData.equals(other.getExtendedData()))) &&
            ((this.id==null && other.getId()==null) || 
             (this.id!=null &&
              this.id.equals(other.getId()))) &&
            ((this.items==null && other.getItems()==null) || 
             (this.items!=null &&
              java.util.Arrays.equals(this.items, other.getItems()))) &&
            ((this.state==null && other.getState()==null) || 
             (this.state!=null &&
              this.state.equals(other.getState()))) &&
            ((this.type==null && other.getType()==null) || 
             (this.type!=null &&
              this.type.equals(other.getType())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        _hashCode += new Long(getDate()).hashCode();
        if (getExtendedData() != null) {
            _hashCode += getExtendedData().hashCode();
        }
        if (getId() != null) {
            _hashCode += getId().hashCode();
        }
        if (getItems() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getItems());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getItems(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        if (getState() != null) {
            _hashCode += getState().hashCode();
        }
        if (getType() != null) {
            _hashCode += getType().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(StatisticState.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "statisticState"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("date");
        elemField.setXmlName(new javax.xml.namespace.QName("", "date"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("extendedData");
        elemField.setXmlName(new javax.xml.namespace.QName("", "extendedData"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "statisticStateData"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("id");
        elemField.setXmlName(new javax.xml.namespace.QName("", "id"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("items");
        elemField.setXmlName(new javax.xml.namespace.QName("", "items"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "statisticState"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("state");
        elemField.setXmlName(new javax.xml.namespace.QName("", "state"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("type");
        elemField.setXmlName(new javax.xml.namespace.QName("", "type"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "statisticStateType"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}
