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 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 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(Date createDate) {
374                    _workflowInstanceLink.setCreateDate(createDate);
375            }
376    
377            @Override
378            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
379                    _workflowInstanceLink.setExpandoBridgeAttributes(baseModel);
380            }
381    
382            @Override
383            public void setExpandoBridgeAttributes(
384                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
385                    _workflowInstanceLink.setExpandoBridgeAttributes(expandoBridge);
386            }
387    
388            @Override
389            public void setExpandoBridgeAttributes(
390                    com.liferay.portal.service.ServiceContext serviceContext) {
391                    _workflowInstanceLink.setExpandoBridgeAttributes(serviceContext);
392            }
393    
394            /**
395            * Sets the group ID of this workflow instance link.
396            *
397            * @param groupId the group ID of this workflow instance link
398            */
399            @Override
400            public void setGroupId(long groupId) {
401                    _workflowInstanceLink.setGroupId(groupId);
402            }
403    
404            /**
405            * Sets the modified date of this workflow instance link.
406            *
407            * @param modifiedDate the modified date of this workflow instance link
408            */
409            @Override
410            public void setModifiedDate(Date modifiedDate) {
411                    _workflowInstanceLink.setModifiedDate(modifiedDate);
412            }
413    
414            /**
415            * Sets the mvcc version of this workflow instance link.
416            *
417            * @param mvccVersion the mvcc version of this workflow instance link
418            */
419            @Override
420            public void setMvccVersion(long mvccVersion) {
421                    _workflowInstanceLink.setMvccVersion(mvccVersion);
422            }
423    
424            @Override
425            public void setNew(boolean n) {
426                    _workflowInstanceLink.setNew(n);
427            }
428    
429            /**
430            * Sets the primary key of this workflow instance link.
431            *
432            * @param primaryKey the primary key of this workflow instance link
433            */
434            @Override
435            public void setPrimaryKey(long primaryKey) {
436                    _workflowInstanceLink.setPrimaryKey(primaryKey);
437            }
438    
439            @Override
440            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
441                    _workflowInstanceLink.setPrimaryKeyObj(primaryKeyObj);
442            }
443    
444            /**
445            * Sets the user ID of this workflow instance link.
446            *
447            * @param userId the user ID of this workflow instance link
448            */
449            @Override
450            public void setUserId(long userId) {
451                    _workflowInstanceLink.setUserId(userId);
452            }
453    
454            /**
455            * Sets the user name of this workflow instance link.
456            *
457            * @param userName the user name of this workflow instance link
458            */
459            @Override
460            public void setUserName(java.lang.String userName) {
461                    _workflowInstanceLink.setUserName(userName);
462            }
463    
464            /**
465            * Sets the user uuid of this workflow instance link.
466            *
467            * @param userUuid the user uuid of this workflow instance link
468            */
469            @Override
470            public void setUserUuid(java.lang.String userUuid) {
471                    _workflowInstanceLink.setUserUuid(userUuid);
472            }
473    
474            /**
475            * Sets the workflow instance ID of this workflow instance link.
476            *
477            * @param workflowInstanceId the workflow instance ID of this workflow instance link
478            */
479            @Override
480            public void setWorkflowInstanceId(long workflowInstanceId) {
481                    _workflowInstanceLink.setWorkflowInstanceId(workflowInstanceId);
482            }
483    
484            /**
485            * Sets the workflow instance link ID of this workflow instance link.
486            *
487            * @param workflowInstanceLinkId the workflow instance link ID of this workflow instance link
488            */
489            @Override
490            public void setWorkflowInstanceLinkId(long workflowInstanceLinkId) {
491                    _workflowInstanceLink.setWorkflowInstanceLinkId(workflowInstanceLinkId);
492            }
493    
494            @Override
495            public CacheModel<com.liferay.portal.model.WorkflowInstanceLink> toCacheModel() {
496                    return _workflowInstanceLink.toCacheModel();
497            }
498    
499            @Override
500            public com.liferay.portal.model.WorkflowInstanceLink toEscapedModel() {
501                    return new WorkflowInstanceLinkWrapper(_workflowInstanceLink.toEscapedModel());
502            }
503    
504            @Override
505            public java.lang.String toString() {
506                    return _workflowInstanceLink.toString();
507            }
508    
509            @Override
510            public com.liferay.portal.model.WorkflowInstanceLink toUnescapedModel() {
511                    return new WorkflowInstanceLinkWrapper(_workflowInstanceLink.toUnescapedModel());
512            }
513    
514            @Override
515            public java.lang.String toXmlString() {
516                    return _workflowInstanceLink.toXmlString();
517            }
518    
519            @Override
520            public boolean equals(Object obj) {
521                    if (this == obj) {
522                            return true;
523                    }
524    
525                    if (!(obj instanceof WorkflowInstanceLinkWrapper)) {
526                            return false;
527                    }
528    
529                    WorkflowInstanceLinkWrapper workflowInstanceLinkWrapper = (WorkflowInstanceLinkWrapper)obj;
530    
531                    if (Validator.equals(_workflowInstanceLink,
532                                            workflowInstanceLinkWrapper._workflowInstanceLink)) {
533                            return true;
534                    }
535    
536                    return false;
537            }
538    
539            @Override
540            public WorkflowInstanceLink getWrappedModel() {
541                    return _workflowInstanceLink;
542            }
543    
544            @Override
545            public boolean isEntityCacheEnabled() {
546                    return _workflowInstanceLink.isEntityCacheEnabled();
547            }
548    
549            @Override
550            public boolean isFinderCacheEnabled() {
551                    return _workflowInstanceLink.isFinderCacheEnabled();
552            }
553    
554            @Override
555            public void resetOriginalValues() {
556                    _workflowInstanceLink.resetOriginalValues();
557            }
558    
559            private final WorkflowInstanceLink _workflowInstanceLink;
560    }