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 WorkflowInstanceLink}.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see WorkflowInstanceLink
032     * @generated
033     */
034    @ProviderType
035    public class WorkflowInstanceLinkWrapper implements WorkflowInstanceLink,
036            ModelWrapper<WorkflowInstanceLink> {
037            public WorkflowInstanceLinkWrapper(
038                    WorkflowInstanceLink workflowInstanceLink) {
039                    _workflowInstanceLink = workflowInstanceLink;
040            }
041    
042            @Override
043            public Class<?> getModelClass() {
044                    return WorkflowInstanceLink.class;
045            }
046    
047            @Override
048            public String getModelClassName() {
049                    return WorkflowInstanceLink.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("workflowInstanceLinkId", getWorkflowInstanceLinkId());
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("workflowInstanceId", getWorkflowInstanceId());
066    
067                    return attributes;
068            }
069    
070            @Override
071            public void setModelAttributes(Map<String, Object> attributes) {
072                    Long workflowInstanceLinkId = (Long)attributes.get(
073                                    "workflowInstanceLinkId");
074    
075                    if (workflowInstanceLinkId != null) {
076                            setWorkflowInstanceLinkId(workflowInstanceLinkId);
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 workflowInstanceId = (Long)attributes.get("workflowInstanceId");
128    
129                    if (workflowInstanceId != null) {
130                            setWorkflowInstanceId(workflowInstanceId);
131                    }
132            }
133    
134            /**
135            * Returns the primary key of this workflow instance link.
136            *
137            * @return the primary key of this workflow instance link
138            */
139            @Override
140            public long getPrimaryKey() {
141                    return _workflowInstanceLink.getPrimaryKey();
142            }
143    
144            /**
145            * Sets the primary key of this workflow instance link.
146            *
147            * @param primaryKey the primary key of this workflow instance link
148            */
149            @Override
150            public void setPrimaryKey(long primaryKey) {
151                    _workflowInstanceLink.setPrimaryKey(primaryKey);
152            }
153    
154            /**
155            * Returns the workflow instance link ID of this workflow instance link.
156            *
157            * @return the workflow instance link ID of this workflow instance link
158            */
159            @Override
160            public long getWorkflowInstanceLinkId() {
161                    return _workflowInstanceLink.getWorkflowInstanceLinkId();
162            }
163    
164            /**
165            * Sets the workflow instance link ID of this workflow instance link.
166            *
167            * @param workflowInstanceLinkId the workflow instance link ID of this workflow instance link
168            */
169            @Override
170            public void setWorkflowInstanceLinkId(long workflowInstanceLinkId) {
171                    _workflowInstanceLink.setWorkflowInstanceLinkId(workflowInstanceLinkId);
172            }
173    
174            /**
175            * Returns the group ID of this workflow instance link.
176            *
177            * @return the group ID of this workflow instance link
178            */
179            @Override
180            public long getGroupId() {
181                    return _workflowInstanceLink.getGroupId();
182            }
183    
184            /**
185            * Sets the group ID of this workflow instance link.
186            *
187            * @param groupId the group ID of this workflow instance link
188            */
189            @Override
190            public void setGroupId(long groupId) {
191                    _workflowInstanceLink.setGroupId(groupId);
192            }
193    
194            /**
195            * Returns the company ID of this workflow instance link.
196            *
197            * @return the company ID of this workflow instance link
198            */
199            @Override
200            public long getCompanyId() {
201                    return _workflowInstanceLink.getCompanyId();
202            }
203    
204            /**
205            * Sets the company ID of this workflow instance link.
206            *
207            * @param companyId the company ID of this workflow instance link
208            */
209            @Override
210            public void setCompanyId(long companyId) {
211                    _workflowInstanceLink.setCompanyId(companyId);
212            }
213    
214            /**
215            * Returns the user ID of this workflow instance link.
216            *
217            * @return the user ID of this workflow instance link
218            */
219            @Override
220            public long getUserId() {
221                    return _workflowInstanceLink.getUserId();
222            }
223    
224            /**
225            * Sets the user ID of this workflow instance link.
226            *
227            * @param userId the user ID of this workflow instance link
228            */
229            @Override
230            public void setUserId(long userId) {
231                    _workflowInstanceLink.setUserId(userId);
232            }
233    
234            /**
235            * Returns the user uuid of this workflow instance link.
236            *
237            * @return the user uuid of this workflow instance link
238            * @throws SystemException if a system exception occurred
239            */
240            @Override
241            public java.lang.String getUserUuid()
242                    throws com.liferay.portal.kernel.exception.SystemException {
243                    return _workflowInstanceLink.getUserUuid();
244            }
245    
246            /**
247            * Sets the user uuid of this workflow instance link.
248            *
249            * @param userUuid the user uuid of this workflow instance link
250            */
251            @Override
252            public void setUserUuid(java.lang.String userUuid) {
253                    _workflowInstanceLink.setUserUuid(userUuid);
254            }
255    
256            /**
257            * Returns the user name of this workflow instance link.
258            *
259            * @return the user name of this workflow instance link
260            */
261            @Override
262            public java.lang.String getUserName() {
263                    return _workflowInstanceLink.getUserName();
264            }
265    
266            /**
267            * Sets the user name of this workflow instance link.
268            *
269            * @param userName the user name of this workflow instance link
270            */
271            @Override
272            public void setUserName(java.lang.String userName) {
273                    _workflowInstanceLink.setUserName(userName);
274            }
275    
276            /**
277            * Returns the create date of this workflow instance link.
278            *
279            * @return the create date of this workflow instance link
280            */
281            @Override
282            public java.util.Date getCreateDate() {
283                    return _workflowInstanceLink.getCreateDate();
284            }
285    
286            /**
287            * Sets the create date of this workflow instance link.
288            *
289            * @param createDate the create date of this workflow instance link
290            */
291            @Override
292            public void setCreateDate(java.util.Date createDate) {
293                    _workflowInstanceLink.setCreateDate(createDate);
294            }
295    
296            /**
297            * Returns the modified date of this workflow instance link.
298            *
299            * @return the modified date of this workflow instance link
300            */
301            @Override
302            public java.util.Date getModifiedDate() {
303                    return _workflowInstanceLink.getModifiedDate();
304            }
305    
306            /**
307            * Sets the modified date of this workflow instance link.
308            *
309            * @param modifiedDate the modified date of this workflow instance link
310            */
311            @Override
312            public void setModifiedDate(java.util.Date modifiedDate) {
313                    _workflowInstanceLink.setModifiedDate(modifiedDate);
314            }
315    
316            /**
317            * Returns the fully qualified class name of this workflow instance link.
318            *
319            * @return the fully qualified class name of this workflow instance link
320            */
321            @Override
322            public java.lang.String getClassName() {
323                    return _workflowInstanceLink.getClassName();
324            }
325    
326            @Override
327            public void setClassName(java.lang.String className) {
328                    _workflowInstanceLink.setClassName(className);
329            }
330    
331            /**
332            * Returns the class name ID of this workflow instance link.
333            *
334            * @return the class name ID of this workflow instance link
335            */
336            @Override
337            public long getClassNameId() {
338                    return _workflowInstanceLink.getClassNameId();
339            }
340    
341            /**
342            * Sets the class name ID of this workflow instance link.
343            *
344            * @param classNameId the class name ID of this workflow instance link
345            */
346            @Override
347            public void setClassNameId(long classNameId) {
348                    _workflowInstanceLink.setClassNameId(classNameId);
349            }
350    
351            /**
352            * Returns the class p k of this workflow instance link.
353            *
354            * @return the class p k of this workflow instance link
355            */
356            @Override
357            public long getClassPK() {
358                    return _workflowInstanceLink.getClassPK();
359            }
360    
361            /**
362            * Sets the class p k of this workflow instance link.
363            *
364            * @param classPK the class p k of this workflow instance link
365            */
366            @Override
367            public void setClassPK(long classPK) {
368                    _workflowInstanceLink.setClassPK(classPK);
369            }
370    
371            /**
372            * Returns the workflow instance ID of this workflow instance link.
373            *
374            * @return the workflow instance ID of this workflow instance link
375            */
376            @Override
377            public long getWorkflowInstanceId() {
378                    return _workflowInstanceLink.getWorkflowInstanceId();
379            }
380    
381            /**
382            * Sets the workflow instance ID of this workflow instance link.
383            *
384            * @param workflowInstanceId the workflow instance ID of this workflow instance link
385            */
386            @Override
387            public void setWorkflowInstanceId(long workflowInstanceId) {
388                    _workflowInstanceLink.setWorkflowInstanceId(workflowInstanceId);
389            }
390    
391            @Override
392            public boolean isNew() {
393                    return _workflowInstanceLink.isNew();
394            }
395    
396            @Override
397            public void setNew(boolean n) {
398                    _workflowInstanceLink.setNew(n);
399            }
400    
401            @Override
402            public boolean isCachedModel() {
403                    return _workflowInstanceLink.isCachedModel();
404            }
405    
406            @Override
407            public void setCachedModel(boolean cachedModel) {
408                    _workflowInstanceLink.setCachedModel(cachedModel);
409            }
410    
411            @Override
412            public boolean isEscapedModel() {
413                    return _workflowInstanceLink.isEscapedModel();
414            }
415    
416            @Override
417            public java.io.Serializable getPrimaryKeyObj() {
418                    return _workflowInstanceLink.getPrimaryKeyObj();
419            }
420    
421            @Override
422            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
423                    _workflowInstanceLink.setPrimaryKeyObj(primaryKeyObj);
424            }
425    
426            @Override
427            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
428                    return _workflowInstanceLink.getExpandoBridge();
429            }
430    
431            @Override
432            public void setExpandoBridgeAttributes(
433                    com.liferay.portal.model.BaseModel<?> baseModel) {
434                    _workflowInstanceLink.setExpandoBridgeAttributes(baseModel);
435            }
436    
437            @Override
438            public void setExpandoBridgeAttributes(
439                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
440                    _workflowInstanceLink.setExpandoBridgeAttributes(expandoBridge);
441            }
442    
443            @Override
444            public void setExpandoBridgeAttributes(
445                    com.liferay.portal.service.ServiceContext serviceContext) {
446                    _workflowInstanceLink.setExpandoBridgeAttributes(serviceContext);
447            }
448    
449            @Override
450            public java.lang.Object clone() {
451                    return new WorkflowInstanceLinkWrapper((WorkflowInstanceLink)_workflowInstanceLink.clone());
452            }
453    
454            @Override
455            public int compareTo(
456                    com.liferay.portal.model.WorkflowInstanceLink workflowInstanceLink) {
457                    return _workflowInstanceLink.compareTo(workflowInstanceLink);
458            }
459    
460            @Override
461            public int hashCode() {
462                    return _workflowInstanceLink.hashCode();
463            }
464    
465            @Override
466            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.WorkflowInstanceLink> toCacheModel() {
467                    return _workflowInstanceLink.toCacheModel();
468            }
469    
470            @Override
471            public com.liferay.portal.model.WorkflowInstanceLink toEscapedModel() {
472                    return new WorkflowInstanceLinkWrapper(_workflowInstanceLink.toEscapedModel());
473            }
474    
475            @Override
476            public com.liferay.portal.model.WorkflowInstanceLink toUnescapedModel() {
477                    return new WorkflowInstanceLinkWrapper(_workflowInstanceLink.toUnescapedModel());
478            }
479    
480            @Override
481            public java.lang.String toString() {
482                    return _workflowInstanceLink.toString();
483            }
484    
485            @Override
486            public java.lang.String toXmlString() {
487                    return _workflowInstanceLink.toXmlString();
488            }
489    
490            @Override
491            public void persist()
492                    throws com.liferay.portal.kernel.exception.SystemException {
493                    _workflowInstanceLink.persist();
494            }
495    
496            @Override
497            public boolean equals(Object obj) {
498                    if (this == obj) {
499                            return true;
500                    }
501    
502                    if (!(obj instanceof WorkflowInstanceLinkWrapper)) {
503                            return false;
504                    }
505    
506                    WorkflowInstanceLinkWrapper workflowInstanceLinkWrapper = (WorkflowInstanceLinkWrapper)obj;
507    
508                    if (Validator.equals(_workflowInstanceLink,
509                                            workflowInstanceLinkWrapper._workflowInstanceLink)) {
510                            return true;
511                    }
512    
513                    return false;
514            }
515    
516            /**
517             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
518             */
519            public WorkflowInstanceLink getWrappedWorkflowInstanceLink() {
520                    return _workflowInstanceLink;
521            }
522    
523            @Override
524            public WorkflowInstanceLink getWrappedModel() {
525                    return _workflowInstanceLink;
526            }
527    
528            @Override
529            public void resetOriginalValues() {
530                    _workflowInstanceLink.resetOriginalValues();
531            }
532    
533            private WorkflowInstanceLink _workflowInstanceLink;
534    }