001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.social.model;
016    
017    import com.liferay.portal.kernel.util.Validator;
018    import com.liferay.portal.model.ModelWrapper;
019    
020    import java.util.HashMap;
021    import java.util.Map;
022    
023    /**
024     * <p>
025     * This class is a wrapper for {@link SocialActivity}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       SocialActivity
030     * @generated
031     */
032    public class SocialActivityWrapper implements SocialActivity,
033            ModelWrapper<SocialActivity> {
034            public SocialActivityWrapper(SocialActivity socialActivity) {
035                    _socialActivity = socialActivity;
036            }
037    
038            public Class<?> getModelClass() {
039                    return SocialActivity.class;
040            }
041    
042            public String getModelClassName() {
043                    return SocialActivity.class.getName();
044            }
045    
046            public Map<String, Object> getModelAttributes() {
047                    Map<String, Object> attributes = new HashMap<String, Object>();
048    
049                    attributes.put("activityId", getActivityId());
050                    attributes.put("groupId", getGroupId());
051                    attributes.put("companyId", getCompanyId());
052                    attributes.put("userId", getUserId());
053                    attributes.put("createDate", getCreateDate());
054                    attributes.put("mirrorActivityId", getMirrorActivityId());
055                    attributes.put("classNameId", getClassNameId());
056                    attributes.put("classPK", getClassPK());
057                    attributes.put("type", getType());
058                    attributes.put("extraData", getExtraData());
059                    attributes.put("receiverUserId", getReceiverUserId());
060    
061                    return attributes;
062            }
063    
064            public void setModelAttributes(Map<String, Object> attributes) {
065                    Long activityId = (Long)attributes.get("activityId");
066    
067                    if (activityId != null) {
068                            setActivityId(activityId);
069                    }
070    
071                    Long groupId = (Long)attributes.get("groupId");
072    
073                    if (groupId != null) {
074                            setGroupId(groupId);
075                    }
076    
077                    Long companyId = (Long)attributes.get("companyId");
078    
079                    if (companyId != null) {
080                            setCompanyId(companyId);
081                    }
082    
083                    Long userId = (Long)attributes.get("userId");
084    
085                    if (userId != null) {
086                            setUserId(userId);
087                    }
088    
089                    Long createDate = (Long)attributes.get("createDate");
090    
091                    if (createDate != null) {
092                            setCreateDate(createDate);
093                    }
094    
095                    Long mirrorActivityId = (Long)attributes.get("mirrorActivityId");
096    
097                    if (mirrorActivityId != null) {
098                            setMirrorActivityId(mirrorActivityId);
099                    }
100    
101                    Long classNameId = (Long)attributes.get("classNameId");
102    
103                    if (classNameId != null) {
104                            setClassNameId(classNameId);
105                    }
106    
107                    Long classPK = (Long)attributes.get("classPK");
108    
109                    if (classPK != null) {
110                            setClassPK(classPK);
111                    }
112    
113                    Integer type = (Integer)attributes.get("type");
114    
115                    if (type != null) {
116                            setType(type);
117                    }
118    
119                    String extraData = (String)attributes.get("extraData");
120    
121                    if (extraData != null) {
122                            setExtraData(extraData);
123                    }
124    
125                    Long receiverUserId = (Long)attributes.get("receiverUserId");
126    
127                    if (receiverUserId != null) {
128                            setReceiverUserId(receiverUserId);
129                    }
130            }
131    
132            /**
133            * Returns the primary key of this social activity.
134            *
135            * @return the primary key of this social activity
136            */
137            public long getPrimaryKey() {
138                    return _socialActivity.getPrimaryKey();
139            }
140    
141            /**
142            * Sets the primary key of this social activity.
143            *
144            * @param primaryKey the primary key of this social activity
145            */
146            public void setPrimaryKey(long primaryKey) {
147                    _socialActivity.setPrimaryKey(primaryKey);
148            }
149    
150            /**
151            * Returns the activity ID of this social activity.
152            *
153            * @return the activity ID of this social activity
154            */
155            public long getActivityId() {
156                    return _socialActivity.getActivityId();
157            }
158    
159            /**
160            * Sets the activity ID of this social activity.
161            *
162            * @param activityId the activity ID of this social activity
163            */
164            public void setActivityId(long activityId) {
165                    _socialActivity.setActivityId(activityId);
166            }
167    
168            /**
169            * Returns the group ID of this social activity.
170            *
171            * @return the group ID of this social activity
172            */
173            public long getGroupId() {
174                    return _socialActivity.getGroupId();
175            }
176    
177            /**
178            * Sets the group ID of this social activity.
179            *
180            * @param groupId the group ID of this social activity
181            */
182            public void setGroupId(long groupId) {
183                    _socialActivity.setGroupId(groupId);
184            }
185    
186            /**
187            * Returns the company ID of this social activity.
188            *
189            * @return the company ID of this social activity
190            */
191            public long getCompanyId() {
192                    return _socialActivity.getCompanyId();
193            }
194    
195            /**
196            * Sets the company ID of this social activity.
197            *
198            * @param companyId the company ID of this social activity
199            */
200            public void setCompanyId(long companyId) {
201                    _socialActivity.setCompanyId(companyId);
202            }
203    
204            /**
205            * Returns the user ID of this social activity.
206            *
207            * @return the user ID of this social activity
208            */
209            public long getUserId() {
210                    return _socialActivity.getUserId();
211            }
212    
213            /**
214            * Sets the user ID of this social activity.
215            *
216            * @param userId the user ID of this social activity
217            */
218            public void setUserId(long userId) {
219                    _socialActivity.setUserId(userId);
220            }
221    
222            /**
223            * Returns the user uuid of this social activity.
224            *
225            * @return the user uuid of this social activity
226            * @throws SystemException if a system exception occurred
227            */
228            public java.lang.String getUserUuid()
229                    throws com.liferay.portal.kernel.exception.SystemException {
230                    return _socialActivity.getUserUuid();
231            }
232    
233            /**
234            * Sets the user uuid of this social activity.
235            *
236            * @param userUuid the user uuid of this social activity
237            */
238            public void setUserUuid(java.lang.String userUuid) {
239                    _socialActivity.setUserUuid(userUuid);
240            }
241    
242            /**
243            * Returns the create date of this social activity.
244            *
245            * @return the create date of this social activity
246            */
247            public long getCreateDate() {
248                    return _socialActivity.getCreateDate();
249            }
250    
251            /**
252            * Sets the create date of this social activity.
253            *
254            * @param createDate the create date of this social activity
255            */
256            public void setCreateDate(long createDate) {
257                    _socialActivity.setCreateDate(createDate);
258            }
259    
260            /**
261            * Returns the mirror activity ID of this social activity.
262            *
263            * @return the mirror activity ID of this social activity
264            */
265            public long getMirrorActivityId() {
266                    return _socialActivity.getMirrorActivityId();
267            }
268    
269            /**
270            * Sets the mirror activity ID of this social activity.
271            *
272            * @param mirrorActivityId the mirror activity ID of this social activity
273            */
274            public void setMirrorActivityId(long mirrorActivityId) {
275                    _socialActivity.setMirrorActivityId(mirrorActivityId);
276            }
277    
278            /**
279            * Returns the fully qualified class name of this social activity.
280            *
281            * @return the fully qualified class name of this social activity
282            */
283            public java.lang.String getClassName() {
284                    return _socialActivity.getClassName();
285            }
286    
287            public void setClassName(java.lang.String className) {
288                    _socialActivity.setClassName(className);
289            }
290    
291            /**
292            * Returns the class name ID of this social activity.
293            *
294            * @return the class name ID of this social activity
295            */
296            public long getClassNameId() {
297                    return _socialActivity.getClassNameId();
298            }
299    
300            /**
301            * Sets the class name ID of this social activity.
302            *
303            * @param classNameId the class name ID of this social activity
304            */
305            public void setClassNameId(long classNameId) {
306                    _socialActivity.setClassNameId(classNameId);
307            }
308    
309            /**
310            * Returns the class p k of this social activity.
311            *
312            * @return the class p k of this social activity
313            */
314            public long getClassPK() {
315                    return _socialActivity.getClassPK();
316            }
317    
318            /**
319            * Sets the class p k of this social activity.
320            *
321            * @param classPK the class p k of this social activity
322            */
323            public void setClassPK(long classPK) {
324                    _socialActivity.setClassPK(classPK);
325            }
326    
327            /**
328            * Returns the type of this social activity.
329            *
330            * @return the type of this social activity
331            */
332            public int getType() {
333                    return _socialActivity.getType();
334            }
335    
336            /**
337            * Sets the type of this social activity.
338            *
339            * @param type the type of this social activity
340            */
341            public void setType(int type) {
342                    _socialActivity.setType(type);
343            }
344    
345            /**
346            * Returns the extra data of this social activity.
347            *
348            * @return the extra data of this social activity
349            */
350            public java.lang.String getExtraData() {
351                    return _socialActivity.getExtraData();
352            }
353    
354            /**
355            * Sets the extra data of this social activity.
356            *
357            * @param extraData the extra data of this social activity
358            */
359            public void setExtraData(java.lang.String extraData) {
360                    _socialActivity.setExtraData(extraData);
361            }
362    
363            /**
364            * Returns the receiver user ID of this social activity.
365            *
366            * @return the receiver user ID of this social activity
367            */
368            public long getReceiverUserId() {
369                    return _socialActivity.getReceiverUserId();
370            }
371    
372            /**
373            * Sets the receiver user ID of this social activity.
374            *
375            * @param receiverUserId the receiver user ID of this social activity
376            */
377            public void setReceiverUserId(long receiverUserId) {
378                    _socialActivity.setReceiverUserId(receiverUserId);
379            }
380    
381            /**
382            * Returns the receiver user uuid of this social activity.
383            *
384            * @return the receiver user uuid of this social activity
385            * @throws SystemException if a system exception occurred
386            */
387            public java.lang.String getReceiverUserUuid()
388                    throws com.liferay.portal.kernel.exception.SystemException {
389                    return _socialActivity.getReceiverUserUuid();
390            }
391    
392            /**
393            * Sets the receiver user uuid of this social activity.
394            *
395            * @param receiverUserUuid the receiver user uuid of this social activity
396            */
397            public void setReceiverUserUuid(java.lang.String receiverUserUuid) {
398                    _socialActivity.setReceiverUserUuid(receiverUserUuid);
399            }
400    
401            public boolean isNew() {
402                    return _socialActivity.isNew();
403            }
404    
405            public void setNew(boolean n) {
406                    _socialActivity.setNew(n);
407            }
408    
409            public boolean isCachedModel() {
410                    return _socialActivity.isCachedModel();
411            }
412    
413            public void setCachedModel(boolean cachedModel) {
414                    _socialActivity.setCachedModel(cachedModel);
415            }
416    
417            public boolean isEscapedModel() {
418                    return _socialActivity.isEscapedModel();
419            }
420    
421            public java.io.Serializable getPrimaryKeyObj() {
422                    return _socialActivity.getPrimaryKeyObj();
423            }
424    
425            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
426                    _socialActivity.setPrimaryKeyObj(primaryKeyObj);
427            }
428    
429            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
430                    return _socialActivity.getExpandoBridge();
431            }
432    
433            public void setExpandoBridgeAttributes(
434                    com.liferay.portal.service.ServiceContext serviceContext) {
435                    _socialActivity.setExpandoBridgeAttributes(serviceContext);
436            }
437    
438            @Override
439            public java.lang.Object clone() {
440                    return new SocialActivityWrapper((SocialActivity)_socialActivity.clone());
441            }
442    
443            public int compareTo(
444                    com.liferay.portlet.social.model.SocialActivity socialActivity) {
445                    return _socialActivity.compareTo(socialActivity);
446            }
447    
448            @Override
449            public int hashCode() {
450                    return _socialActivity.hashCode();
451            }
452    
453            public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialActivity> toCacheModel() {
454                    return _socialActivity.toCacheModel();
455            }
456    
457            public com.liferay.portlet.social.model.SocialActivity toEscapedModel() {
458                    return new SocialActivityWrapper(_socialActivity.toEscapedModel());
459            }
460    
461            public com.liferay.portlet.social.model.SocialActivity toUnescapedModel() {
462                    return new SocialActivityWrapper(_socialActivity.toUnescapedModel());
463            }
464    
465            @Override
466            public java.lang.String toString() {
467                    return _socialActivity.toString();
468            }
469    
470            public java.lang.String toXmlString() {
471                    return _socialActivity.toXmlString();
472            }
473    
474            public void persist()
475                    throws com.liferay.portal.kernel.exception.SystemException {
476                    _socialActivity.persist();
477            }
478    
479            public com.liferay.portlet.asset.model.AssetEntry getAssetEntry()
480                    throws com.liferay.portal.kernel.exception.SystemException {
481                    return _socialActivity.getAssetEntry();
482            }
483    
484            public void setAssetEntry(
485                    com.liferay.portlet.asset.model.AssetEntry assetEntry) {
486                    _socialActivity.setAssetEntry(assetEntry);
487            }
488    
489            @Override
490            public boolean equals(Object obj) {
491                    if (this == obj) {
492                            return true;
493                    }
494    
495                    if (!(obj instanceof SocialActivityWrapper)) {
496                            return false;
497                    }
498    
499                    SocialActivityWrapper socialActivityWrapper = (SocialActivityWrapper)obj;
500    
501                    if (Validator.equals(_socialActivity,
502                                            socialActivityWrapper._socialActivity)) {
503                            return true;
504                    }
505    
506                    return false;
507            }
508    
509            /**
510             * @deprecated Renamed to {@link #getWrappedModel}
511             */
512            public SocialActivity getWrappedSocialActivity() {
513                    return _socialActivity;
514            }
515    
516            public SocialActivity getWrappedModel() {
517                    return _socialActivity;
518            }
519    
520            public void resetOriginalValues() {
521                    _socialActivity.resetOriginalValues();
522            }
523    
524            private SocialActivity _socialActivity;
525    }