1   /**
2    * WorkflowInstance.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.portlet.workflow.model;
9   
10  public class WorkflowInstance  implements java.io.Serializable {
11      private com.liferay.client.portlet.workflow.model.WorkflowDefinition definition;
12  
13      private java.util.Calendar endDate;
14  
15      private boolean ended;
16  
17      private long instanceId;
18  
19      private java.util.Calendar startDate;
20  
21      private com.liferay.client.portlet.workflow.model.WorkflowToken token;
22  
23      public WorkflowInstance() {
24      }
25  
26      public WorkflowInstance(
27             com.liferay.client.portlet.workflow.model.WorkflowDefinition definition,
28             java.util.Calendar endDate,
29             boolean ended,
30             long instanceId,
31             java.util.Calendar startDate,
32             com.liferay.client.portlet.workflow.model.WorkflowToken token) {
33             this.definition = definition;
34             this.endDate = endDate;
35             this.ended = ended;
36             this.instanceId = instanceId;
37             this.startDate = startDate;
38             this.token = token;
39      }
40  
41  
42      /**
43       * Gets the definition value for this WorkflowInstance.
44       * 
45       * @return definition
46       */
47      public com.liferay.client.portlet.workflow.model.WorkflowDefinition getDefinition() {
48          return definition;
49      }
50  
51  
52      /**
53       * Sets the definition value for this WorkflowInstance.
54       * 
55       * @param definition
56       */
57      public void setDefinition(com.liferay.client.portlet.workflow.model.WorkflowDefinition definition) {
58          this.definition = definition;
59      }
60  
61  
62      /**
63       * Gets the endDate value for this WorkflowInstance.
64       * 
65       * @return endDate
66       */
67      public java.util.Calendar getEndDate() {
68          return endDate;
69      }
70  
71  
72      /**
73       * Sets the endDate value for this WorkflowInstance.
74       * 
75       * @param endDate
76       */
77      public void setEndDate(java.util.Calendar endDate) {
78          this.endDate = endDate;
79      }
80  
81  
82      /**
83       * Gets the ended value for this WorkflowInstance.
84       * 
85       * @return ended
86       */
87      public boolean isEnded() {
88          return ended;
89      }
90  
91  
92      /**
93       * Sets the ended value for this WorkflowInstance.
94       * 
95       * @param ended
96       */
97      public void setEnded(boolean ended) {
98          this.ended = ended;
99      }
100 
101 
102     /**
103      * Gets the instanceId value for this WorkflowInstance.
104      * 
105      * @return instanceId
106      */
107     public long getInstanceId() {
108         return instanceId;
109     }
110 
111 
112     /**
113      * Sets the instanceId value for this WorkflowInstance.
114      * 
115      * @param instanceId
116      */
117     public void setInstanceId(long instanceId) {
118         this.instanceId = instanceId;
119     }
120 
121 
122     /**
123      * Gets the startDate value for this WorkflowInstance.
124      * 
125      * @return startDate
126      */
127     public java.util.Calendar getStartDate() {
128         return startDate;
129     }
130 
131 
132     /**
133      * Sets the startDate value for this WorkflowInstance.
134      * 
135      * @param startDate
136      */
137     public void setStartDate(java.util.Calendar startDate) {
138         this.startDate = startDate;
139     }
140 
141 
142     /**
143      * Gets the token value for this WorkflowInstance.
144      * 
145      * @return token
146      */
147     public com.liferay.client.portlet.workflow.model.WorkflowToken getToken() {
148         return token;
149     }
150 
151 
152     /**
153      * Sets the token value for this WorkflowInstance.
154      * 
155      * @param token
156      */
157     public void setToken(com.liferay.client.portlet.workflow.model.WorkflowToken token) {
158         this.token = token;
159     }
160 
161     private java.lang.Object __equalsCalc = null;
162     public synchronized boolean equals(java.lang.Object obj) {
163         if (!(obj instanceof WorkflowInstance)) return false;
164         WorkflowInstance other = (WorkflowInstance) 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.definition==null && other.getDefinition()==null) || 
174              (this.definition!=null &&
175               this.definition.equals(other.getDefinition()))) &&
176             ((this.endDate==null && other.getEndDate()==null) || 
177              (this.endDate!=null &&
178               this.endDate.equals(other.getEndDate()))) &&
179             this.ended == other.isEnded() &&
180             this.instanceId == other.getInstanceId() &&
181             ((this.startDate==null && other.getStartDate()==null) || 
182              (this.startDate!=null &&
183               this.startDate.equals(other.getStartDate()))) &&
184             ((this.token==null && other.getToken()==null) || 
185              (this.token!=null &&
186               this.token.equals(other.getToken())));
187         __equalsCalc = null;
188         return _equals;
189     }
190 
191     private boolean __hashCodeCalc = false;
192     public synchronized int hashCode() {
193         if (__hashCodeCalc) {
194             return 0;
195         }
196         __hashCodeCalc = true;
197         int _hashCode = 1;
198         if (getDefinition() != null) {
199             _hashCode += getDefinition().hashCode();
200         }
201         if (getEndDate() != null) {
202             _hashCode += getEndDate().hashCode();
203         }
204         _hashCode += (isEnded() ? Boolean.TRUE : Boolean.FALSE).hashCode();
205         _hashCode += new Long(getInstanceId()).hashCode();
206         if (getStartDate() != null) {
207             _hashCode += getStartDate().hashCode();
208         }
209         if (getToken() != null) {
210             _hashCode += getToken().hashCode();
211         }
212         __hashCodeCalc = false;
213         return _hashCode;
214     }
215 
216     // Type metadata
217     private static org.apache.axis.description.TypeDesc typeDesc =
218         new org.apache.axis.description.TypeDesc(WorkflowInstance.class, true);
219 
220     static {
221         typeDesc.setXmlType(new javax.xml.namespace.QName("http://model.workflow.portlet.liferay.com", "WorkflowInstance"));
222         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
223         elemField.setFieldName("definition");
224         elemField.setXmlName(new javax.xml.namespace.QName("", "definition"));
225         elemField.setXmlType(new javax.xml.namespace.QName("http://model.workflow.portlet.liferay.com", "WorkflowDefinition"));
226         elemField.setNillable(true);
227         typeDesc.addFieldDesc(elemField);
228         elemField = new org.apache.axis.description.ElementDesc();
229         elemField.setFieldName("endDate");
230         elemField.setXmlName(new javax.xml.namespace.QName("", "endDate"));
231         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "dateTime"));
232         elemField.setNillable(true);
233         typeDesc.addFieldDesc(elemField);
234         elemField = new org.apache.axis.description.ElementDesc();
235         elemField.setFieldName("ended");
236         elemField.setXmlName(new javax.xml.namespace.QName("", "ended"));
237         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
238         elemField.setNillable(false);
239         typeDesc.addFieldDesc(elemField);
240         elemField = new org.apache.axis.description.ElementDesc();
241         elemField.setFieldName("instanceId");
242         elemField.setXmlName(new javax.xml.namespace.QName("", "instanceId"));
243         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
244         elemField.setNillable(false);
245         typeDesc.addFieldDesc(elemField);
246         elemField = new org.apache.axis.description.ElementDesc();
247         elemField.setFieldName("startDate");
248         elemField.setXmlName(new javax.xml.namespace.QName("", "startDate"));
249         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "dateTime"));
250         elemField.setNillable(true);
251         typeDesc.addFieldDesc(elemField);
252         elemField = new org.apache.axis.description.ElementDesc();
253         elemField.setFieldName("token");
254         elemField.setXmlName(new javax.xml.namespace.QName("", "token"));
255         elemField.setXmlType(new javax.xml.namespace.QName("http://model.workflow.portlet.liferay.com", "WorkflowToken"));
256         elemField.setNillable(true);
257         typeDesc.addFieldDesc(elemField);
258     }
259 
260     /**
261      * Return type metadata object
262      */
263     public static org.apache.axis.description.TypeDesc getTypeDesc() {
264         return typeDesc;
265     }
266 
267     /**
268      * Get Custom Serializer
269      */
270     public static org.apache.axis.encoding.Serializer getSerializer(
271            java.lang.String mechType, 
272            java.lang.Class _javaType,  
273            javax.xml.namespace.QName _xmlType) {
274         return 
275           new  org.apache.axis.encoding.ser.BeanSerializer(
276             _javaType, _xmlType, typeDesc);
277     }
278 
279     /**
280      * Get Custom Deserializer
281      */
282     public static org.apache.axis.encoding.Deserializer getDeserializer(
283            java.lang.String mechType, 
284            java.lang.Class _javaType,  
285            javax.xml.namespace.QName _xmlType) {
286         return 
287           new  org.apache.axis.encoding.ser.BeanDeserializer(
288             _javaType, _xmlType, typeDesc);
289     }
290 
291 }
292