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

    private com.genesyslab.gis.services.statistic.types.TimeInterval interval;

    private com.genesyslab.gis.services.statistic.types.StatisticType statisticType;

    private com.genesyslab.gis.services.statistic.types.TimeRangeType timeRange;

    private java.lang.String timeRangeName;

    private java.lang.String typeName;

    public Metric() {
    }

    public Metric(
           java.lang.String filterName,
           com.genesyslab.gis.services.statistic.types.TimeInterval interval,
           com.genesyslab.gis.services.statistic.types.StatisticType statisticType,
           com.genesyslab.gis.services.statistic.types.TimeRangeType timeRange,
           java.lang.String timeRangeName,
           java.lang.String typeName) {
           this.filterName = filterName;
           this.interval = interval;
           this.statisticType = statisticType;
           this.timeRange = timeRange;
           this.timeRangeName = timeRangeName;
           this.typeName = typeName;
    }


    /**
     * Gets the filterName value for this Metric.
     * 
     * @return filterName
     */
    public java.lang.String getFilterName() {
        return filterName;
    }


    /**
     * Sets the filterName value for this Metric.
     * 
     * @param filterName
     */
    public void setFilterName(java.lang.String filterName) {
        this.filterName = filterName;
    }


    /**
     * Gets the interval value for this Metric.
     * 
     * @return interval
     */
    public com.genesyslab.gis.services.statistic.types.TimeInterval getInterval() {
        return interval;
    }


    /**
     * Sets the interval value for this Metric.
     * 
     * @param interval
     */
    public void setInterval(com.genesyslab.gis.services.statistic.types.TimeInterval interval) {
        this.interval = interval;
    }


    /**
     * Gets the statisticType value for this Metric.
     * 
     * @return statisticType
     */
    public com.genesyslab.gis.services.statistic.types.StatisticType getStatisticType() {
        return statisticType;
    }


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


    /**
     * Gets the timeRange value for this Metric.
     * 
     * @return timeRange
     */
    public com.genesyslab.gis.services.statistic.types.TimeRangeType getTimeRange() {
        return timeRange;
    }


    /**
     * Sets the timeRange value for this Metric.
     * 
     * @param timeRange
     */
    public void setTimeRange(com.genesyslab.gis.services.statistic.types.TimeRangeType timeRange) {
        this.timeRange = timeRange;
    }


    /**
     * Gets the timeRangeName value for this Metric.
     * 
     * @return timeRangeName
     */
    public java.lang.String getTimeRangeName() {
        return timeRangeName;
    }


    /**
     * Sets the timeRangeName value for this Metric.
     * 
     * @param timeRangeName
     */
    public void setTimeRangeName(java.lang.String timeRangeName) {
        this.timeRangeName = timeRangeName;
    }


    /**
     * Gets the typeName value for this Metric.
     * 
     * @return typeName
     */
    public java.lang.String getTypeName() {
        return typeName;
    }


    /**
     * Sets the typeName value for this Metric.
     * 
     * @param typeName
     */
    public void setTypeName(java.lang.String typeName) {
        this.typeName = typeName;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof Metric)) return false;
        Metric other = (Metric) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.filterName==null && other.getFilterName()==null) || 
             (this.filterName!=null &&
              this.filterName.equals(other.getFilterName()))) &&
            ((this.interval==null && other.getInterval()==null) || 
             (this.interval!=null &&
              this.interval.equals(other.getInterval()))) &&
            ((this.statisticType==null && other.getStatisticType()==null) || 
             (this.statisticType!=null &&
              this.statisticType.equals(other.getStatisticType()))) &&
            ((this.timeRange==null && other.getTimeRange()==null) || 
             (this.timeRange!=null &&
              this.timeRange.equals(other.getTimeRange()))) &&
            ((this.timeRangeName==null && other.getTimeRangeName()==null) || 
             (this.timeRangeName!=null &&
              this.timeRangeName.equals(other.getTimeRangeName()))) &&
            ((this.typeName==null && other.getTypeName()==null) || 
             (this.typeName!=null &&
              this.typeName.equals(other.getTypeName())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getFilterName() != null) {
            _hashCode += getFilterName().hashCode();
        }
        if (getInterval() != null) {
            _hashCode += getInterval().hashCode();
        }
        if (getStatisticType() != null) {
            _hashCode += getStatisticType().hashCode();
        }
        if (getTimeRange() != null) {
            _hashCode += getTimeRange().hashCode();
        }
        if (getTimeRangeName() != null) {
            _hashCode += getTimeRangeName().hashCode();
        }
        if (getTypeName() != null) {
            _hashCode += getTypeName().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

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

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "metric"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("filterName");
        elemField.setXmlName(new javax.xml.namespace.QName("", "filterName"));
        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("interval");
        elemField.setXmlName(new javax.xml.namespace.QName("", "interval"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "timeInterval"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("statisticType");
        elemField.setXmlName(new javax.xml.namespace.QName("", "statisticType"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "statisticType"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("timeRange");
        elemField.setXmlName(new javax.xml.namespace.QName("", "timeRange"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "timeRangeType"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("timeRangeName");
        elemField.setXmlName(new javax.xml.namespace.QName("", "timeRangeName"));
        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("typeName");
        elemField.setXmlName(new javax.xml.namespace.QName("", "typeName"));
        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);
    }

}
