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