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