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