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