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.portlet.social.model;
016    
017    import com.liferay.portal.kernel.util.Validator;
018    import com.liferay.portal.model.ModelWrapper;
019    
020    import java.util.HashMap;
021    import java.util.Map;
022    
023    /**
024     * <p>
025     * This class is a wrapper for {@link SocialActivity}.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see SocialActivity
030     * @generated
031     */
032    public class SocialActivityWrapper implements SocialActivity,
033            ModelWrapper<SocialActivity> {
034            public SocialActivityWrapper(SocialActivity socialActivity) {
035                    _socialActivity = socialActivity;
036            }
037    
038            @Override
039            public Class<?> getModelClass() {
040                    return SocialActivity.class;
041            }
042    
043            @Override
044            public String getModelClassName() {
045                    return SocialActivity.class.getName();
046            }
047    
048            @Override
049            public Map<String, Object> getModelAttributes() {
050                    Map<String, Object> attributes = new HashMap<String, Object>();
051    
052                    attributes.put("activityId", getActivityId());
053                    attributes.put("groupId", getGroupId());
054                    attributes.put("companyId", getCompanyId());
055                    attributes.put("userId", getUserId());
056                    attributes.put("createDate", getCreateDate());
057                    attributes.put("activitySetId", getActivitySetId());
058                    attributes.put("mirrorActivityId", getMirrorActivityId());
059                    attributes.put("classNameId", getClassNameId());
060                    attributes.put("classPK", getClassPK());
061                    attributes.put("parentClassNameId", getParentClassNameId());
062                    attributes.put("parentClassPK", getParentClassPK());
063                    attributes.put("type", getType());
064                    attributes.put("extraData", getExtraData());
065                    attributes.put("receiverUserId", getReceiverUserId());
066    
067                    return attributes;
068            }
069    
070            @Override
071            public void setModelAttributes(Map<String, Object> attributes) {
072                    Long activityId = (Long)attributes.get("activityId");
073    
074                    if (activityId != null) {
075                            setActivityId(activityId);
076                    }
077    
078                    Long groupId = (Long)attributes.get("groupId");
079    
080                    if (groupId != null) {
081                            setGroupId(groupId);
082                    }
083    
084                    Long companyId = (Long)attributes.get("companyId");
085    
086                    if (companyId != null) {
087                            setCompanyId(companyId);
088                    }
089    
090                    Long userId = (Long)attributes.get("userId");
091    
092                    if (userId != null) {
093                            setUserId(userId);
094                    }
095    
096                    Long createDate = (Long)attributes.get("createDate");
097    
098                    if (createDate != null) {
099                            setCreateDate(createDate);
100                    }
101    
102                    Long activitySetId = (Long)attributes.get("activitySetId");
103    
104                    if (activitySetId != null) {
105                            setActivitySetId(activitySetId);
106                    }
107    
108                    Long mirrorActivityId = (Long)attributes.get("mirrorActivityId");
109    
110                    if (mirrorActivityId != null) {
111                            setMirrorActivityId(mirrorActivityId);
112                    }
113    
114                    Long classNameId = (Long)attributes.get("classNameId");
115    
116                    if (classNameId != null) {
117                            setClassNameId(classNameId);
118                    }
119    
120                    Long classPK = (Long)attributes.get("classPK");
121    
122                    if (classPK != null) {
123                            setClassPK(classPK);
124                    }
125    
126                    Long parentClassNameId = (Long)attributes.get("parentClassNameId");
127    
128                    if (parentClassNameId != null) {
129                            setParentClassNameId(parentClassNameId);
130                    }
131    
132                    Long parentClassPK = (Long)attributes.get("parentClassPK");
133    
134                    if (parentClassPK != null) {
135                            setParentClassPK(parentClassPK);
136                    }
137    
138                    Integer type = (Integer)attributes.get("type");
139    
140                    if (type != null) {
141                            setType(type);
142                    }
143    
144                    String extraData = (String)attributes.get("extraData");
145    
146                    if (extraData != null) {
147                            setExtraData(extraData);
148                    }
149    
150                    Long receiverUserId = (Long)attributes.get("receiverUserId");
151    
152                    if (receiverUserId != null) {
153                            setReceiverUserId(receiverUserId);
154                    }
155            }
156    
157            /**
158            * Returns the primary key of this social activity.
159            *
160            * @return the primary key of this social activity
161            */
162            @Override
163            public long getPrimaryKey() {
164                    return _socialActivity.getPrimaryKey();
165            }
166    
167            /**
168            * Sets the primary key of this social activity.
169            *
170            * @param primaryKey the primary key of this social activity
171            */
172            @Override
173            public void setPrimaryKey(long primaryKey) {
174                    _socialActivity.setPrimaryKey(primaryKey);
175            }
176    
177            /**
178            * Returns the activity ID of this social activity.
179            *
180            * @return the activity ID of this social activity
181            */
182            @Override
183            public long getActivityId() {
184                    return _socialActivity.getActivityId();
185            }
186    
187            /**
188            * Sets the activity ID of this social activity.
189            *
190            * @param activityId the activity ID of this social activity
191            */
192            @Override
193            public void setActivityId(long activityId) {
194                    _socialActivity.setActivityId(activityId);
195            }
196    
197            /**
198            * Returns the group ID of this social activity.
199            *
200            * @return the group ID of this social activity
201            */
202            @Override
203            public long getGroupId() {
204                    return _socialActivity.getGroupId();
205            }
206    
207            /**
208            * Sets the group ID of this social activity.
209            *
210            * @param groupId the group ID of this social activity
211            */
212            @Override
213            public void setGroupId(long groupId) {
214                    _socialActivity.setGroupId(groupId);
215            }
216    
217            /**
218            * Returns the company ID of this social activity.
219            *
220            * @return the company ID of this social activity
221            */
222            @Override
223            public long getCompanyId() {
224                    return _socialActivity.getCompanyId();
225            }
226    
227            /**
228            * Sets the company ID of this social activity.
229            *
230            * @param companyId the company ID of this social activity
231            */
232            @Override
233            public void setCompanyId(long companyId) {
234                    _socialActivity.setCompanyId(companyId);
235            }
236    
237            /**
238            * Returns the user ID of this social activity.
239            *
240            * @return the user ID of this social activity
241            */
242            @Override
243            public long getUserId() {
244                    return _socialActivity.getUserId();
245            }
246    
247            /**
248            * Sets the user ID of this social activity.
249            *
250            * @param userId the user ID of this social activity
251            */
252            @Override
253            public void setUserId(long userId) {
254                    _socialActivity.setUserId(userId);
255            }
256    
257            /**
258            * Returns the user uuid of this social activity.
259            *
260            * @return the user uuid of this social activity
261            * @throws SystemException if a system exception occurred
262            */
263            @Override
264            public java.lang.String getUserUuid()
265                    throws com.liferay.portal.kernel.exception.SystemException {
266                    return _socialActivity.getUserUuid();
267            }
268    
269            /**
270            * Sets the user uuid of this social activity.
271            *
272            * @param userUuid the user uuid of this social activity
273            */
274            @Override
275            public void setUserUuid(java.lang.String userUuid) {
276                    _socialActivity.setUserUuid(userUuid);
277            }
278    
279            /**
280            * Returns the create date of this social activity.
281            *
282            * @return the create date of this social activity
283            */
284            @Override
285            public long getCreateDate() {
286                    return _socialActivity.getCreateDate();
287            }
288    
289            /**
290            * Sets the create date of this social activity.
291            *
292            * @param createDate the create date of this social activity
293            */
294            @Override
295            public void setCreateDate(long createDate) {
296                    _socialActivity.setCreateDate(createDate);
297            }
298    
299            /**
300            * Returns the activity set ID of this social activity.
301            *
302            * @return the activity set ID of this social activity
303            */
304            @Override
305            public long getActivitySetId() {
306                    return _socialActivity.getActivitySetId();
307            }
308    
309            /**
310            * Sets the activity set ID of this social activity.
311            *
312            * @param activitySetId the activity set ID of this social activity
313            */
314            @Override
315            public void setActivitySetId(long activitySetId) {
316                    _socialActivity.setActivitySetId(activitySetId);
317            }
318    
319            /**
320            * Returns the mirror activity ID of this social activity.
321            *
322            * @return the mirror activity ID of this social activity
323            */
324            @Override
325            public long getMirrorActivityId() {
326                    return _socialActivity.getMirrorActivityId();
327            }
328    
329            /**
330            * Sets the mirror activity ID of this social activity.
331            *
332            * @param mirrorActivityId the mirror activity ID of this social activity
333            */
334            @Override
335            public void setMirrorActivityId(long mirrorActivityId) {
336                    _socialActivity.setMirrorActivityId(mirrorActivityId);
337            }
338    
339            /**
340            * Returns the fully qualified class name of this social activity.
341            *
342            * @return the fully qualified class name of this social activity
343            */
344            @Override
345            public java.lang.String getClassName() {
346                    return _socialActivity.getClassName();
347            }
348    
349            @Override
350            public void setClassName(java.lang.String className) {
351                    _socialActivity.setClassName(className);
352            }
353    
354            /**
355            * Returns the class name ID of this social activity.
356            *
357            * @return the class name ID of this social activity
358            */
359            @Override
360            public long getClassNameId() {
361                    return _socialActivity.getClassNameId();
362            }
363    
364            /**
365            * Sets the class name ID of this social activity.
366            *
367            * @param classNameId the class name ID of this social activity
368            */
369            @Override
370            public void setClassNameId(long classNameId) {
371                    _socialActivity.setClassNameId(classNameId);
372            }
373    
374            /**
375            * Returns the class p k of this social activity.
376            *
377            * @return the class p k of this social activity
378            */
379            @Override
380            public long getClassPK() {
381                    return _socialActivity.getClassPK();
382            }
383    
384            /**
385            * Sets the class p k of this social activity.
386            *
387            * @param classPK the class p k of this social activity
388            */
389            @Override
390            public void setClassPK(long classPK) {
391                    _socialActivity.setClassPK(classPK);
392            }
393    
394            /**
395            * Returns the parent class name ID of this social activity.
396            *
397            * @return the parent class name ID of this social activity
398            */
399            @Override
400            public long getParentClassNameId() {
401                    return _socialActivity.getParentClassNameId();
402            }
403    
404            /**
405            * Sets the parent class name ID of this social activity.
406            *
407            * @param parentClassNameId the parent class name ID of this social activity
408            */
409            @Override
410            public void setParentClassNameId(long parentClassNameId) {
411                    _socialActivity.setParentClassNameId(parentClassNameId);
412            }
413    
414            /**
415            * Returns the parent class p k of this social activity.
416            *
417            * @return the parent class p k of this social activity
418            */
419            @Override
420            public long getParentClassPK() {
421                    return _socialActivity.getParentClassPK();
422            }
423    
424            /**
425            * Sets the parent class p k of this social activity.
426            *
427            * @param parentClassPK the parent class p k of this social activity
428            */
429            @Override
430            public void setParentClassPK(long parentClassPK) {
431                    _socialActivity.setParentClassPK(parentClassPK);
432            }
433    
434            /**
435            * Returns the type of this social activity.
436            *
437            * @return the type of this social activity
438            */
439            @Override
440            public int getType() {
441                    return _socialActivity.getType();
442            }
443    
444            /**
445            * Sets the type of this social activity.
446            *
447            * @param type the type of this social activity
448            */
449            @Override
450            public void setType(int type) {
451                    _socialActivity.setType(type);
452            }
453    
454            /**
455            * Returns the extra data of this social activity.
456            *
457            * @return the extra data of this social activity
458            */
459            @Override
460            public java.lang.String getExtraData() {
461                    return _socialActivity.getExtraData();
462            }
463    
464            /**
465            * Sets the extra data of this social activity.
466            *
467            * @param extraData the extra data of this social activity
468            */
469            @Override
470            public void setExtraData(java.lang.String extraData) {
471                    _socialActivity.setExtraData(extraData);
472            }
473    
474            /**
475            * Returns the receiver user ID of this social activity.
476            *
477            * @return the receiver user ID of this social activity
478            */
479            @Override
480            public long getReceiverUserId() {
481                    return _socialActivity.getReceiverUserId();
482            }
483    
484            /**
485            * Sets the receiver user ID of this social activity.
486            *
487            * @param receiverUserId the receiver user ID of this social activity
488            */
489            @Override
490            public void setReceiverUserId(long receiverUserId) {
491                    _socialActivity.setReceiverUserId(receiverUserId);
492            }
493    
494            /**
495            * Returns the receiver user uuid of this social activity.
496            *
497            * @return the receiver user uuid of this social activity
498            * @throws SystemException if a system exception occurred
499            */
500            @Override
501            public java.lang.String getReceiverUserUuid()
502                    throws com.liferay.portal.kernel.exception.SystemException {
503                    return _socialActivity.getReceiverUserUuid();
504            }
505    
506            /**
507            * Sets the receiver user uuid of this social activity.
508            *
509            * @param receiverUserUuid the receiver user uuid of this social activity
510            */
511            @Override
512            public void setReceiverUserUuid(java.lang.String receiverUserUuid) {
513                    _socialActivity.setReceiverUserUuid(receiverUserUuid);
514            }
515    
516            @Override
517            public boolean isNew() {
518                    return _socialActivity.isNew();
519            }
520    
521            @Override
522            public void setNew(boolean n) {
523                    _socialActivity.setNew(n);
524            }
525    
526            @Override
527            public boolean isCachedModel() {
528                    return _socialActivity.isCachedModel();
529            }
530    
531            @Override
532            public void setCachedModel(boolean cachedModel) {
533                    _socialActivity.setCachedModel(cachedModel);
534            }
535    
536            @Override
537            public boolean isEscapedModel() {
538                    return _socialActivity.isEscapedModel();
539            }
540    
541            @Override
542            public java.io.Serializable getPrimaryKeyObj() {
543                    return _socialActivity.getPrimaryKeyObj();
544            }
545    
546            @Override
547            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
548                    _socialActivity.setPrimaryKeyObj(primaryKeyObj);
549            }
550    
551            @Override
552            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
553                    return _socialActivity.getExpandoBridge();
554            }
555    
556            @Override
557            public void setExpandoBridgeAttributes(
558                    com.liferay.portal.model.BaseModel<?> baseModel) {
559                    _socialActivity.setExpandoBridgeAttributes(baseModel);
560            }
561    
562            @Override
563            public void setExpandoBridgeAttributes(
564                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
565                    _socialActivity.setExpandoBridgeAttributes(expandoBridge);
566            }
567    
568            @Override
569            public void setExpandoBridgeAttributes(
570                    com.liferay.portal.service.ServiceContext serviceContext) {
571                    _socialActivity.setExpandoBridgeAttributes(serviceContext);
572            }
573    
574            @Override
575            public java.lang.Object clone() {
576                    return new SocialActivityWrapper((SocialActivity)_socialActivity.clone());
577            }
578    
579            @Override
580            public int compareTo(
581                    com.liferay.portlet.social.model.SocialActivity socialActivity) {
582                    return _socialActivity.compareTo(socialActivity);
583            }
584    
585            @Override
586            public int hashCode() {
587                    return _socialActivity.hashCode();
588            }
589    
590            @Override
591            public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialActivity> toCacheModel() {
592                    return _socialActivity.toCacheModel();
593            }
594    
595            @Override
596            public com.liferay.portlet.social.model.SocialActivity toEscapedModel() {
597                    return new SocialActivityWrapper(_socialActivity.toEscapedModel());
598            }
599    
600            @Override
601            public com.liferay.portlet.social.model.SocialActivity toUnescapedModel() {
602                    return new SocialActivityWrapper(_socialActivity.toUnescapedModel());
603            }
604    
605            @Override
606            public java.lang.String toString() {
607                    return _socialActivity.toString();
608            }
609    
610            @Override
611            public java.lang.String toXmlString() {
612                    return _socialActivity.toXmlString();
613            }
614    
615            @Override
616            public void persist()
617                    throws com.liferay.portal.kernel.exception.SystemException {
618                    _socialActivity.persist();
619            }
620    
621            @Override
622            public com.liferay.portlet.asset.model.AssetEntry getAssetEntry()
623                    throws com.liferay.portal.kernel.exception.SystemException {
624                    return _socialActivity.getAssetEntry();
625            }
626    
627            @Override
628            public java.lang.String getExtraDataValue(java.lang.String key)
629                    throws com.liferay.portal.kernel.json.JSONException {
630                    return _socialActivity.getExtraDataValue(key);
631            }
632    
633            @Override
634            public java.lang.String getExtraDataValue(java.lang.String key,
635                    java.util.Locale locale)
636                    throws com.liferay.portal.kernel.json.JSONException {
637                    return _socialActivity.getExtraDataValue(key, locale);
638            }
639    
640            @Override
641            public boolean isClassName(java.lang.String className) {
642                    return _socialActivity.isClassName(className);
643            }
644    
645            @Override
646            public void setAssetEntry(
647                    com.liferay.portlet.asset.model.AssetEntry assetEntry) {
648                    _socialActivity.setAssetEntry(assetEntry);
649            }
650    
651            @Override
652            public void setExtraDataValue(java.lang.String key, java.lang.String value)
653                    throws com.liferay.portal.kernel.json.JSONException {
654                    _socialActivity.setExtraDataValue(key, value);
655            }
656    
657            @Override
658            public boolean equals(Object obj) {
659                    if (this == obj) {
660                            return true;
661                    }
662    
663                    if (!(obj instanceof SocialActivityWrapper)) {
664                            return false;
665                    }
666    
667                    SocialActivityWrapper socialActivityWrapper = (SocialActivityWrapper)obj;
668    
669                    if (Validator.equals(_socialActivity,
670                                            socialActivityWrapper._socialActivity)) {
671                            return true;
672                    }
673    
674                    return false;
675            }
676    
677            /**
678             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
679             */
680            public SocialActivity getWrappedSocialActivity() {
681                    return _socialActivity;
682            }
683    
684            @Override
685            public SocialActivity getWrappedModel() {
686                    return _socialActivity;
687            }
688    
689            @Override
690            public void resetOriginalValues() {
691                    _socialActivity.resetOriginalValues();
692            }
693    
694            private SocialActivity _socialActivity;
695    }