View Javadoc

1   /***
2    * StorageDeviceType.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.2RC2 Jun 16, 2005 (10:54:53 EDT) WSDL2Java emitter.
6    */
7   
8   package org.globus.mds.glue;
9   
10  public class StorageDeviceType  implements java.io.Serializable, org.apache.axis.encoding.AnyContentType {
11      private org.apache.axis.message.MessageElement [] _any;
12      private java.lang.String name;  // attribute
13      private java.lang.String type;  // attribute
14      private int transferRate;  // attribute
15      private int size;  // attribute
16      private int availableSpace;  // attribute
17  
18      public StorageDeviceType() {
19      }
20  
21      public StorageDeviceType(
22             org.apache.axis.message.MessageElement [] _any,
23             int availableSpace,
24             java.lang.String name,
25             int size,
26             int transferRate,
27             java.lang.String type) {
28             this._any = _any;
29             this.name = name;
30             this.type = type;
31             this.transferRate = transferRate;
32             this.size = size;
33             this.availableSpace = availableSpace;
34      }
35  
36  
37      /***
38       * Gets the _any value for this StorageDeviceType.
39       * 
40       * @return _any
41       */
42      public org.apache.axis.message.MessageElement [] get_any() {
43          return _any;
44      }
45  
46  
47      /***
48       * Sets the _any value for this StorageDeviceType.
49       * 
50       * @param _any
51       */
52      public void set_any(org.apache.axis.message.MessageElement [] _any) {
53          this._any = _any;
54      }
55  
56  
57      /***
58       * Gets the name value for this StorageDeviceType.
59       * 
60       * @return name
61       */
62      public java.lang.String getName() {
63          return name;
64      }
65  
66  
67      /***
68       * Sets the name value for this StorageDeviceType.
69       * 
70       * @param name
71       */
72      public void setName(java.lang.String name) {
73          this.name = name;
74      }
75  
76  
77      /***
78       * Gets the type value for this StorageDeviceType.
79       * 
80       * @return type
81       */
82      public java.lang.String getType() {
83          return type;
84      }
85  
86  
87      /***
88       * Sets the type value for this StorageDeviceType.
89       * 
90       * @param type
91       */
92      public void setType(java.lang.String type) {
93          this.type = type;
94      }
95  
96  
97      /***
98       * Gets the transferRate value for this StorageDeviceType.
99       * 
100      * @return transferRate
101      */
102     public int getTransferRate() {
103         return transferRate;
104     }
105 
106 
107     /***
108      * Sets the transferRate value for this StorageDeviceType.
109      * 
110      * @param transferRate
111      */
112     public void setTransferRate(int transferRate) {
113         this.transferRate = transferRate;
114     }
115 
116 
117     /***
118      * Gets the size value for this StorageDeviceType.
119      * 
120      * @return size
121      */
122     public int getSize() {
123         return size;
124     }
125 
126 
127     /***
128      * Sets the size value for this StorageDeviceType.
129      * 
130      * @param size
131      */
132     public void setSize(int size) {
133         this.size = size;
134     }
135 
136 
137     /***
138      * Gets the availableSpace value for this StorageDeviceType.
139      * 
140      * @return availableSpace
141      */
142     public int getAvailableSpace() {
143         return availableSpace;
144     }
145 
146 
147     /***
148      * Sets the availableSpace value for this StorageDeviceType.
149      * 
150      * @param availableSpace
151      */
152     public void setAvailableSpace(int availableSpace) {
153         this.availableSpace = availableSpace;
154     }
155 
156     private java.lang.Object __equalsCalc = null;
157     public synchronized boolean equals(java.lang.Object obj) {
158         if (!(obj instanceof StorageDeviceType)) return false;
159         StorageDeviceType other = (StorageDeviceType) obj;
160         if (obj == null) return false;
161         if (this == obj) return true;
162         if (__equalsCalc != null) {
163             return (__equalsCalc == obj);
164         }
165         __equalsCalc = obj;
166         boolean _equals;
167         _equals = true && 
168             ((this._any==null && other.get_any()==null) || 
169              (this._any!=null &&
170               java.util.Arrays.equals(this._any, other.get_any()))) &&
171             ((this.name==null && other.getName()==null) || 
172              (this.name!=null &&
173               this.name.equals(other.getName()))) &&
174             ((this.type==null && other.getType()==null) || 
175              (this.type!=null &&
176               this.type.equals(other.getType()))) &&
177             this.transferRate == other.getTransferRate() &&
178             this.size == other.getSize() &&
179             this.availableSpace == other.getAvailableSpace();
180         __equalsCalc = null;
181         return _equals;
182     }
183 
184     private boolean __hashCodeCalc = false;
185     public synchronized int hashCode() {
186         if (__hashCodeCalc) {
187             return 0;
188         }
189         __hashCodeCalc = true;
190         int _hashCode = 1;
191         if (get_any() != null) {
192             for (int i=0;
193                  i<java.lang.reflect.Array.getLength(get_any());
194                  i++) {
195                 java.lang.Object obj = java.lang.reflect.Array.get(get_any(), i);
196                 if (obj != null &&
197                     !obj.getClass().isArray()) {
198                     _hashCode += obj.hashCode();
199                 }
200             }
201         }
202         if (getName() != null) {
203             _hashCode += getName().hashCode();
204         }
205         if (getType() != null) {
206             _hashCode += getType().hashCode();
207         }
208         _hashCode += getTransferRate();
209         _hashCode += getSize();
210         _hashCode += getAvailableSpace();
211         __hashCodeCalc = false;
212         return _hashCode;
213     }
214 
215     // Type metadata
216     private static org.apache.axis.description.TypeDesc typeDesc =
217         new org.apache.axis.description.TypeDesc(StorageDeviceType.class, true);
218 
219     static {
220         typeDesc.setXmlType(new javax.xml.namespace.QName("http://mds.globus.org/glue/ce/1.1", "StorageDeviceType"));
221         org.apache.axis.description.AttributeDesc attrField = new org.apache.axis.description.AttributeDesc();
222         attrField.setFieldName("name");
223         attrField.setXmlName(new javax.xml.namespace.QName("http://mds.globus.org/glue/ce/1.1", "Name"));
224         attrField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
225         typeDesc.addFieldDesc(attrField);
226         attrField = new org.apache.axis.description.AttributeDesc();
227         attrField.setFieldName("type");
228         attrField.setXmlName(new javax.xml.namespace.QName("http://mds.globus.org/glue/ce/1.1", "Type"));
229         attrField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
230         typeDesc.addFieldDesc(attrField);
231         attrField = new org.apache.axis.description.AttributeDesc();
232         attrField.setFieldName("transferRate");
233         attrField.setXmlName(new javax.xml.namespace.QName("http://mds.globus.org/glue/ce/1.1", "TransferRate"));
234         attrField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
235         typeDesc.addFieldDesc(attrField);
236         attrField = new org.apache.axis.description.AttributeDesc();
237         attrField.setFieldName("size");
238         attrField.setXmlName(new javax.xml.namespace.QName("http://mds.globus.org/glue/ce/1.1", "Size"));
239         attrField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
240         typeDesc.addFieldDesc(attrField);
241         attrField = new org.apache.axis.description.AttributeDesc();
242         attrField.setFieldName("availableSpace");
243         attrField.setXmlName(new javax.xml.namespace.QName("http://mds.globus.org/glue/ce/1.1", "AvailableSpace"));
244         attrField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
245         typeDesc.addFieldDesc(attrField);
246     }
247 
248     /***
249      * Return type metadata object
250      */
251     public static org.apache.axis.description.TypeDesc getTypeDesc() {
252         return typeDesc;
253     }
254 
255     /***
256      * Get Custom Serializer
257      */
258     public static org.apache.axis.encoding.Serializer getSerializer(
259            java.lang.String mechType, 
260            java.lang.Class _javaType,  
261            javax.xml.namespace.QName _xmlType) {
262         return 
263           new  org.apache.axis.encoding.ser.BeanSerializer(
264             _javaType, _xmlType, typeDesc);
265     }
266 
267     /***
268      * Get Custom Deserializer
269      */
270     public static org.apache.axis.encoding.Deserializer getDeserializer(
271            java.lang.String mechType, 
272            java.lang.Class _javaType,  
273            javax.xml.namespace.QName _xmlType) {
274         return 
275           new  org.apache.axis.encoding.ser.BeanDeserializer(
276             _javaType, _xmlType, typeDesc);
277     }
278 
279 }