1   /**
2    * Lock.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.lock.model;
9   
10  public class Lock  implements java.io.Serializable {
11      private java.lang.String className;
12  
13      private java.util.Calendar date;
14  
15      private long expirationTime;
16  
17      private boolean expired;
18  
19      private boolean inheritable;
20  
21      private java.lang.String owner;
22  
23      private java.lang.Object primaryKey;
24  
25      private long userId;
26  
27      private java.lang.String uuid;
28  
29      public Lock() {
30      }
31  
32      public Lock(
33             java.lang.String className,
34             java.util.Calendar date,
35             long expirationTime,
36             boolean expired,
37             boolean inheritable,
38             java.lang.String owner,
39             java.lang.Object primaryKey,
40             long userId,
41             java.lang.String uuid) {
42             this.className = className;
43             this.date = date;
44             this.expirationTime = expirationTime;
45             this.expired = expired;
46             this.inheritable = inheritable;
47             this.owner = owner;
48             this.primaryKey = primaryKey;
49             this.userId = userId;
50             this.uuid = uuid;
51      }
52  
53  
54      /**
55       * Gets the className value for this Lock.
56       * 
57       * @return className
58       */
59      public java.lang.String getClassName() {
60          return className;
61      }
62  
63  
64      /**
65       * Sets the className value for this Lock.
66       * 
67       * @param className
68       */
69      public void setClassName(java.lang.String className) {
70          this.className = className;
71      }
72  
73  
74      /**
75       * Gets the date value for this Lock.
76       * 
77       * @return date
78       */
79      public java.util.Calendar getDate() {
80          return date;
81      }
82  
83  
84      /**
85       * Sets the date value for this Lock.
86       * 
87       * @param date
88       */
89      public void setDate(java.util.Calendar date) {
90          this.date = date;
91      }
92  
93  
94      /**
95       * Gets the expirationTime value for this Lock.
96       * 
97       * @return expirationTime
98       */
99      public long getExpirationTime() {
100         return expirationTime;
101     }
102 
103 
104     /**
105      * Sets the expirationTime value for this Lock.
106      * 
107      * @param expirationTime
108      */
109     public void setExpirationTime(long expirationTime) {
110         this.expirationTime = expirationTime;
111     }
112 
113 
114     /**
115      * Gets the expired value for this Lock.
116      * 
117      * @return expired
118      */
119     public boolean isExpired() {
120         return expired;
121     }
122 
123 
124     /**
125      * Sets the expired value for this Lock.
126      * 
127      * @param expired
128      */
129     public void setExpired(boolean expired) {
130         this.expired = expired;
131     }
132 
133 
134     /**
135      * Gets the inheritable value for this Lock.
136      * 
137      * @return inheritable
138      */
139     public boolean isInheritable() {
140         return inheritable;
141     }
142 
143 
144     /**
145      * Sets the inheritable value for this Lock.
146      * 
147      * @param inheritable
148      */
149     public void setInheritable(boolean inheritable) {
150         this.inheritable = inheritable;
151     }
152 
153 
154     /**
155      * Gets the owner value for this Lock.
156      * 
157      * @return owner
158      */
159     public java.lang.String getOwner() {
160         return owner;
161     }
162 
163 
164     /**
165      * Sets the owner value for this Lock.
166      * 
167      * @param owner
168      */
169     public void setOwner(java.lang.String owner) {
170         this.owner = owner;
171     }
172 
173 
174     /**
175      * Gets the primaryKey value for this Lock.
176      * 
177      * @return primaryKey
178      */
179     public java.lang.Object getPrimaryKey() {
180         return primaryKey;
181     }
182 
183 
184     /**
185      * Sets the primaryKey value for this Lock.
186      * 
187      * @param primaryKey
188      */
189     public void setPrimaryKey(java.lang.Object primaryKey) {
190         this.primaryKey = primaryKey;
191     }
192 
193 
194     /**
195      * Gets the userId value for this Lock.
196      * 
197      * @return userId
198      */
199     public long getUserId() {
200         return userId;
201     }
202 
203 
204     /**
205      * Sets the userId value for this Lock.
206      * 
207      * @param userId
208      */
209     public void setUserId(long userId) {
210         this.userId = userId;
211     }
212 
213 
214     /**
215      * Gets the uuid value for this Lock.
216      * 
217      * @return uuid
218      */
219     public java.lang.String getUuid() {
220         return uuid;
221     }
222 
223 
224     /**
225      * Sets the uuid value for this Lock.
226      * 
227      * @param uuid
228      */
229     public void setUuid(java.lang.String uuid) {
230         this.uuid = uuid;
231     }
232 
233     private java.lang.Object __equalsCalc = null;
234     public synchronized boolean equals(java.lang.Object obj) {
235         if (!(obj instanceof Lock)) return false;
236         Lock other = (Lock) obj;
237         if (obj == null) return false;
238         if (this == obj) return true;
239         if (__equalsCalc != null) {
240             return (__equalsCalc == obj);
241         }
242         __equalsCalc = obj;
243         boolean _equals;
244         _equals = true && 
245             ((this.className==null && other.getClassName()==null) || 
246              (this.className!=null &&
247               this.className.equals(other.getClassName()))) &&
248             ((this.date==null && other.getDate()==null) || 
249              (this.date!=null &&
250               this.date.equals(other.getDate()))) &&
251             this.expirationTime == other.getExpirationTime() &&
252             this.expired == other.isExpired() &&
253             this.inheritable == other.isInheritable() &&
254             ((this.owner==null && other.getOwner()==null) || 
255              (this.owner!=null &&
256               this.owner.equals(other.getOwner()))) &&
257             ((this.primaryKey==null && other.getPrimaryKey()==null) || 
258              (this.primaryKey!=null &&
259               this.primaryKey.equals(other.getPrimaryKey()))) &&
260             this.userId == other.getUserId() &&
261             ((this.uuid==null && other.getUuid()==null) || 
262              (this.uuid!=null &&
263               this.uuid.equals(other.getUuid())));
264         __equalsCalc = null;
265         return _equals;
266     }
267 
268     private boolean __hashCodeCalc = false;
269     public synchronized int hashCode() {
270         if (__hashCodeCalc) {
271             return 0;
272         }
273         __hashCodeCalc = true;
274         int _hashCode = 1;
275         if (getClassName() != null) {
276             _hashCode += getClassName().hashCode();
277         }
278         if (getDate() != null) {
279             _hashCode += getDate().hashCode();
280         }
281         _hashCode += new Long(getExpirationTime()).hashCode();
282         _hashCode += (isExpired() ? Boolean.TRUE : Boolean.FALSE).hashCode();
283         _hashCode += (isInheritable() ? Boolean.TRUE : Boolean.FALSE).hashCode();
284         if (getOwner() != null) {
285             _hashCode += getOwner().hashCode();
286         }
287         if (getPrimaryKey() != null) {
288             _hashCode += getPrimaryKey().hashCode();
289         }
290         _hashCode += new Long(getUserId()).hashCode();
291         if (getUuid() != null) {
292             _hashCode += getUuid().hashCode();
293         }
294         __hashCodeCalc = false;
295         return _hashCode;
296     }
297 
298     // Type metadata
299     private static org.apache.axis.description.TypeDesc typeDesc =
300         new org.apache.axis.description.TypeDesc(Lock.class, true);
301 
302     static {
303         typeDesc.setXmlType(new javax.xml.namespace.QName("http://model.lock.liferay.com", "Lock"));
304         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
305         elemField.setFieldName("className");
306         elemField.setXmlName(new javax.xml.namespace.QName("", "className"));
307         elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"));
308         elemField.setNillable(true);
309         typeDesc.addFieldDesc(elemField);
310         elemField = new org.apache.axis.description.ElementDesc();
311         elemField.setFieldName("date");
312         elemField.setXmlName(new javax.xml.namespace.QName("", "date"));
313         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "dateTime"));
314         elemField.setNillable(true);
315         typeDesc.addFieldDesc(elemField);
316         elemField = new org.apache.axis.description.ElementDesc();
317         elemField.setFieldName("expirationTime");
318         elemField.setXmlName(new javax.xml.namespace.QName("", "expirationTime"));
319         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
320         elemField.setNillable(false);
321         typeDesc.addFieldDesc(elemField);
322         elemField = new org.apache.axis.description.ElementDesc();
323         elemField.setFieldName("expired");
324         elemField.setXmlName(new javax.xml.namespace.QName("", "expired"));
325         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
326         elemField.setNillable(false);
327         typeDesc.addFieldDesc(elemField);
328         elemField = new org.apache.axis.description.ElementDesc();
329         elemField.setFieldName("inheritable");
330         elemField.setXmlName(new javax.xml.namespace.QName("", "inheritable"));
331         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
332         elemField.setNillable(false);
333         typeDesc.addFieldDesc(elemField);
334         elemField = new org.apache.axis.description.ElementDesc();
335         elemField.setFieldName("owner");
336         elemField.setXmlName(new javax.xml.namespace.QName("", "owner"));
337         elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"));
338         elemField.setNillable(true);
339         typeDesc.addFieldDesc(elemField);
340         elemField = new org.apache.axis.description.ElementDesc();
341         elemField.setFieldName("primaryKey");
342         elemField.setXmlName(new javax.xml.namespace.QName("", "primaryKey"));
343         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "anyType"));
344         elemField.setNillable(true);
345         typeDesc.addFieldDesc(elemField);
346         elemField = new org.apache.axis.description.ElementDesc();
347         elemField.setFieldName("userId");
348         elemField.setXmlName(new javax.xml.namespace.QName("", "userId"));
349         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
350         elemField.setNillable(false);
351         typeDesc.addFieldDesc(elemField);
352         elemField = new org.apache.axis.description.ElementDesc();
353         elemField.setFieldName("uuid");
354         elemField.setXmlName(new javax.xml.namespace.QName("", "uuid"));
355         elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"));
356         elemField.setNillable(true);
357         typeDesc.addFieldDesc(elemField);
358     }
359 
360     /**
361      * Return type metadata object
362      */
363     public static org.apache.axis.description.TypeDesc getTypeDesc() {
364         return typeDesc;
365     }
366 
367     /**
368      * Get Custom Serializer
369      */
370     public static org.apache.axis.encoding.Serializer getSerializer(
371            java.lang.String mechType, 
372            java.lang.Class _javaType,  
373            javax.xml.namespace.QName _xmlType) {
374         return 
375           new  org.apache.axis.encoding.ser.BeanSerializer(
376             _javaType, _xmlType, typeDesc);
377     }
378 
379     /**
380      * Get Custom Deserializer
381      */
382     public static org.apache.axis.encoding.Deserializer getDeserializer(
383            java.lang.String mechType, 
384            java.lang.Class _javaType,  
385            javax.xml.namespace.QName _xmlType) {
386         return 
387           new  org.apache.axis.encoding.ser.BeanDeserializer(
388             _javaType, _xmlType, typeDesc);
389     }
390 
391 }
392