/**
 * Saying.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.2RC1 Sep 29, 2004 (08:29:40 EDT) WSDL2Java emitter.
 */

package de.jacomac.sayings;

public class Saying  extends de.jacomac.sayings.SayingCore  implements java.io.Serializable {
    private int id;
    private de.jacomac.sayings.ArrayOfInt relatedSayings;

    public Saying() {
    }

    public Saying(
           int id,
           de.jacomac.sayings.ArrayOfInt relatedSayings) {
           this.id = id;
           this.relatedSayings = relatedSayings;
    }


    /**
     * Gets the id value for this Saying.
     * 
     * @return id
     */
    public int getId() {
        return id;
    }


    /**
     * Sets the id value for this Saying.
     * 
     * @param id
     */
    public void setId(int id) {
        this.id = id;
    }


    /**
     * Gets the relatedSayings value for this Saying.
     * 
     * @return relatedSayings
     */
    public de.jacomac.sayings.ArrayOfInt getRelatedSayings() {
        return relatedSayings;
    }


    /**
     * Sets the relatedSayings value for this Saying.
     * 
     * @param relatedSayings
     */
    public void setRelatedSayings(de.jacomac.sayings.ArrayOfInt relatedSayings) {
        this.relatedSayings = relatedSayings;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof Saying)) return false;
        Saying other = (Saying) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = super.equals(obj) && 
            this.id == other.getId() &&
            ((this.relatedSayings==null && other.getRelatedSayings()==null) || 
             (this.relatedSayings!=null &&
              this.relatedSayings.equals(other.getRelatedSayings())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = super.hashCode();
        _hashCode += getId();
        if (getRelatedSayings() != null) {
            _hashCode += getRelatedSayings().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

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

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://sayings.jacomac.de", "Saying"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("id");
        elemField.setXmlName(new javax.xml.namespace.QName("http://sayings.jacomac.de", "id"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("relatedSayings");
        elemField.setXmlName(new javax.xml.namespace.QName("http://sayings.jacomac.de", "relatedSayings"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://sayings.jacomac.de", "ArrayOfInt"));
        elemField.setMinOccurs(0);
        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);
    }

}
