1   /**
2    * CacheControl.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.2RC3 Feb 28, 2005 (10:15:14 EST) WSDL2Java emitter.
6    */
7   
8   package oasis.names.tc.wsrp.v1.types;
9   
10  public class CacheControl  implements java.io.Serializable {
11      private int expires;
12      private java.lang.String userScope;
13      private java.lang.String validateTag;
14      private oasis.names.tc.wsrp.v1.types.Extension[] extensions;
15  
16      public CacheControl() {
17      }
18  
19      public CacheControl(
20             int expires,
21             oasis.names.tc.wsrp.v1.types.Extension[] extensions,
22             java.lang.String userScope,
23             java.lang.String validateTag) {
24             this.expires = expires;
25             this.userScope = userScope;
26             this.validateTag = validateTag;
27             this.extensions = extensions;
28      }
29  
30  
31      /**
32       * Gets the expires value for this CacheControl.
33       * 
34       * @return expires
35       */
36      public int getExpires() {
37          return expires;
38      }
39  
40  
41      /**
42       * Sets the expires value for this CacheControl.
43       * 
44       * @param expires
45       */
46      public void setExpires(int expires) {
47          this.expires = expires;
48      }
49  
50  
51      /**
52       * Gets the userScope value for this CacheControl.
53       * 
54       * @return userScope
55       */
56      public java.lang.String getUserScope() {
57          return userScope;
58      }
59  
60  
61      /**
62       * Sets the userScope value for this CacheControl.
63       * 
64       * @param userScope
65       */
66      public void setUserScope(java.lang.String userScope) {
67          this.userScope = userScope;
68      }
69  
70  
71      /**
72       * Gets the validateTag value for this CacheControl.
73       * 
74       * @return validateTag
75       */
76      public java.lang.String getValidateTag() {
77          return validateTag;
78      }
79  
80  
81      /**
82       * Sets the validateTag value for this CacheControl.
83       * 
84       * @param validateTag
85       */
86      public void setValidateTag(java.lang.String validateTag) {
87          this.validateTag = validateTag;
88      }
89  
90  
91      /**
92       * Gets the extensions value for this CacheControl.
93       * 
94       * @return extensions
95       */
96      public oasis.names.tc.wsrp.v1.types.Extension[] getExtensions() {
97          return extensions;
98      }
99  
100 
101     /**
102      * Sets the extensions value for this CacheControl.
103      * 
104      * @param extensions
105      */
106     public void setExtensions(oasis.names.tc.wsrp.v1.types.Extension[] extensions) {
107         this.extensions = extensions;
108     }
109 
110     public oasis.names.tc.wsrp.v1.types.Extension getExtensions(int i) {
111         return this.extensions[i];
112     }
113 
114     public void setExtensions(int i, oasis.names.tc.wsrp.v1.types.Extension _value) {
115         this.extensions[i] = _value;
116     }
117 
118     private java.lang.Object __equalsCalc = null;
119     public synchronized boolean equals(java.lang.Object obj) {
120         if (!(obj instanceof CacheControl)) return false;
121         CacheControl other = (CacheControl) obj;
122         if (obj == null) return false;
123         if (this == obj) return true;
124         if (__equalsCalc != null) {
125             return (__equalsCalc == obj);
126         }
127         __equalsCalc = obj;
128         boolean _equals;
129         _equals = true && 
130             this.expires == other.getExpires() &&
131             ((this.userScope==null && other.getUserScope()==null) || 
132              (this.userScope!=null &&
133               this.userScope.equals(other.getUserScope()))) &&
134             ((this.validateTag==null && other.getValidateTag()==null) || 
135              (this.validateTag!=null &&
136               this.validateTag.equals(other.getValidateTag()))) &&
137             ((this.extensions==null && other.getExtensions()==null) || 
138              (this.extensions!=null &&
139               java.util.Arrays.equals(this.extensions, other.getExtensions())));
140         __equalsCalc = null;
141         return _equals;
142     }
143 
144     private boolean __hashCodeCalc = false;
145     public synchronized int hashCode() {
146         if (__hashCodeCalc) {
147             return 0;
148         }
149         __hashCodeCalc = true;
150         int _hashCode = 1;
151         _hashCode += getExpires();
152         if (getUserScope() != null) {
153             _hashCode += getUserScope().hashCode();
154         }
155         if (getValidateTag() != null) {
156             _hashCode += getValidateTag().hashCode();
157         }
158         if (getExtensions() != null) {
159             for (int i=0;
160                  i<java.lang.reflect.Array.getLength(getExtensions());
161                  i++) {
162                 java.lang.Object obj = java.lang.reflect.Array.get(getExtensions(), i);
163                 if (obj != null &&
164                     !obj.getClass().isArray()) {
165                     _hashCode += obj.hashCode();
166                 }
167             }
168         }
169         __hashCodeCalc = false;
170         return _hashCode;
171     }
172 
173     // Type metadata
174     private static org.apache.axis.description.TypeDesc typeDesc =
175         new org.apache.axis.description.TypeDesc(CacheControl.class, true);
176 
177     static {
178         typeDesc.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "CacheControl"));
179         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
180         elemField.setFieldName("expires");
181         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "expires"));
182         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
183         typeDesc.addFieldDesc(elemField);
184         elemField = new org.apache.axis.description.ElementDesc();
185         elemField.setFieldName("userScope");
186         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "userScope"));
187         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
188         typeDesc.addFieldDesc(elemField);
189         elemField = new org.apache.axis.description.ElementDesc();
190         elemField.setFieldName("validateTag");
191         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "validateTag"));
192         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
193         elemField.setMinOccurs(0);
194         typeDesc.addFieldDesc(elemField);
195         elemField = new org.apache.axis.description.ElementDesc();
196         elemField.setFieldName("extensions");
197         elemField.setXmlName(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "extensions"));
198         elemField.setXmlType(new javax.xml.namespace.QName("urn:oasis:names:tc:wsrp:v1:types", "Extension"));
199         elemField.setMinOccurs(0);
200         typeDesc.addFieldDesc(elemField);
201     }
202 
203     /**
204      * Return type metadata object
205      */
206     public static org.apache.axis.description.TypeDesc getTypeDesc() {
207         return typeDesc;
208     }
209 
210     /**
211      * Get Custom Serializer
212      */
213     public static org.apache.axis.encoding.Serializer getSerializer(
214            java.lang.String mechType, 
215            java.lang.Class _javaType,  
216            javax.xml.namespace.QName _xmlType) {
217         return 
218           new  org.apache.axis.encoding.ser.BeanSerializer(
219             _javaType, _xmlType, typeDesc);
220     }
221 
222     /**
223      * Get Custom Deserializer
224      */
225     public static org.apache.axis.encoding.Deserializer getDeserializer(
226            java.lang.String mechType, 
227            java.lang.Class _javaType,  
228            javax.xml.namespace.QName _xmlType) {
229         return 
230           new  org.apache.axis.encoding.ser.BeanDeserializer(
231             _javaType, _xmlType, typeDesc);
232     }
233 
234 }
235