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