/**
 * TimeInterval.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 TimeInterval  implements java.io.Serializable {
    private com.genesyslab.gis.services.statistic.types.TimeIntervalType intervalType;

    private java.lang.Integer length;

    private java.lang.Integer slideLength;

    private java.lang.String timeProfileName;

    public TimeInterval() {
    }

    public TimeInterval(
           com.genesyslab.gis.services.statistic.types.TimeIntervalType intervalType,
           java.lang.Integer length,
           java.lang.Integer slideLength,
           java.lang.String timeProfileName) {
           this.intervalType = intervalType;
           this.length = length;
           this.slideLength = slideLength;
           this.timeProfileName = timeProfileName;
    }


    /**
     * Gets the intervalType value for this TimeInterval.
     * 
     * @return intervalType
     */
    public com.genesyslab.gis.services.statistic.types.TimeIntervalType getIntervalType() {
        return intervalType;
    }


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


    /**
     * Gets the length value for this TimeInterval.
     * 
     * @return length
     */
    public java.lang.Integer getLength() {
        return length;
    }


    /**
     * Sets the length value for this TimeInterval.
     * 
     * @param length
     */
    public void setLength(java.lang.Integer length) {
        this.length = length;
    }


    /**
     * Gets the slideLength value for this TimeInterval.
     * 
     * @return slideLength
     */
    public java.lang.Integer getSlideLength() {
        return slideLength;
    }


    /**
     * Sets the slideLength value for this TimeInterval.
     * 
     * @param slideLength
     */
    public void setSlideLength(java.lang.Integer slideLength) {
        this.slideLength = slideLength;
    }


    /**
     * Gets the timeProfileName value for this TimeInterval.
     * 
     * @return timeProfileName
     */
    public java.lang.String getTimeProfileName() {
        return timeProfileName;
    }


    /**
     * Sets the timeProfileName value for this TimeInterval.
     * 
     * @param timeProfileName
     */
    public void setTimeProfileName(java.lang.String timeProfileName) {
        this.timeProfileName = timeProfileName;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof TimeInterval)) return false;
        TimeInterval other = (TimeInterval) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.intervalType==null && other.getIntervalType()==null) || 
             (this.intervalType!=null &&
              this.intervalType.equals(other.getIntervalType()))) &&
            ((this.length==null && other.getLength()==null) || 
             (this.length!=null &&
              this.length.equals(other.getLength()))) &&
            ((this.slideLength==null && other.getSlideLength()==null) || 
             (this.slideLength!=null &&
              this.slideLength.equals(other.getSlideLength()))) &&
            ((this.timeProfileName==null && other.getTimeProfileName()==null) || 
             (this.timeProfileName!=null &&
              this.timeProfileName.equals(other.getTimeProfileName())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getIntervalType() != null) {
            _hashCode += getIntervalType().hashCode();
        }
        if (getLength() != null) {
            _hashCode += getLength().hashCode();
        }
        if (getSlideLength() != null) {
            _hashCode += getSlideLength().hashCode();
        }
        if (getTimeProfileName() != null) {
            _hashCode += getTimeProfileName().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

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

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "timeInterval"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("intervalType");
        elemField.setXmlName(new javax.xml.namespace.QName("", "intervalType"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.genesyslab.com/services/statservice/types/2002/03", "timeIntervalType"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("length");
        elemField.setXmlName(new javax.xml.namespace.QName("", "length"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("slideLength");
        elemField.setXmlName(new javax.xml.namespace.QName("", "slideLength"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("timeProfileName");
        elemField.setXmlName(new javax.xml.namespace.QName("", "timeProfileName"));
        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);
    }

}
