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 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 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(Date createDate) {
411                    _workflowDefinitionLink.setCreateDate(createDate);
412            }
413    
414            @Override
415            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
416                    _workflowDefinitionLink.setExpandoBridgeAttributes(baseModel);
417            }
418    
419            @Override
420            public void setExpandoBridgeAttributes(
421                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
422                    _workflowDefinitionLink.setExpandoBridgeAttributes(expandoBridge);
423            }
424    
425            @Override
426            public void setExpandoBridgeAttributes(
427                    com.liferay.portal.service.ServiceContext serviceContext) {
428                    _workflowDefinitionLink.setExpandoBridgeAttributes(serviceContext);
429            }
430    
431            /**
432            * Sets the group ID of this workflow definition link.
433            *
434            * @param groupId the group ID of this workflow definition link
435            */
436            @Override
437            public void setGroupId(long groupId) {
438                    _workflowDefinitionLink.setGroupId(groupId);
439            }
440    
441            /**
442            * Sets the modified date of this workflow definition link.
443            *
444            * @param modifiedDate the modified date of this workflow definition link
445            */
446            @Override
447            public void setModifiedDate(Date modifiedDate) {
448                    _workflowDefinitionLink.setModifiedDate(modifiedDate);
449            }
450    
451            /**
452            * Sets the mvcc version of this workflow definition link.
453            *
454            * @param mvccVersion the mvcc version of this workflow definition link
455            */
456            @Override
457            public void setMvccVersion(long mvccVersion) {
458                    _workflowDefinitionLink.setMvccVersion(mvccVersion);
459            }
460    
461            @Override
462            public void setNew(boolean n) {
463                    _workflowDefinitionLink.setNew(n);
464            }
465    
466            /**
467            * Sets the primary key of this workflow definition link.
468            *
469            * @param primaryKey the primary key of this workflow definition link
470            */
471            @Override
472            public void setPrimaryKey(long primaryKey) {
473                    _workflowDefinitionLink.setPrimaryKey(primaryKey);
474            }
475    
476            @Override
477            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
478                    _workflowDefinitionLink.setPrimaryKeyObj(primaryKeyObj);
479            }
480    
481            /**
482            * Sets the type p k of this workflow definition link.
483            *
484            * @param typePK the type p k of this workflow definition link
485            */
486            @Override
487            public void setTypePK(long typePK) {
488                    _workflowDefinitionLink.setTypePK(typePK);
489            }
490    
491            /**
492            * Sets the user ID of this workflow definition link.
493            *
494            * @param userId the user ID of this workflow definition link
495            */
496            @Override
497            public void setUserId(long userId) {
498                    _workflowDefinitionLink.setUserId(userId);
499            }
500    
501            /**
502            * Sets the user name of this workflow definition link.
503            *
504            * @param userName the user name of this workflow definition link
505            */
506            @Override
507            public void setUserName(java.lang.String userName) {
508                    _workflowDefinitionLink.setUserName(userName);
509            }
510    
511            /**
512            * Sets the user uuid of this workflow definition link.
513            *
514            * @param userUuid the user uuid of this workflow definition link
515            */
516            @Override
517            public void setUserUuid(java.lang.String userUuid) {
518                    _workflowDefinitionLink.setUserUuid(userUuid);
519            }
520    
521            /**
522            * Sets the workflow definition link ID of this workflow definition link.
523            *
524            * @param workflowDefinitionLinkId the workflow definition link ID of this workflow definition link
525            */
526            @Override
527            public void setWorkflowDefinitionLinkId(long workflowDefinitionLinkId) {
528                    _workflowDefinitionLink.setWorkflowDefinitionLinkId(workflowDefinitionLinkId);
529            }
530    
531            /**
532            * Sets the workflow definition name of this workflow definition link.
533            *
534            * @param workflowDefinitionName the workflow definition name of this workflow definition link
535            */
536            @Override
537            public void setWorkflowDefinitionName(
538                    java.lang.String workflowDefinitionName) {
539                    _workflowDefinitionLink.setWorkflowDefinitionName(workflowDefinitionName);
540            }
541    
542            /**
543            * Sets the workflow definition version of this workflow definition link.
544            *
545            * @param workflowDefinitionVersion the workflow definition version of this workflow definition link
546            */
547            @Override
548            public void setWorkflowDefinitionVersion(int workflowDefinitionVersion) {
549                    _workflowDefinitionLink.setWorkflowDefinitionVersion(workflowDefinitionVersion);
550            }
551    
552            @Override
553            public CacheModel<com.liferay.portal.model.WorkflowDefinitionLink> toCacheModel() {
554                    return _workflowDefinitionLink.toCacheModel();
555            }
556    
557            @Override
558            public com.liferay.portal.model.WorkflowDefinitionLink toEscapedModel() {
559                    return new WorkflowDefinitionLinkWrapper(_workflowDefinitionLink.toEscapedModel());
560            }
561    
562            @Override
563            public java.lang.String toString() {
564                    return _workflowDefinitionLink.toString();
565            }
566    
567            @Override
568            public com.liferay.portal.model.WorkflowDefinitionLink toUnescapedModel() {
569                    return new WorkflowDefinitionLinkWrapper(_workflowDefinitionLink.toUnescapedModel());
570            }
571    
572            @Override
573            public java.lang.String toXmlString() {
574                    return _workflowDefinitionLink.toXmlString();
575            }
576    
577            @Override
578            public boolean equals(Object obj) {
579                    if (this == obj) {
580                            return true;
581                    }
582    
583                    if (!(obj instanceof WorkflowDefinitionLinkWrapper)) {
584                            return false;
585                    }
586    
587                    WorkflowDefinitionLinkWrapper workflowDefinitionLinkWrapper = (WorkflowDefinitionLinkWrapper)obj;
588    
589                    if (Validator.equals(_workflowDefinitionLink,
590                                            workflowDefinitionLinkWrapper._workflowDefinitionLink)) {
591                            return true;
592                    }
593    
594                    return false;
595            }
596    
597            @Override
598            public WorkflowDefinitionLink getWrappedModel() {
599                    return _workflowDefinitionLink;
600            }
601    
602            @Override
603            public boolean isEntityCacheEnabled() {
604                    return _workflowDefinitionLink.isEntityCacheEnabled();
605            }
606    
607            @Override
608            public boolean isFinderCacheEnabled() {
609                    return _workflowDefinitionLink.isFinderCacheEnabled();
610            }
611    
612            @Override
613            public void resetOriginalValues() {
614                    _workflowDefinitionLink.resetOriginalValues();
615            }
616    
617            private final WorkflowDefinitionLink _workflowDefinitionLink;
618    }