www.pudn.com > google_examples.zip > CityState.java, change:2002-05-01,size:3495b


/** 
 * CityState.java 
 * 
 * This file was auto-generated from WSDL 
 * by the Apache Axis Wsdl2java emitter. 
 */ 
 
package com.trwest; 
 
public class CityState implements java.io.Serializable { 
    private java.lang.String city; 
    private java.lang.String state; 
 
    public CityState() { 
    } 
 
    public java.lang.String getCity() { 
        return city; 
    } 
 
    public void setCity(java.lang.String city) { 
        this.city = city; 
    } 
 
    public java.lang.String getState() { 
        return state; 
    } 
 
    public void setState(java.lang.String state) { 
        this.state = state; 
    } 
 
    private Object __equalsCalc = null; 
    public synchronized boolean equals(Object obj) { 
        if (!(obj instanceof CityState)) return false; 
        CityState other = (CityState) obj; 
        if (obj == null) return false; 
        if (this == obj) return true; 
        if (__equalsCalc != null) { 
            return (__equalsCalc == obj); 
        } 
        __equalsCalc = obj; 
        boolean _equals; 
        _equals = true &&  
            ((city==null && other.getCity()==null) ||  
             (city!=null && 
              city.equals(other.getCity()))) && 
            ((state==null && other.getState()==null) ||  
             (state!=null && 
              state.equals(other.getState()))); 
        __equalsCalc = null; 
        return _equals; 
    } 
    private boolean __hashCodeCalc = false; 
    public synchronized int hashCode() { 
        if (__hashCodeCalc) { 
            return 0; 
        } 
        __hashCodeCalc = true; 
        int _hashCode = 1; 
        if (getCity() != null) { 
            _hashCode += getCity().hashCode(); 
        } 
        if (getState() != null) { 
            _hashCode += getState().hashCode(); 
        } 
        __hashCodeCalc = false; 
        return _hashCode; 
    } 
    // Type metadata 
    private static org.apache.axis.description.TypeDesc typeDesc = 
        new org.apache.axis.description.TypeDesc(CityState.class); 
 
    static { 
        org.apache.axis.description.FieldDesc field = new org.apache.axis.description.ElementDesc(); 
        field.setFieldName("state"); 
        field.setXmlName(new javax.xml.rpc.namespace.QName("http://trwest.com/webservices/", "State")); 
        typeDesc.addFieldDesc(field); 
        field = new org.apache.axis.description.ElementDesc(); 
        field.setFieldName("city"); 
        field.setXmlName(new javax.xml.rpc.namespace.QName("http://trwest.com/webservices/", "City")); 
        typeDesc.addFieldDesc(field); 
    }; 
 
    /** 
     * 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( 
           String mechType,  
           Class _javaType,   
           javax.xml.rpc.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( 
           String mechType,  
           Class _javaType,   
           javax.xml.rpc.namespace.QName _xmlType) { 
        return  
          new  org.apache.axis.encoding.ser.BeanDeserializer( 
            _javaType, _xmlType,typeDesc); 
    }; 
 
}