View Javadoc

1   /***
2    * Attribute.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
6    */
7   
8   package no.feide.moria.webservices.v2_1;
9   
10  public class Attribute  implements java.io.Serializable {
11      private java.lang.String name;
12      private java.lang.String[] values;
13  
14      public Attribute() {
15      }
16  
17      public Attribute(
18             java.lang.String name,
19             java.lang.String[] values) {
20             this.name = name;
21             this.values = values;
22      }
23  
24  
25      /***
26       * Gets the name value for this Attribute.
27       * 
28       * @return name
29       */
30      public java.lang.String getName() {
31          return name;
32      }
33  
34  
35      /***
36       * Sets the name value for this Attribute.
37       * 
38       * @param name
39       */
40      public void setName(java.lang.String name) {
41          this.name = name;
42      }
43  
44  
45      /***
46       * Gets the values value for this Attribute.
47       * 
48       * @return values
49       */
50      public java.lang.String[] getValues() {
51          return values;
52      }
53  
54  
55      /***
56       * Sets the values value for this Attribute.
57       * 
58       * @param values
59       */
60      public void setValues(java.lang.String[] values) {
61          this.values = values;
62      }
63  
64      private java.lang.Object __equalsCalc = null;
65      public synchronized boolean equals(java.lang.Object obj) {
66          if (!(obj instanceof Attribute)) return false;
67          Attribute other = (Attribute) obj;
68          if (obj == null) return false;
69          if (this == obj) return true;
70          if (__equalsCalc != null) {
71              return (__equalsCalc == obj);
72          }
73          __equalsCalc = obj;
74          boolean _equals;
75          _equals = true && 
76              ((this.name==null && other.getName()==null) || 
77               (this.name!=null &&
78                this.name.equals(other.getName()))) &&
79              ((this.values==null && other.getValues()==null) || 
80               (this.values!=null &&
81                java.util.Arrays.equals(this.values, other.getValues())));
82          __equalsCalc = null;
83          return _equals;
84      }
85  
86      private boolean __hashCodeCalc = false;
87      public synchronized int hashCode() {
88          if (__hashCodeCalc) {
89              return 0;
90          }
91          __hashCodeCalc = true;
92          int _hashCode = 1;
93          if (getName() != null) {
94              _hashCode += getName().hashCode();
95          }
96          if (getValues() != null) {
97              for (int i=0;
98                   i<java.lang.reflect.Array.getLength(getValues());
99                   i++) {
100                 java.lang.Object obj = java.lang.reflect.Array.get(getValues(), i);
101                 if (obj != null &&
102                     !obj.getClass().isArray()) {
103                     _hashCode += obj.hashCode();
104                 }
105             }
106         }
107         __hashCodeCalc = false;
108         return _hashCode;
109     }
110 
111     // Type metadata
112     private static org.apache.axis.description.TypeDesc typeDesc =
113         new org.apache.axis.description.TypeDesc(Attribute.class, true);
114 
115     static {
116         typeDesc.setXmlType(new javax.xml.namespace.QName("http://v2_1.webservices.moria.feide.no", "Attribute"));
117         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
118         elemField.setFieldName("name");
119         elemField.setXmlName(new javax.xml.namespace.QName("", "name"));
120         elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"));
121         typeDesc.addFieldDesc(elemField);
122         elemField = new org.apache.axis.description.ElementDesc();
123         elemField.setFieldName("values");
124         elemField.setXmlName(new javax.xml.namespace.QName("", "values"));
125         elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"));
126         typeDesc.addFieldDesc(elemField);
127     }
128 
129     /***
130      * Return type metadata object
131      */
132     public static org.apache.axis.description.TypeDesc getTypeDesc() {
133         return typeDesc;
134     }
135 
136     /***
137      * Get Custom Serializer
138      */
139     public static org.apache.axis.encoding.Serializer getSerializer(
140            java.lang.String mechType, 
141            java.lang.Class _javaType,  
142            javax.xml.namespace.QName _xmlType) {
143         return 
144           new  org.apache.axis.encoding.ser.BeanSerializer(
145             _javaType, _xmlType, typeDesc);
146     }
147 
148     /***
149      * Get Custom Deserializer
150      */
151     public static org.apache.axis.encoding.Deserializer getDeserializer(
152            java.lang.String mechType, 
153            java.lang.Class _javaType,  
154            javax.xml.namespace.QName _xmlType) {
155         return 
156           new  org.apache.axis.encoding.ser.BeanDeserializer(
157             _javaType, _xmlType, typeDesc);
158     }
159 
160 }