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