/**
 * StatisticType.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 StatisticType  implements java.io.Serializable {
    private java.lang.String category;

    private com.genesyslab.gis.services.statistic.types.Actions mainActions;

    private com.genesyslab.gis.services.statistic.types.ObjectType[] objectType;

    private com.genesyslab.gis.services.statistic.types.Actions relativeActions;

    private java.lang.String subject;

    public StatisticType() {
    }

    public StatisticType(
           java.lang.String category,
           com.genesyslab.gis.services.statistic.types.Actions mainActions,
           com.genesyslab.gis.services.statistic.types.ObjectType[] objectType,
           com.genesyslab.gis.services.statistic.types.Actions relativeActions,
           java.lang.String subject) {
           this.category = category;
           this.mainActions = mainActions;
           this.objectType = objectType;
           this.relativeActions = relativeActions;
           this.subject = subject;
    }


    /**
     * Gets the category value for this StatisticType.
     * 
     * @return category
     */
    public java.lang.String getCategory() {
        return category;
    }


    /**
     * Sets the category value for this StatisticType.
     * 
     * @param category
     */
    public void setCategory(java.lang.String category) {
        this.category = category;
    }


    /**
     * Gets the mainActions value for this StatisticType.
     * 
     * @return mainActions
     */
    public com.genesyslab.gis.services.statistic.types.Actions getMainActions() {
        return mainActions;
    }


    /**
     * Sets the mainActions value for this StatisticType.
     * 
     * @param mainActions
     */
    public void setMainActions(com.genesyslab.gis.services.statistic.types.Actions mainActions) {
        this.mainActions = mainActions;
    }


    /**
     * Gets the objectType value for this StatisticType.
     * 
     * @return objectType
     */
    public com.genesyslab.gis.services.statistic.types.ObjectType[] getObjectType() {
        return objectType;
    }


    /**
     * Sets the objectType value for this StatisticType.
     * 
     * @param objectType
     */
    public void setObjectType(com.genesyslab.gis.services.statistic.types.ObjectType[] objectType) {
        this.objectType = objectType;
    }


    /**
     * Gets the relativeActions value for this StatisticType.
     * 
     * @return relativeActions
     */
    public com.genesyslab.gis.services.statistic.types.Actions getRelativeActions() {
        return relativeActions;
    }


    /**
     * Sets the relativeActions value for this StatisticType.
     * 
     * @param relativeActions
     */
    public void setRelativeActions(com.genesyslab.gis.services.statistic.types.Actions relativeActions) {
        this.relativeActions = relativeActions;
    }


    /**
     * Gets the subject value for this StatisticType.
     * 
     * @return subject
     */
    public java.lang.String getSubject() {
        return subject;
    }


    /**
     * Sets the subject value for this StatisticType.
     * 
     * @param subject
     */
    public void setSubject(java.lang.String subject) {
        this.subject = subject;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof StatisticType)) return false;
        StatisticType other = (StatisticType) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.category==null && other.getCategory()==null) || 
             (this.category!=null &&
              this.category.equals(other.getCategory()))) &&
            ((this.mainActions==null && other.getMainActions()==null) || 
             (this.mainActions!=null &&
              this.mainActions.equals(other.getMainActions()))) &&
            ((this.objectType==null && other.getObjectType()==null) || 
             (this.objectType!=null &&
              java.util.Arrays.equals(this.objectType, other.getObjectType()))) &&
            ((this.relativeActions==null && other.getRelativeActions()==null) || 
             (this.relativeActions!=null &&
              this.relativeActions.equals(other.getRelativeActions()))) &&
            ((this.subject==null && other.getSubject()==null) || 
             (this.subject!=null &&
              this.subject.equals(other.getSubject())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getCategory() != null) {
            _hashCode += getCategory().hashCode();
        }
        if (getMainActions() != null) {
            _hashCode += getMainActions().hashCode();
        }
        if (getObjectType() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getObjectType());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getObjectType(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        if (getRelativeActions() != null) {
            _hashCode += getRelativeActions().hashCode();
        }
        if (getSubject() != null) {
            _hashCode += getSubject().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

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

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "statisticType"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("category");
        elemField.setXmlName(new javax.xml.namespace.QName("", "category"));
        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("mainActions");
        elemField.setXmlName(new javax.xml.namespace.QName("", "mainActions"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "actions"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("objectType");
        elemField.setXmlName(new javax.xml.namespace.QName("", "objectType"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "objectType"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("relativeActions");
        elemField.setXmlName(new javax.xml.namespace.QName("", "relativeActions"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "actions"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("subject");
        elemField.setXmlName(new javax.xml.namespace.QName("", "subject"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        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);
    }

}
