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