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