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