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    import com.liferay.portal.service.ServiceContext;
021    
022    import com.liferay.portlet.expando.model.ExpandoBridge;
023    
024    import java.io.Serializable;
025    
026    import java.util.Date;
027    import java.util.HashMap;
028    import java.util.Map;
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 java.lang.Object clone() {
148                    return new WorkflowInstanceLinkWrapper((WorkflowInstanceLink)_workflowInstanceLink.clone());
149            }
150    
151            @Override
152            public int compareTo(
153                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink) {
154                    return _workflowInstanceLink.compareTo(workflowInstanceLink);
155            }
156    
157            /**
158            * Returns the fully qualified class name of this workflow instance link.
159            *
160            * @return the fully qualified class name of this workflow instance link
161            */
162            @Override
163            public java.lang.String getClassName() {
164                    return _workflowInstanceLink.getClassName();
165            }
166    
167            /**
168            * Returns the class name ID of this workflow instance link.
169            *
170            * @return the class name ID of this workflow instance link
171            */
172            @Override
173            public long getClassNameId() {
174                    return _workflowInstanceLink.getClassNameId();
175            }
176    
177            /**
178            * Returns the class p k of this workflow instance link.
179            *
180            * @return the class p k of this workflow instance link
181            */
182            @Override
183            public long getClassPK() {
184                    return _workflowInstanceLink.getClassPK();
185            }
186    
187            /**
188            * Returns the company ID of this workflow instance link.
189            *
190            * @return the company ID of this workflow instance link
191            */
192            @Override
193            public long getCompanyId() {
194                    return _workflowInstanceLink.getCompanyId();
195            }
196    
197            /**
198            * Returns the create date of this workflow instance link.
199            *
200            * @return the create date of this workflow instance link
201            */
202            @Override
203            public Date getCreateDate() {
204                    return _workflowInstanceLink.getCreateDate();
205            }
206    
207            @Override
208            public ExpandoBridge getExpandoBridge() {
209                    return _workflowInstanceLink.getExpandoBridge();
210            }
211    
212            /**
213            * Returns the group ID of this workflow instance link.
214            *
215            * @return the group ID of this workflow instance link
216            */
217            @Override
218            public long getGroupId() {
219                    return _workflowInstanceLink.getGroupId();
220            }
221    
222            /**
223            * Returns the modified date of this workflow instance link.
224            *
225            * @return the modified date of this workflow instance link
226            */
227            @Override
228            public Date getModifiedDate() {
229                    return _workflowInstanceLink.getModifiedDate();
230            }
231    
232            /**
233            * Returns the mvcc version of this workflow instance link.
234            *
235            * @return the mvcc version of this workflow instance link
236            */
237            @Override
238            public long getMvccVersion() {
239                    return _workflowInstanceLink.getMvccVersion();
240            }
241    
242            /**
243            * Returns the primary key of this workflow instance link.
244            *
245            * @return the primary key of this workflow instance link
246            */
247            @Override
248            public long getPrimaryKey() {
249                    return _workflowInstanceLink.getPrimaryKey();
250            }
251    
252            @Override
253            public Serializable getPrimaryKeyObj() {
254                    return _workflowInstanceLink.getPrimaryKeyObj();
255            }
256    
257            /**
258            * Returns the user ID of this workflow instance link.
259            *
260            * @return the user ID of this workflow instance link
261            */
262            @Override
263            public long getUserId() {
264                    return _workflowInstanceLink.getUserId();
265            }
266    
267            /**
268            * Returns the user name of this workflow instance link.
269            *
270            * @return the user name of this workflow instance link
271            */
272            @Override
273            public java.lang.String getUserName() {
274                    return _workflowInstanceLink.getUserName();
275            }
276    
277            /**
278            * Returns the user uuid of this workflow instance link.
279            *
280            * @return the user uuid of this workflow instance link
281            */
282            @Override
283            public java.lang.String getUserUuid() {
284                    return _workflowInstanceLink.getUserUuid();
285            }
286    
287            /**
288            * Returns the workflow instance ID of this workflow instance link.
289            *
290            * @return the workflow instance ID of this workflow instance link
291            */
292            @Override
293            public long getWorkflowInstanceId() {
294                    return _workflowInstanceLink.getWorkflowInstanceId();
295            }
296    
297            /**
298            * Returns the workflow instance link ID of this workflow instance link.
299            *
300            * @return the workflow instance link ID of this workflow instance link
301            */
302            @Override
303            public long getWorkflowInstanceLinkId() {
304                    return _workflowInstanceLink.getWorkflowInstanceLinkId();
305            }
306    
307            @Override
308            public int hashCode() {
309                    return _workflowInstanceLink.hashCode();
310            }
311    
312            @Override
313            public boolean isCachedModel() {
314                    return _workflowInstanceLink.isCachedModel();
315            }
316    
317            @Override
318            public boolean isEscapedModel() {
319                    return _workflowInstanceLink.isEscapedModel();
320            }
321    
322            @Override
323            public boolean isNew() {
324                    return _workflowInstanceLink.isNew();
325            }
326    
327            @Override
328            public void persist() {
329                    _workflowInstanceLink.persist();
330            }
331    
332            @Override
333            public void setCachedModel(boolean cachedModel) {
334                    _workflowInstanceLink.setCachedModel(cachedModel);
335            }
336    
337            @Override
338            public void setClassName(java.lang.String className) {
339                    _workflowInstanceLink.setClassName(className);
340            }
341    
342            /**
343            * Sets the class name ID of this workflow instance link.
344            *
345            * @param classNameId the class name ID of this workflow instance link
346            */
347            @Override
348            public void setClassNameId(long classNameId) {
349                    _workflowInstanceLink.setClassNameId(classNameId);
350            }
351    
352            /**
353            * Sets the class p k of this workflow instance link.
354            *
355            * @param classPK the class p k of this workflow instance link
356            */
357            @Override
358            public void setClassPK(long classPK) {
359                    _workflowInstanceLink.setClassPK(classPK);
360            }
361    
362            /**
363            * Sets the company ID of this workflow instance link.
364            *
365            * @param companyId the company ID of this workflow instance link
366            */
367            @Override
368            public void setCompanyId(long companyId) {
369                    _workflowInstanceLink.setCompanyId(companyId);
370            }
371    
372            /**
373            * Sets the create date of this workflow instance link.
374            *
375            * @param createDate the create date of this workflow instance link
376            */
377            @Override
378            public void setCreateDate(Date createDate) {
379                    _workflowInstanceLink.setCreateDate(createDate);
380            }
381    
382            @Override
383            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
384                    _workflowInstanceLink.setExpandoBridgeAttributes(baseModel);
385            }
386    
387            @Override
388            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
389                    _workflowInstanceLink.setExpandoBridgeAttributes(expandoBridge);
390            }
391    
392            @Override
393            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
394                    _workflowInstanceLink.setExpandoBridgeAttributes(serviceContext);
395            }
396    
397            /**
398            * Sets the group ID of this workflow instance link.
399            *
400            * @param groupId the group ID of this workflow instance link
401            */
402            @Override
403            public void setGroupId(long groupId) {
404                    _workflowInstanceLink.setGroupId(groupId);
405            }
406    
407            /**
408            * Sets the modified date of this workflow instance link.
409            *
410            * @param modifiedDate the modified date of this workflow instance link
411            */
412            @Override
413            public void setModifiedDate(Date modifiedDate) {
414                    _workflowInstanceLink.setModifiedDate(modifiedDate);
415            }
416    
417            /**
418            * Sets the mvcc version of this workflow instance link.
419            *
420            * @param mvccVersion the mvcc version of this workflow instance link
421            */
422            @Override
423            public void setMvccVersion(long mvccVersion) {
424                    _workflowInstanceLink.setMvccVersion(mvccVersion);
425            }
426    
427            @Override
428            public void setNew(boolean n) {
429                    _workflowInstanceLink.setNew(n);
430            }
431    
432            /**
433            * Sets the primary key of this workflow instance link.
434            *
435            * @param primaryKey the primary key of this workflow instance link
436            */
437            @Override
438            public void setPrimaryKey(long primaryKey) {
439                    _workflowInstanceLink.setPrimaryKey(primaryKey);
440            }
441    
442            @Override
443            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
444                    _workflowInstanceLink.setPrimaryKeyObj(primaryKeyObj);
445            }
446    
447            /**
448            * Sets the user ID of this workflow instance link.
449            *
450            * @param userId the user ID of this workflow instance link
451            */
452            @Override
453            public void setUserId(long userId) {
454                    _workflowInstanceLink.setUserId(userId);
455            }
456    
457            /**
458            * Sets the user name of this workflow instance link.
459            *
460            * @param userName the user name of this workflow instance link
461            */
462            @Override
463            public void setUserName(java.lang.String userName) {
464                    _workflowInstanceLink.setUserName(userName);
465            }
466    
467            /**
468            * Sets the user uuid of this workflow instance link.
469            *
470            * @param userUuid the user uuid of this workflow instance link
471            */
472            @Override
473            public void setUserUuid(java.lang.String userUuid) {
474                    _workflowInstanceLink.setUserUuid(userUuid);
475            }
476    
477            /**
478            * Sets the workflow instance ID of this workflow instance link.
479            *
480            * @param workflowInstanceId the workflow instance ID of this workflow instance link
481            */
482            @Override
483            public void setWorkflowInstanceId(long workflowInstanceId) {
484                    _workflowInstanceLink.setWorkflowInstanceId(workflowInstanceId);
485            }
486    
487            /**
488            * Sets the workflow instance link ID of this workflow instance link.
489            *
490            * @param workflowInstanceLinkId the workflow instance link ID of this workflow instance link
491            */
492            @Override
493            public void setWorkflowInstanceLinkId(long workflowInstanceLinkId) {
494                    _workflowInstanceLink.setWorkflowInstanceLinkId(workflowInstanceLinkId);
495            }
496    
497            @Override
498            public CacheModel<com.liferay.portal.model.WorkflowInstanceLink> toCacheModel() {
499                    return _workflowInstanceLink.toCacheModel();
500            }
501    
502            @Override
503            public com.liferay.portal.model.WorkflowInstanceLink toEscapedModel() {
504                    return new WorkflowInstanceLinkWrapper(_workflowInstanceLink.toEscapedModel());
505            }
506    
507            @Override
508            public java.lang.String toString() {
509                    return _workflowInstanceLink.toString();
510            }
511    
512            @Override
513            public com.liferay.portal.model.WorkflowInstanceLink toUnescapedModel() {
514                    return new WorkflowInstanceLinkWrapper(_workflowInstanceLink.toUnescapedModel());
515            }
516    
517            @Override
518            public java.lang.String toXmlString() {
519                    return _workflowInstanceLink.toXmlString();
520            }
521    
522            @Override
523            public boolean equals(Object obj) {
524                    if (this == obj) {
525                            return true;
526                    }
527    
528                    if (!(obj instanceof WorkflowInstanceLinkWrapper)) {
529                            return false;
530                    }
531    
532                    WorkflowInstanceLinkWrapper workflowInstanceLinkWrapper = (WorkflowInstanceLinkWrapper)obj;
533    
534                    if (Validator.equals(_workflowInstanceLink,
535                                            workflowInstanceLinkWrapper._workflowInstanceLink)) {
536                            return true;
537                    }
538    
539                    return false;
540            }
541    
542            @Override
543            public WorkflowInstanceLink getWrappedModel() {
544                    return _workflowInstanceLink;
545            }
546    
547            @Override
548            public boolean isEntityCacheEnabled() {
549                    return _workflowInstanceLink.isEntityCacheEnabled();
550            }
551    
552            @Override
553            public boolean isFinderCacheEnabled() {
554                    return _workflowInstanceLink.isFinderCacheEnabled();
555            }
556    
557            @Override
558            public void resetOriginalValues() {
559                    _workflowInstanceLink.resetOriginalValues();
560            }
561    
562            private final WorkflowInstanceLink _workflowInstanceLink;
563    }