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