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    import com.liferay.portal.kernel.util.Validator;
024    
025    import java.io.Serializable;
026    
027    import java.util.HashMap;
028    import java.util.Map;
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 java.lang.Object clone() {
167                    return new SocialActivityWrapper((SocialActivity)_socialActivity.clone());
168            }
169    
170            @Override
171            public int compareTo(
172                    com.liferay.social.kernel.model.SocialActivity socialActivity) {
173                    return _socialActivity.compareTo(socialActivity);
174            }
175    
176            /**
177            * Returns the activity ID of this social activity.
178            *
179            * @return the activity ID of this social activity
180            */
181            @Override
182            public long getActivityId() {
183                    return _socialActivity.getActivityId();
184            }
185    
186            /**
187            * Returns the activity set ID of this social activity.
188            *
189            * @return the activity set ID of this social activity
190            */
191            @Override
192            public long getActivitySetId() {
193                    return _socialActivity.getActivitySetId();
194            }
195    
196            @Override
197            public com.liferay.asset.kernel.model.AssetEntry getAssetEntry() {
198                    return _socialActivity.getAssetEntry();
199            }
200    
201            /**
202            * Returns the fully qualified class name of this social activity.
203            *
204            * @return the fully qualified class name of this social activity
205            */
206            @Override
207            public java.lang.String getClassName() {
208                    return _socialActivity.getClassName();
209            }
210    
211            /**
212            * Returns the class name ID of this social activity.
213            *
214            * @return the class name ID of this social activity
215            */
216            @Override
217            public long getClassNameId() {
218                    return _socialActivity.getClassNameId();
219            }
220    
221            /**
222            * Returns the class p k of this social activity.
223            *
224            * @return the class p k of this social activity
225            */
226            @Override
227            public long getClassPK() {
228                    return _socialActivity.getClassPK();
229            }
230    
231            /**
232            * Returns the company ID of this social activity.
233            *
234            * @return the company ID of this social activity
235            */
236            @Override
237            public long getCompanyId() {
238                    return _socialActivity.getCompanyId();
239            }
240    
241            /**
242            * Returns the create date of this social activity.
243            *
244            * @return the create date of this social activity
245            */
246            @Override
247            public long getCreateDate() {
248                    return _socialActivity.getCreateDate();
249            }
250    
251            @Override
252            public ExpandoBridge getExpandoBridge() {
253                    return _socialActivity.getExpandoBridge();
254            }
255    
256            /**
257            * Returns the extra data of this social activity.
258            *
259            * @return the extra data of this social activity
260            */
261            @Override
262            public java.lang.String getExtraData() {
263                    return _socialActivity.getExtraData();
264            }
265    
266            @Override
267            public java.lang.String getExtraDataValue(java.lang.String key)
268                    throws com.liferay.portal.kernel.json.JSONException {
269                    return _socialActivity.getExtraDataValue(key);
270            }
271    
272            @Override
273            public java.lang.String getExtraDataValue(java.lang.String key,
274                    java.util.Locale locale)
275                    throws com.liferay.portal.kernel.json.JSONException {
276                    return _socialActivity.getExtraDataValue(key, locale);
277            }
278    
279            /**
280            * Returns the group ID of this social activity.
281            *
282            * @return the group ID of this social activity
283            */
284            @Override
285            public long getGroupId() {
286                    return _socialActivity.getGroupId();
287            }
288    
289            /**
290            * Returns the mirror activity ID of this social activity.
291            *
292            * @return the mirror activity ID of this social activity
293            */
294            @Override
295            public long getMirrorActivityId() {
296                    return _socialActivity.getMirrorActivityId();
297            }
298    
299            /**
300            * Returns the parent class name ID of this social activity.
301            *
302            * @return the parent class name ID of this social activity
303            */
304            @Override
305            public long getParentClassNameId() {
306                    return _socialActivity.getParentClassNameId();
307            }
308    
309            /**
310            * Returns the parent class p k of this social activity.
311            *
312            * @return the parent class p k of this social activity
313            */
314            @Override
315            public long getParentClassPK() {
316                    return _socialActivity.getParentClassPK();
317            }
318    
319            /**
320            * Returns the primary key of this social activity.
321            *
322            * @return the primary key of this social activity
323            */
324            @Override
325            public long getPrimaryKey() {
326                    return _socialActivity.getPrimaryKey();
327            }
328    
329            @Override
330            public Serializable getPrimaryKeyObj() {
331                    return _socialActivity.getPrimaryKeyObj();
332            }
333    
334            /**
335            * Returns the receiver user ID of this social activity.
336            *
337            * @return the receiver user ID of this social activity
338            */
339            @Override
340            public long getReceiverUserId() {
341                    return _socialActivity.getReceiverUserId();
342            }
343    
344            /**
345            * Returns the receiver user uuid of this social activity.
346            *
347            * @return the receiver user uuid of this social activity
348            */
349            @Override
350            public java.lang.String getReceiverUserUuid() {
351                    return _socialActivity.getReceiverUserUuid();
352            }
353    
354            /**
355            * Returns the type of this social activity.
356            *
357            * @return the type of this social activity
358            */
359            @Override
360            public int getType() {
361                    return _socialActivity.getType();
362            }
363    
364            /**
365            * Returns the user ID of this social activity.
366            *
367            * @return the user ID of this social activity
368            */
369            @Override
370            public long getUserId() {
371                    return _socialActivity.getUserId();
372            }
373    
374            /**
375            * Returns the user uuid of this social activity.
376            *
377            * @return the user uuid of this social activity
378            */
379            @Override
380            public java.lang.String getUserUuid() {
381                    return _socialActivity.getUserUuid();
382            }
383    
384            @Override
385            public int hashCode() {
386                    return _socialActivity.hashCode();
387            }
388    
389            @Override
390            public boolean isCachedModel() {
391                    return _socialActivity.isCachedModel();
392            }
393    
394            @Override
395            public boolean isClassName(java.lang.String className) {
396                    return _socialActivity.isClassName(className);
397            }
398    
399            @Override
400            public boolean isEscapedModel() {
401                    return _socialActivity.isEscapedModel();
402            }
403    
404            @Override
405            public boolean isNew() {
406                    return _socialActivity.isNew();
407            }
408    
409            @Override
410            public void persist() {
411                    _socialActivity.persist();
412            }
413    
414            /**
415            * Sets the activity ID of this social activity.
416            *
417            * @param activityId the activity ID of this social activity
418            */
419            @Override
420            public void setActivityId(long activityId) {
421                    _socialActivity.setActivityId(activityId);
422            }
423    
424            /**
425            * Sets the activity set ID of this social activity.
426            *
427            * @param activitySetId the activity set ID of this social activity
428            */
429            @Override
430            public void setActivitySetId(long activitySetId) {
431                    _socialActivity.setActivitySetId(activitySetId);
432            }
433    
434            @Override
435            public void setAssetEntry(
436                    com.liferay.asset.kernel.model.AssetEntry assetEntry) {
437                    _socialActivity.setAssetEntry(assetEntry);
438            }
439    
440            @Override
441            public void setCachedModel(boolean cachedModel) {
442                    _socialActivity.setCachedModel(cachedModel);
443            }
444    
445            @Override
446            public void setClassName(java.lang.String className) {
447                    _socialActivity.setClassName(className);
448            }
449    
450            /**
451            * Sets the class name ID of this social activity.
452            *
453            * @param classNameId the class name ID of this social activity
454            */
455            @Override
456            public void setClassNameId(long classNameId) {
457                    _socialActivity.setClassNameId(classNameId);
458            }
459    
460            /**
461            * Sets the class p k of this social activity.
462            *
463            * @param classPK the class p k of this social activity
464            */
465            @Override
466            public void setClassPK(long classPK) {
467                    _socialActivity.setClassPK(classPK);
468            }
469    
470            /**
471            * Sets the company ID of this social activity.
472            *
473            * @param companyId the company ID of this social activity
474            */
475            @Override
476            public void setCompanyId(long companyId) {
477                    _socialActivity.setCompanyId(companyId);
478            }
479    
480            /**
481            * Sets the create date of this social activity.
482            *
483            * @param createDate the create date of this social activity
484            */
485            @Override
486            public void setCreateDate(long createDate) {
487                    _socialActivity.setCreateDate(createDate);
488            }
489    
490            @Override
491            public void setExpandoBridgeAttributes(
492                    com.liferay.portal.kernel.model.BaseModel<?> baseModel) {
493                    _socialActivity.setExpandoBridgeAttributes(baseModel);
494            }
495    
496            @Override
497            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
498                    _socialActivity.setExpandoBridgeAttributes(expandoBridge);
499            }
500    
501            @Override
502            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
503                    _socialActivity.setExpandoBridgeAttributes(serviceContext);
504            }
505    
506            /**
507            * Sets the extra data of this social activity.
508            *
509            * @param extraData the extra data of this social activity
510            */
511            @Override
512            public void setExtraData(java.lang.String extraData) {
513                    _socialActivity.setExtraData(extraData);
514            }
515    
516            @Override
517            public void setExtraDataValue(java.lang.String key, java.lang.String value)
518                    throws com.liferay.portal.kernel.json.JSONException {
519                    _socialActivity.setExtraDataValue(key, value);
520            }
521    
522            /**
523            * Sets the group ID of this social activity.
524            *
525            * @param groupId the group ID of this social activity
526            */
527            @Override
528            public void setGroupId(long groupId) {
529                    _socialActivity.setGroupId(groupId);
530            }
531    
532            /**
533            * Sets the mirror activity ID of this social activity.
534            *
535            * @param mirrorActivityId the mirror activity ID of this social activity
536            */
537            @Override
538            public void setMirrorActivityId(long mirrorActivityId) {
539                    _socialActivity.setMirrorActivityId(mirrorActivityId);
540            }
541    
542            @Override
543            public void setNew(boolean n) {
544                    _socialActivity.setNew(n);
545            }
546    
547            /**
548            * Sets the parent class name ID of this social activity.
549            *
550            * @param parentClassNameId the parent class name ID of this social activity
551            */
552            @Override
553            public void setParentClassNameId(long parentClassNameId) {
554                    _socialActivity.setParentClassNameId(parentClassNameId);
555            }
556    
557            /**
558            * Sets the parent class p k of this social activity.
559            *
560            * @param parentClassPK the parent class p k of this social activity
561            */
562            @Override
563            public void setParentClassPK(long parentClassPK) {
564                    _socialActivity.setParentClassPK(parentClassPK);
565            }
566    
567            /**
568            * Sets the primary key of this social activity.
569            *
570            * @param primaryKey the primary key of this social activity
571            */
572            @Override
573            public void setPrimaryKey(long primaryKey) {
574                    _socialActivity.setPrimaryKey(primaryKey);
575            }
576    
577            @Override
578            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
579                    _socialActivity.setPrimaryKeyObj(primaryKeyObj);
580            }
581    
582            /**
583            * Sets the receiver user ID of this social activity.
584            *
585            * @param receiverUserId the receiver user ID of this social activity
586            */
587            @Override
588            public void setReceiverUserId(long receiverUserId) {
589                    _socialActivity.setReceiverUserId(receiverUserId);
590            }
591    
592            /**
593            * Sets the receiver user uuid of this social activity.
594            *
595            * @param receiverUserUuid the receiver user uuid of this social activity
596            */
597            @Override
598            public void setReceiverUserUuid(java.lang.String receiverUserUuid) {
599                    _socialActivity.setReceiverUserUuid(receiverUserUuid);
600            }
601    
602            /**
603            * Sets the type of this social activity.
604            *
605            * @param type the type of this social activity
606            */
607            @Override
608            public void setType(int type) {
609                    _socialActivity.setType(type);
610            }
611    
612            /**
613            * Sets the user ID of this social activity.
614            *
615            * @param userId the user ID of this social activity
616            */
617            @Override
618            public void setUserId(long userId) {
619                    _socialActivity.setUserId(userId);
620            }
621    
622            /**
623            * Sets the user uuid of this social activity.
624            *
625            * @param userUuid the user uuid of this social activity
626            */
627            @Override
628            public void setUserUuid(java.lang.String userUuid) {
629                    _socialActivity.setUserUuid(userUuid);
630            }
631    
632            @Override
633            public com.liferay.portal.kernel.model.CacheModel<com.liferay.social.kernel.model.SocialActivity> toCacheModel() {
634                    return _socialActivity.toCacheModel();
635            }
636    
637            @Override
638            public com.liferay.social.kernel.model.SocialActivity toEscapedModel() {
639                    return new SocialActivityWrapper(_socialActivity.toEscapedModel());
640            }
641    
642            @Override
643            public java.lang.String toString() {
644                    return _socialActivity.toString();
645            }
646    
647            @Override
648            public com.liferay.social.kernel.model.SocialActivity toUnescapedModel() {
649                    return new SocialActivityWrapper(_socialActivity.toUnescapedModel());
650            }
651    
652            @Override
653            public java.lang.String toXmlString() {
654                    return _socialActivity.toXmlString();
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            @Override
678            public SocialActivity getWrappedModel() {
679                    return _socialActivity;
680            }
681    
682            @Override
683            public boolean isEntityCacheEnabled() {
684                    return _socialActivity.isEntityCacheEnabled();
685            }
686    
687            @Override
688            public boolean isFinderCacheEnabled() {
689                    return _socialActivity.isFinderCacheEnabled();
690            }
691    
692            @Override
693            public void resetOriginalValues() {
694                    _socialActivity.resetOriginalValues();
695            }
696    
697            private final SocialActivity _socialActivity;
698    }