/**
 * QueryElementType.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
 */

package org.ecoinformatics.ecogrid.authenticatedqueryservice.stub;

public class QueryElementType  implements java.io.Serializable {
    private org.ecoinformatics.ecogrid.queryservice.query.QueryType query;

    private java.lang.String sessionId;

    public QueryElementType() {
    }

    public QueryElementType(
           org.ecoinformatics.ecogrid.queryservice.query.QueryType query,
           java.lang.String sessionId) {
           this.query = query;
           this.sessionId = sessionId;
    }


    /**
     * Gets the query value for this QueryElementType.
     * 
     * @return query
     */
    public org.ecoinformatics.ecogrid.queryservice.query.QueryType getQuery() {
        return query;
    }


    /**
     * Sets the query value for this QueryElementType.
     * 
     * @param query
     */
    public void setQuery(org.ecoinformatics.ecogrid.queryservice.query.QueryType query) {
        this.query = query;
    }


    /**
     * Gets the sessionId value for this QueryElementType.
     * 
     * @return sessionId
     */
    public java.lang.String getSessionId() {
        return sessionId;
    }


    /**
     * Sets the sessionId value for this QueryElementType.
     * 
     * @param sessionId
     */
    public void setSessionId(java.lang.String sessionId) {
        this.sessionId = sessionId;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof QueryElementType)) return false;
        QueryElementType other = (QueryElementType) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.query==null && other.getQuery()==null) || 
             (this.query!=null &&
              this.query.equals(other.getQuery()))) &&
            ((this.sessionId==null && other.getSessionId()==null) || 
             (this.sessionId!=null &&
              this.sessionId.equals(other.getSessionId())));
        __equalsCalc = null;
        return _equals;
    }

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

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

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://ecoinformatics.org/authenticatedqueryservice-1.0.0", "QueryElementType"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("query");
        elemField.setXmlName(new javax.xml.namespace.QName("http://ecoinformatics.org/authenticatedqueryservice-1.0.0", "query"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://ecoinformatics.org/query-1.0.1", "QueryType"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("sessionId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://ecoinformatics.org/authenticatedqueryservice-1.0.0", "sessionId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        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);
    }

}
