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