1
7
8 package com.liferay.client.soap.portal.kernel.cal;
9
10 public class Duration implements java.io.Serializable {
11 private int days;
12
13 private int hours;
14
15 private long interval;
16
17 private int minutes;
18
19 private int seconds;
20
21 private int weeks;
22
23 public Duration() {
24 }
25
26 public Duration(
27 int days,
28 int hours,
29 long interval,
30 int minutes,
31 int seconds,
32 int weeks) {
33 this.days = days;
34 this.hours = hours;
35 this.interval = interval;
36 this.minutes = minutes;
37 this.seconds = seconds;
38 this.weeks = weeks;
39 }
40
41
42
47 public int getDays() {
48 return days;
49 }
50
51
52
57 public void setDays(int days) {
58 this.days = days;
59 }
60
61
62
67 public int getHours() {
68 return hours;
69 }
70
71
72
77 public void setHours(int hours) {
78 this.hours = hours;
79 }
80
81
82
87 public long getInterval() {
88 return interval;
89 }
90
91
92
97 public void setInterval(long interval) {
98 this.interval = interval;
99 }
100
101
102
107 public int getMinutes() {
108 return minutes;
109 }
110
111
112
117 public void setMinutes(int minutes) {
118 this.minutes = minutes;
119 }
120
121
122
127 public int getSeconds() {
128 return seconds;
129 }
130
131
132
137 public void setSeconds(int seconds) {
138 this.seconds = seconds;
139 }
140
141
142
147 public int getWeeks() {
148 return weeks;
149 }
150
151
152
157 public void setWeeks(int weeks) {
158 this.weeks = weeks;
159 }
160
161 private java.lang.Object __equalsCalc = null;
162 public synchronized boolean equals(java.lang.Object obj) {
163 if (!(obj instanceof Duration)) return false;
164 Duration other = (Duration) obj;
165 if (obj == null) return false;
166 if (this == obj) return true;
167 if (__equalsCalc != null) {
168 return (__equalsCalc == obj);
169 }
170 __equalsCalc = obj;
171 boolean _equals;
172 _equals = true &&
173 this.days == other.getDays() &&
174 this.hours == other.getHours() &&
175 this.interval == other.getInterval() &&
176 this.minutes == other.getMinutes() &&
177 this.seconds == other.getSeconds() &&
178 this.weeks == other.getWeeks();
179 __equalsCalc = null;
180 return _equals;
181 }
182
183 private boolean __hashCodeCalc = false;
184 public synchronized int hashCode() {
185 if (__hashCodeCalc) {
186 return 0;
187 }
188 __hashCodeCalc = true;
189 int _hashCode = 1;
190 _hashCode += getDays();
191 _hashCode += getHours();
192 _hashCode += new Long(getInterval()).hashCode();
193 _hashCode += getMinutes();
194 _hashCode += getSeconds();
195 _hashCode += getWeeks();
196 __hashCodeCalc = false;
197 return _hashCode;
198 }
199
200 private static org.apache.axis.description.TypeDesc typeDesc =
202 new org.apache.axis.description.TypeDesc(Duration.class, true);
203
204 static {
205 typeDesc.setXmlType(new javax.xml.namespace.QName("http://cal.kernel.portal.liferay.com", "Duration"));
206 org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
207 elemField.setFieldName("days");
208 elemField.setXmlName(new javax.xml.namespace.QName("", "days"));
209 elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
210 elemField.setNillable(false);
211 typeDesc.addFieldDesc(elemField);
212 elemField = new org.apache.axis.description.ElementDesc();
213 elemField.setFieldName("hours");
214 elemField.setXmlName(new javax.xml.namespace.QName("", "hours"));
215 elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
216 elemField.setNillable(false);
217 typeDesc.addFieldDesc(elemField);
218 elemField = new org.apache.axis.description.ElementDesc();
219 elemField.setFieldName("interval");
220 elemField.setXmlName(new javax.xml.namespace.QName("", "interval"));
221 elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
222 elemField.setNillable(false);
223 typeDesc.addFieldDesc(elemField);
224 elemField = new org.apache.axis.description.ElementDesc();
225 elemField.setFieldName("minutes");
226 elemField.setXmlName(new javax.xml.namespace.QName("", "minutes"));
227 elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
228 elemField.setNillable(false);
229 typeDesc.addFieldDesc(elemField);
230 elemField = new org.apache.axis.description.ElementDesc();
231 elemField.setFieldName("seconds");
232 elemField.setXmlName(new javax.xml.namespace.QName("", "seconds"));
233 elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
234 elemField.setNillable(false);
235 typeDesc.addFieldDesc(elemField);
236 elemField = new org.apache.axis.description.ElementDesc();
237 elemField.setFieldName("weeks");
238 elemField.setXmlName(new javax.xml.namespace.QName("", "weeks"));
239 elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
240 elemField.setNillable(false);
241 typeDesc.addFieldDesc(elemField);
242 }
243
244
247 public static org.apache.axis.description.TypeDesc getTypeDesc() {
248 return typeDesc;
249 }
250
251
254 public static org.apache.axis.encoding.Serializer getSerializer(
255 java.lang.String mechType,
256 java.lang.Class _javaType,
257 javax.xml.namespace.QName _xmlType) {
258 return
259 new org.apache.axis.encoding.ser.BeanSerializer(
260 _javaType, _xmlType, typeDesc);
261 }
262
263
266 public static org.apache.axis.encoding.Deserializer getDeserializer(
267 java.lang.String mechType,
268 java.lang.Class _javaType,
269 javax.xml.namespace.QName _xmlType) {
270 return
271 new org.apache.axis.encoding.ser.BeanDeserializer(
272 _javaType, _xmlType, typeDesc);
273 }
274
275 }
276