1   /**
2    * Duration.java
3    *
4    * This file was auto-generated from WSDL
5    * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
6    */
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      /**
43       * Gets the days value for this Duration.
44       * 
45       * @return days
46       */
47      public int getDays() {
48          return days;
49      }
50  
51  
52      /**
53       * Sets the days value for this Duration.
54       * 
55       * @param days
56       */
57      public void setDays(int days) {
58          this.days = days;
59      }
60  
61  
62      /**
63       * Gets the hours value for this Duration.
64       * 
65       * @return hours
66       */
67      public int getHours() {
68          return hours;
69      }
70  
71  
72      /**
73       * Sets the hours value for this Duration.
74       * 
75       * @param hours
76       */
77      public void setHours(int hours) {
78          this.hours = hours;
79      }
80  
81  
82      /**
83       * Gets the interval value for this Duration.
84       * 
85       * @return interval
86       */
87      public long getInterval() {
88          return interval;
89      }
90  
91  
92      /**
93       * Sets the interval value for this Duration.
94       * 
95       * @param interval
96       */
97      public void setInterval(long interval) {
98          this.interval = interval;
99      }
100 
101 
102     /**
103      * Gets the minutes value for this Duration.
104      * 
105      * @return minutes
106      */
107     public int getMinutes() {
108         return minutes;
109     }
110 
111 
112     /**
113      * Sets the minutes value for this Duration.
114      * 
115      * @param minutes
116      */
117     public void setMinutes(int minutes) {
118         this.minutes = minutes;
119     }
120 
121 
122     /**
123      * Gets the seconds value for this Duration.
124      * 
125      * @return seconds
126      */
127     public int getSeconds() {
128         return seconds;
129     }
130 
131 
132     /**
133      * Sets the seconds value for this Duration.
134      * 
135      * @param seconds
136      */
137     public void setSeconds(int seconds) {
138         this.seconds = seconds;
139     }
140 
141 
142     /**
143      * Gets the weeks value for this Duration.
144      * 
145      * @return weeks
146      */
147     public int getWeeks() {
148         return weeks;
149     }
150 
151 
152     /**
153      * Sets the weeks value for this Duration.
154      * 
155      * @param weeks
156      */
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     // Type metadata
201     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     /**
245      * Return type metadata object
246      */
247     public static org.apache.axis.description.TypeDesc getTypeDesc() {
248         return typeDesc;
249     }
250 
251     /**
252      * Get Custom Serializer
253      */
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     /**
264      * Get Custom Deserializer
265      */
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