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