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            @Override
040            public Class<?> getModelClass() {
041                    return WorkflowInstanceLink.class;
042            }
043    
044            @Override
045            public String getModelClassName() {
046                    return WorkflowInstanceLink.class.getName();
047            }
048    
049            @Override
050            public Map<String, Object> getModelAttributes() {
051                    Map<String, Object> attributes = new HashMap<String, Object>();
052    
053                    attributes.put("workflowInstanceLinkId", getWorkflowInstanceLinkId());
054                    attributes.put("groupId", getGroupId());
055                    attributes.put("companyId", getCompanyId());
056                    attributes.put("userId", getUserId());
057                    attributes.put("userName", getUserName());
058                    attributes.put("createDate", getCreateDate());
059                    attributes.put("modifiedDate", getModifiedDate());
060                    attributes.put("classNameId", getClassNameId());
061                    attributes.put("classPK", getClassPK());
062                    attributes.put("workflowInstanceId", getWorkflowInstanceId());
063    
064                    return attributes;
065            }
066    
067            @Override
068            public void setModelAttributes(Map<String, Object> attributes) {
069                    Long workflowInstanceLinkId = (Long)attributes.get(
070                                    "workflowInstanceLinkId");
071    
072                    if (workflowInstanceLinkId != null) {
073                            setWorkflowInstanceLinkId(workflowInstanceLinkId);
074                    }
075    
076                    Long groupId = (Long)attributes.get("groupId");
077    
078                    if (groupId != null) {
079                            setGroupId(groupId);
080                    }
081    
082                    Long companyId = (Long)attributes.get("companyId");
083    
084                    if (companyId != null) {
085                            setCompanyId(companyId);
086                    }
087    
088                    Long userId = (Long)attributes.get("userId");
089    
090                    if (userId != null) {
091                            setUserId(userId);
092                    }
093    
094                    String userName = (String)attributes.get("userName");
095    
096                    if (userName != null) {
097                            setUserName(userName);
098                    }
099    
100                    Date createDate = (Date)attributes.get("createDate");
101    
102                    if (createDate != null) {
103                            setCreateDate(createDate);
104                    }
105    
106                    Date modifiedDate = (Date)attributes.get("modifiedDate");
107    
108                    if (modifiedDate != null) {
109                            setModifiedDate(modifiedDate);
110                    }
111    
112                    Long classNameId = (Long)attributes.get("classNameId");
113    
114                    if (classNameId != null) {
115                            setClassNameId(classNameId);
116                    }
117    
118                    Long classPK = (Long)attributes.get("classPK");
119    
120                    if (classPK != null) {
121                            setClassPK(classPK);
122                    }
123    
124                    Long workflowInstanceId = (Long)attributes.get("workflowInstanceId");
125    
126                    if (workflowInstanceId != null) {
127                            setWorkflowInstanceId(workflowInstanceId);
128                    }
129            }
130    
131            /**
132            * Returns the primary key of this workflow instance link.
133            *
134            * @return the primary key of this workflow instance link
135            */
136            @Override
137            public long getPrimaryKey() {
138                    return _workflowInstanceLink.getPrimaryKey();
139            }
140    
141            /**
142            * Sets the primary key of this workflow instance link.
143            *
144            * @param primaryKey the primary key of this workflow instance link
145            */
146            @Override
147            public void setPrimaryKey(long primaryKey) {
148                    _workflowInstanceLink.setPrimaryKey(primaryKey);
149            }
150    
151            /**
152            * Returns the workflow instance link ID of this workflow instance link.
153            *
154            * @return the workflow instance link ID of this workflow instance link
155            */
156            @Override
157            public long getWorkflowInstanceLinkId() {
158                    return _workflowInstanceLink.getWorkflowInstanceLinkId();
159            }
160    
161            /**
162            * Sets the workflow instance link ID of this workflow instance link.
163            *
164            * @param workflowInstanceLinkId the workflow instance link ID of this workflow instance link
165            */
166            @Override
167            public void setWorkflowInstanceLinkId(long workflowInstanceLinkId) {
168                    _workflowInstanceLink.setWorkflowInstanceLinkId(workflowInstanceLinkId);
169            }
170    
171            /**
172            * Returns the group ID of this workflow instance link.
173            *
174            * @return the group ID of this workflow instance link
175            */
176            @Override
177            public long getGroupId() {
178                    return _workflowInstanceLink.getGroupId();
179            }
180    
181            /**
182            * Sets the group ID of this workflow instance link.
183            *
184            * @param groupId the group ID of this workflow instance link
185            */
186            @Override
187            public void setGroupId(long groupId) {
188                    _workflowInstanceLink.setGroupId(groupId);
189            }
190    
191            /**
192            * Returns the company ID of this workflow instance link.
193            *
194            * @return the company ID of this workflow instance link
195            */
196            @Override
197            public long getCompanyId() {
198                    return _workflowInstanceLink.getCompanyId();
199            }
200    
201            /**
202            * Sets the company ID of this workflow instance link.
203            *
204            * @param companyId the company ID of this workflow instance link
205            */
206            @Override
207            public void setCompanyId(long companyId) {
208                    _workflowInstanceLink.setCompanyId(companyId);
209            }
210    
211            /**
212            * Returns the user ID of this workflow instance link.
213            *
214            * @return the user ID of this workflow instance link
215            */
216            @Override
217            public long getUserId() {
218                    return _workflowInstanceLink.getUserId();
219            }
220    
221            /**
222            * Sets the user ID of this workflow instance link.
223            *
224            * @param userId the user ID of this workflow instance link
225            */
226            @Override
227            public void setUserId(long userId) {
228                    _workflowInstanceLink.setUserId(userId);
229            }
230    
231            /**
232            * Returns the user uuid of this workflow instance link.
233            *
234            * @return the user uuid of this workflow instance link
235            * @throws SystemException if a system exception occurred
236            */
237            @Override
238            public java.lang.String getUserUuid()
239                    throws com.liferay.portal.kernel.exception.SystemException {
240                    return _workflowInstanceLink.getUserUuid();
241            }
242    
243            /**
244            * Sets the user uuid of this workflow instance link.
245            *
246            * @param userUuid the user uuid of this workflow instance link
247            */
248            @Override
249            public void setUserUuid(java.lang.String userUuid) {
250                    _workflowInstanceLink.setUserUuid(userUuid);
251            }
252    
253            /**
254            * Returns the user name of this workflow instance link.
255            *
256            * @return the user name of this workflow instance link
257            */
258            @Override
259            public java.lang.String getUserName() {
260                    return _workflowInstanceLink.getUserName();
261            }
262    
263            /**
264            * Sets the user name of this workflow instance link.
265            *
266            * @param userName the user name of this workflow instance link
267            */
268            @Override
269            public void setUserName(java.lang.String userName) {
270                    _workflowInstanceLink.setUserName(userName);
271            }
272    
273            /**
274            * Returns the create date of this workflow instance link.
275            *
276            * @return the create date of this workflow instance link
277            */
278            @Override
279            public java.util.Date getCreateDate() {
280                    return _workflowInstanceLink.getCreateDate();
281            }
282    
283            /**
284            * Sets the create date of this workflow instance link.
285            *
286            * @param createDate the create date of this workflow instance link
287            */
288            @Override
289            public void setCreateDate(java.util.Date createDate) {
290                    _workflowInstanceLink.setCreateDate(createDate);
291            }
292    
293            /**
294            * Returns the modified date of this workflow instance link.
295            *
296            * @return the modified date of this workflow instance link
297            */
298            @Override
299            public java.util.Date getModifiedDate() {
300                    return _workflowInstanceLink.getModifiedDate();
301            }
302    
303            /**
304            * Sets the modified date of this workflow instance link.
305            *
306            * @param modifiedDate the modified date of this workflow instance link
307            */
308            @Override
309            public void setModifiedDate(java.util.Date modifiedDate) {
310                    _workflowInstanceLink.setModifiedDate(modifiedDate);
311            }
312    
313            /**
314            * Returns the fully qualified class name of this workflow instance link.
315            *
316            * @return the fully qualified class name of this workflow instance link
317            */
318            @Override
319            public java.lang.String getClassName() {
320                    return _workflowInstanceLink.getClassName();
321            }
322    
323            @Override
324            public void setClassName(java.lang.String className) {
325                    _workflowInstanceLink.setClassName(className);
326            }
327    
328            /**
329            * Returns the class name ID of this workflow instance link.
330            *
331            * @return the class name ID of this workflow instance link
332            */
333            @Override
334            public long getClassNameId() {
335                    return _workflowInstanceLink.getClassNameId();
336            }
337    
338            /**
339            * Sets the class name ID of this workflow instance link.
340            *
341            * @param classNameId the class name ID of this workflow instance link
342            */
343            @Override
344            public void setClassNameId(long classNameId) {
345                    _workflowInstanceLink.setClassNameId(classNameId);
346            }
347    
348            /**
349            * Returns the class p k of this workflow instance link.
350            *
351            * @return the class p k of this workflow instance link
352            */
353            @Override
354            public long getClassPK() {
355                    return _workflowInstanceLink.getClassPK();
356            }
357    
358            /**
359            * Sets the class p k of this workflow instance link.
360            *
361            * @param classPK the class p k of this workflow instance link
362            */
363            @Override
364            public void setClassPK(long classPK) {
365                    _workflowInstanceLink.setClassPK(classPK);
366            }
367    
368            /**
369            * Returns the workflow instance ID of this workflow instance link.
370            *
371            * @return the workflow instance ID of this workflow instance link
372            */
373            @Override
374            public long getWorkflowInstanceId() {
375                    return _workflowInstanceLink.getWorkflowInstanceId();
376            }
377    
378            /**
379            * Sets the workflow instance ID of this workflow instance link.
380            *
381            * @param workflowInstanceId the workflow instance ID of this workflow instance link
382            */
383            @Override
384            public void setWorkflowInstanceId(long workflowInstanceId) {
385                    _workflowInstanceLink.setWorkflowInstanceId(workflowInstanceId);
386            }
387    
388            @Override
389            public boolean isNew() {
390                    return _workflowInstanceLink.isNew();
391            }
392    
393            @Override
394            public void setNew(boolean n) {
395                    _workflowInstanceLink.setNew(n);
396            }
397    
398            @Override
399            public boolean isCachedModel() {
400                    return _workflowInstanceLink.isCachedModel();
401            }
402    
403            @Override
404            public void setCachedModel(boolean cachedModel) {
405                    _workflowInstanceLink.setCachedModel(cachedModel);
406            }
407    
408            @Override
409            public boolean isEscapedModel() {
410                    return _workflowInstanceLink.isEscapedModel();
411            }
412    
413            @Override
414            public java.io.Serializable getPrimaryKeyObj() {
415                    return _workflowInstanceLink.getPrimaryKeyObj();
416            }
417    
418            @Override
419            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
420                    _workflowInstanceLink.setPrimaryKeyObj(primaryKeyObj);
421            }
422    
423            @Override
424            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
425                    return _workflowInstanceLink.getExpandoBridge();
426            }
427    
428            @Override
429            public void setExpandoBridgeAttributes(
430                    com.liferay.portal.model.BaseModel<?> baseModel) {
431                    _workflowInstanceLink.setExpandoBridgeAttributes(baseModel);
432            }
433    
434            @Override
435            public void setExpandoBridgeAttributes(
436                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
437                    _workflowInstanceLink.setExpandoBridgeAttributes(expandoBridge);
438            }
439    
440            @Override
441            public void setExpandoBridgeAttributes(
442                    com.liferay.portal.service.ServiceContext serviceContext) {
443                    _workflowInstanceLink.setExpandoBridgeAttributes(serviceContext);
444            }
445    
446            @Override
447            public java.lang.Object clone() {
448                    return new WorkflowInstanceLinkWrapper((WorkflowInstanceLink)_workflowInstanceLink.clone());
449            }
450    
451            @Override
452            public int compareTo(
453                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink) {
454                    return _workflowInstanceLink.compareTo(workflowInstanceLink);
455            }
456    
457            @Override
458            public int hashCode() {
459                    return _workflowInstanceLink.hashCode();
460            }
461    
462            @Override
463            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.WorkflowInstanceLink> toCacheModel() {
464                    return _workflowInstanceLink.toCacheModel();
465            }
466    
467            @Override
468            public com.liferay.portal.model.WorkflowInstanceLink toEscapedModel() {
469                    return new WorkflowInstanceLinkWrapper(_workflowInstanceLink.toEscapedModel());
470            }
471    
472            @Override
473            public com.liferay.portal.model.WorkflowInstanceLink toUnescapedModel() {
474                    return new WorkflowInstanceLinkWrapper(_workflowInstanceLink.toUnescapedModel());
475            }
476    
477            @Override
478            public java.lang.String toString() {
479                    return _workflowInstanceLink.toString();
480            }
481    
482            @Override
483            public java.lang.String toXmlString() {
484                    return _workflowInstanceLink.toXmlString();
485            }
486    
487            @Override
488            public void persist()
489                    throws com.liferay.portal.kernel.exception.SystemException {
490                    _workflowInstanceLink.persist();
491            }
492    
493            @Override
494            public boolean equals(Object obj) {
495                    if (this == obj) {
496                            return true;
497                    }
498    
499                    if (!(obj instanceof WorkflowInstanceLinkWrapper)) {
500                            return false;
501                    }
502    
503                    WorkflowInstanceLinkWrapper workflowInstanceLinkWrapper = (WorkflowInstanceLinkWrapper)obj;
504    
505                    if (Validator.equals(_workflowInstanceLink,
506                                            workflowInstanceLinkWrapper._workflowInstanceLink)) {
507                            return true;
508                    }
509    
510                    return false;
511            }
512    
513            /**
514             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
515             */
516            public WorkflowInstanceLink getWrappedWorkflowInstanceLink() {
517                    return _workflowInstanceLink;
518            }
519    
520            @Override
521            public WorkflowInstanceLink getWrappedModel() {
522                    return _workflowInstanceLink;
523            }
524    
525            @Override
526            public void resetOriginalValues() {
527                    _workflowInstanceLink.resetOriginalValues();
528            }
529    
530            private WorkflowInstanceLink _workflowInstanceLink;
531    }