1
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
36 public int getExpires() {
37 return expires;
38 }
39
40
41
46 public void setExpires(int expires) {
47 this.expires = expires;
48 }
49
50
51
56 public java.lang.String getUserScope() {
57 return userScope;
58 }
59
60
61
66 public void setUserScope(java.lang.String userScope) {
67 this.userScope = userScope;
68 }
69
70
71
76 public java.lang.String getValidateTag() {
77 return validateTag;
78 }
79
80
81
86 public void setValidateTag(java.lang.String validateTag) {
87 this.validateTag = validateTag;
88 }
89
90
91
96 public oasis.names.tc.wsrp.v1.types.Extension[] getExtensions() {
97 return extensions;
98 }
99
100
101
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 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
206 public static org.apache.axis.description.TypeDesc getTypeDesc() {
207 return typeDesc;
208 }
209
210
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
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