001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model;
016    
017    import com.liferay.portal.kernel.util.Validator;
018    
019    import java.util.Date;
020    import java.util.HashMap;
021    import java.util.Map;
022    
023    /**
024     * <p>
025     * This class is a wrapper for {@link WorkflowInstanceLink}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       WorkflowInstanceLink
030     * @generated
031     */
032    public class WorkflowInstanceLinkWrapper implements WorkflowInstanceLink,
033            ModelWrapper<WorkflowInstanceLink> {
034            public WorkflowInstanceLinkWrapper(
035                    WorkflowInstanceLink workflowInstanceLink) {
036                    _workflowInstanceLink = workflowInstanceLink;
037            }
038    
039            public Class<?> getModelClass() {
040                    return WorkflowInstanceLink.class;
041            }
042    
043            public String getModelClassName() {
044                    return WorkflowInstanceLink.class.getName();
045            }
046    
047            public Map<String, Object> getModelAttributes() {
048                    Map<String, Object> attributes = new HashMap<String, Object>();
049    
050                    attributes.put("workflowInstanceLinkId", getWorkflowInstanceLinkId());
051                    attributes.put("groupId", getGroupId());
052                    attributes.put("companyId", getCompanyId());
053                    attributes.put("userId", getUserId());
054                    attributes.put("userName", getUserName());
055                    attributes.put("createDate", getCreateDate());
056                    attributes.put("modifiedDate", getModifiedDate());
057                    attributes.put("classNameId", getClassNameId());
058                    attributes.put("classPK", getClassPK());
059                    attributes.put("workflowInstanceId", getWorkflowInstanceId());
060    
061                    return attributes;
062            }
063    
064            public void setModelAttributes(Map<String, Object> attributes) {
065                    Long workflowInstanceLinkId = (Long)attributes.get(
066                                    "workflowInstanceLinkId");
067    
068                    if (workflowInstanceLinkId != null) {
069                            setWorkflowInstanceLinkId(workflowInstanceLinkId);
070                    }
071    
072                    Long groupId = (Long)attributes.get("groupId");
073    
074                    if (groupId != null) {
075                            setGroupId(groupId);
076                    }
077    
078                    Long companyId = (Long)attributes.get("companyId");
079    
080                    if (companyId != null) {
081                            setCompanyId(companyId);
082                    }
083    
084                    Long userId = (Long)attributes.get("userId");
085    
086                    if (userId != null) {
087                            setUserId(userId);
088                    }
089    
090                    String userName = (String)attributes.get("userName");
091    
092                    if (userName != null) {
093                            setUserName(userName);
094                    }
095    
096                    Date createDate = (Date)attributes.get("createDate");
097    
098                    if (createDate != null) {
099                            setCreateDate(createDate);
100                    }
101    
102                    Date modifiedDate = (Date)attributes.get("modifiedDate");
103    
104                    if (modifiedDate != null) {
105                            setModifiedDate(modifiedDate);
106                    }
107    
108                    Long classNameId = (Long)attributes.get("classNameId");
109    
110                    if (classNameId != null) {
111                            setClassNameId(classNameId);
112                    }
113    
114                    Long classPK = (Long)attributes.get("classPK");
115    
116                    if (classPK != null) {
117                            setClassPK(classPK);
118                    }
119    
120                    Long workflowInstanceId = (Long)attributes.get("workflowInstanceId");
121    
122                    if (workflowInstanceId != null) {
123                            setWorkflowInstanceId(workflowInstanceId);
124                    }
125            }
126    
127            /**
128            * Returns the primary key of this workflow instance link.
129            *
130            * @return the primary key of this workflow instance link
131            */
132            public long getPrimaryKey() {
133                    return _workflowInstanceLink.getPrimaryKey();
134            }
135    
136            /**
137            * Sets the primary key of this workflow instance link.
138            *
139            * @param primaryKey the primary key of this workflow instance link
140            */
141            public void setPrimaryKey(long primaryKey) {
142                    _workflowInstanceLink.setPrimaryKey(primaryKey);
143            }
144    
145            /**
146            * Returns the workflow instance link ID of this workflow instance link.
147            *
148            * @return the workflow instance link ID of this workflow instance link
149            */
150            public long getWorkflowInstanceLinkId() {
151                    return _workflowInstanceLink.getWorkflowInstanceLinkId();
152            }
153    
154            /**
155            * Sets the workflow instance link ID of this workflow instance link.
156            *
157            * @param workflowInstanceLinkId the workflow instance link ID of this workflow instance link
158            */
159            public void setWorkflowInstanceLinkId(long workflowInstanceLinkId) {
160                    _workflowInstanceLink.setWorkflowInstanceLinkId(workflowInstanceLinkId);
161            }
162    
163            /**
164            * Returns the group ID of this workflow instance link.
165            *
166            * @return the group ID of this workflow instance link
167            */
168            public long getGroupId() {
169                    return _workflowInstanceLink.getGroupId();
170            }
171    
172            /**
173            * Sets the group ID of this workflow instance link.
174            *
175            * @param groupId the group ID of this workflow instance link
176            */
177            public void setGroupId(long groupId) {
178                    _workflowInstanceLink.setGroupId(groupId);
179            }
180    
181            /**
182            * Returns the company ID of this workflow instance link.
183            *
184            * @return the company ID of this workflow instance link
185            */
186            public long getCompanyId() {
187                    return _workflowInstanceLink.getCompanyId();
188            }
189    
190            /**
191            * Sets the company ID of this workflow instance link.
192            *
193            * @param companyId the company ID of this workflow instance link
194            */
195            public void setCompanyId(long companyId) {
196                    _workflowInstanceLink.setCompanyId(companyId);
197            }
198    
199            /**
200            * Returns the user ID of this workflow instance link.
201            *
202            * @return the user ID of this workflow instance link
203            */
204            public long getUserId() {
205                    return _workflowInstanceLink.getUserId();
206            }
207    
208            /**
209            * Sets the user ID of this workflow instance link.
210            *
211            * @param userId the user ID of this workflow instance link
212            */
213            public void setUserId(long userId) {
214                    _workflowInstanceLink.setUserId(userId);
215            }
216    
217            /**
218            * Returns the user uuid of this workflow instance link.
219            *
220            * @return the user uuid of this workflow instance link
221            * @throws SystemException if a system exception occurred
222            */
223            public java.lang.String getUserUuid()
224                    throws com.liferay.portal.kernel.exception.SystemException {
225                    return _workflowInstanceLink.getUserUuid();
226            }
227    
228            /**
229            * Sets the user uuid of this workflow instance link.
230            *
231            * @param userUuid the user uuid of this workflow instance link
232            */
233            public void setUserUuid(java.lang.String userUuid) {
234                    _workflowInstanceLink.setUserUuid(userUuid);
235            }
236    
237            /**
238            * Returns the user name of this workflow instance link.
239            *
240            * @return the user name of this workflow instance link
241            */
242            public java.lang.String getUserName() {
243                    return _workflowInstanceLink.getUserName();
244            }
245    
246            /**
247            * Sets the user name of this workflow instance link.
248            *
249            * @param userName the user name of this workflow instance link
250            */
251            public void setUserName(java.lang.String userName) {
252                    _workflowInstanceLink.setUserName(userName);
253            }
254    
255            /**
256            * Returns the create date of this workflow instance link.
257            *
258            * @return the create date of this workflow instance link
259            */
260            public java.util.Date getCreateDate() {
261                    return _workflowInstanceLink.getCreateDate();
262            }
263    
264            /**
265            * Sets the create date of this workflow instance link.
266            *
267            * @param createDate the create date of this workflow instance link
268            */
269            public void setCreateDate(java.util.Date createDate) {
270                    _workflowInstanceLink.setCreateDate(createDate);
271            }
272    
273            /**
274            * Returns the modified date of this workflow instance link.
275            *
276            * @return the modified date of this workflow instance link
277            */
278            public java.util.Date getModifiedDate() {
279                    return _workflowInstanceLink.getModifiedDate();
280            }
281    
282            /**
283            * Sets the modified date of this workflow instance link.
284            *
285            * @param modifiedDate the modified date of this workflow instance link
286            */
287            public void setModifiedDate(java.util.Date modifiedDate) {
288                    _workflowInstanceLink.setModifiedDate(modifiedDate);
289            }
290    
291            /**
292            * Returns the fully qualified class name of this workflow instance link.
293            *
294            * @return the fully qualified class name of this workflow instance link
295            */
296            public java.lang.String getClassName() {
297                    return _workflowInstanceLink.getClassName();
298            }
299    
300            public void setClassName(java.lang.String className) {
301                    _workflowInstanceLink.setClassName(className);
302            }
303    
304            /**
305            * Returns the class name ID of this workflow instance link.
306            *
307            * @return the class name ID of this workflow instance link
308            */
309            public long getClassNameId() {
310                    return _workflowInstanceLink.getClassNameId();
311            }
312    
313            /**
314            * Sets the class name ID of this workflow instance link.
315            *
316            * @param classNameId the class name ID of this workflow instance link
317            */
318            public void setClassNameId(long classNameId) {
319                    _workflowInstanceLink.setClassNameId(classNameId);
320            }
321    
322            /**
323            * Returns the class p k of this workflow instance link.
324            *
325            * @return the class p k of this workflow instance link
326            */
327            public long getClassPK() {
328                    return _workflowInstanceLink.getClassPK();
329            }
330    
331            /**
332            * Sets the class p k of this workflow instance link.
333            *
334            * @param classPK the class p k of this workflow instance link
335            */
336            public void setClassPK(long classPK) {
337                    _workflowInstanceLink.setClassPK(classPK);
338            }
339    
340            /**
341            * Returns the workflow instance ID of this workflow instance link.
342            *
343            * @return the workflow instance ID of this workflow instance link
344            */
345            public long getWorkflowInstanceId() {
346                    return _workflowInstanceLink.getWorkflowInstanceId();
347            }
348    
349            /**
350            * Sets the workflow instance ID of this workflow instance link.
351            *
352            * @param workflowInstanceId the workflow instance ID of this workflow instance link
353            */
354            public void setWorkflowInstanceId(long workflowInstanceId) {
355                    _workflowInstanceLink.setWorkflowInstanceId(workflowInstanceId);
356            }
357    
358            public boolean isNew() {
359                    return _workflowInstanceLink.isNew();
360            }
361    
362            public void setNew(boolean n) {
363                    _workflowInstanceLink.setNew(n);
364            }
365    
366            public boolean isCachedModel() {
367                    return _workflowInstanceLink.isCachedModel();
368            }
369    
370            public void setCachedModel(boolean cachedModel) {
371                    _workflowInstanceLink.setCachedModel(cachedModel);
372            }
373    
374            public boolean isEscapedModel() {
375                    return _workflowInstanceLink.isEscapedModel();
376            }
377    
378            public java.io.Serializable getPrimaryKeyObj() {
379                    return _workflowInstanceLink.getPrimaryKeyObj();
380            }
381    
382            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
383                    _workflowInstanceLink.setPrimaryKeyObj(primaryKeyObj);
384            }
385    
386            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
387                    return _workflowInstanceLink.getExpandoBridge();
388            }
389    
390            public void setExpandoBridgeAttributes(
391                    com.liferay.portal.service.ServiceContext serviceContext) {
392                    _workflowInstanceLink.setExpandoBridgeAttributes(serviceContext);
393            }
394    
395            @Override
396            public java.lang.Object clone() {
397                    return new WorkflowInstanceLinkWrapper((WorkflowInstanceLink)_workflowInstanceLink.clone());
398            }
399    
400            public int compareTo(
401                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink) {
402                    return _workflowInstanceLink.compareTo(workflowInstanceLink);
403            }
404    
405            @Override
406            public int hashCode() {
407                    return _workflowInstanceLink.hashCode();
408            }
409    
410            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.WorkflowInstanceLink> toCacheModel() {
411                    return _workflowInstanceLink.toCacheModel();
412            }
413    
414            public com.liferay.portal.model.WorkflowInstanceLink toEscapedModel() {
415                    return new WorkflowInstanceLinkWrapper(_workflowInstanceLink.toEscapedModel());
416            }
417    
418            public com.liferay.portal.model.WorkflowInstanceLink toUnescapedModel() {
419                    return new WorkflowInstanceLinkWrapper(_workflowInstanceLink.toUnescapedModel());
420            }
421    
422            @Override
423            public java.lang.String toString() {
424                    return _workflowInstanceLink.toString();
425            }
426    
427            public java.lang.String toXmlString() {
428                    return _workflowInstanceLink.toXmlString();
429            }
430    
431            public void persist()
432                    throws com.liferay.portal.kernel.exception.SystemException {
433                    _workflowInstanceLink.persist();
434            }
435    
436            @Override
437            public boolean equals(Object obj) {
438                    if (this == obj) {
439                            return true;
440                    }
441    
442                    if (!(obj instanceof WorkflowInstanceLinkWrapper)) {
443                            return false;
444                    }
445    
446                    WorkflowInstanceLinkWrapper workflowInstanceLinkWrapper = (WorkflowInstanceLinkWrapper)obj;
447    
448                    if (Validator.equals(_workflowInstanceLink,
449                                            workflowInstanceLinkWrapper._workflowInstanceLink)) {
450                            return true;
451                    }
452    
453                    return false;
454            }
455    
456            /**
457             * @deprecated Renamed to {@link #getWrappedModel}
458             */
459            public WorkflowInstanceLink getWrappedWorkflowInstanceLink() {
460                    return _workflowInstanceLink;
461            }
462    
463            public WorkflowInstanceLink getWrappedModel() {
464                    return _workflowInstanceLink;
465            }
466    
467            public void resetOriginalValues() {
468                    _workflowInstanceLink.resetOriginalValues();
469            }
470    
471            private WorkflowInstanceLink _workflowInstanceLink;
472    }