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 SocialActivitySet}.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see SocialActivitySet
030     * @generated
031     */
032    public class SocialActivitySetWrapper implements SocialActivitySet,
033            ModelWrapper<SocialActivitySet> {
034            public SocialActivitySetWrapper(SocialActivitySet socialActivitySet) {
035                    _socialActivitySet = socialActivitySet;
036            }
037    
038            @Override
039            public Class<?> getModelClass() {
040                    return SocialActivitySet.class;
041            }
042    
043            @Override
044            public String getModelClassName() {
045                    return SocialActivitySet.class.getName();
046            }
047    
048            @Override
049            public Map<String, Object> getModelAttributes() {
050                    Map<String, Object> attributes = new HashMap<String, Object>();
051    
052                    attributes.put("activitySetId", getActivitySetId());
053                    attributes.put("groupId", getGroupId());
054                    attributes.put("companyId", getCompanyId());
055                    attributes.put("userId", getUserId());
056                    attributes.put("createDate", getCreateDate());
057                    attributes.put("modifiedDate", getModifiedDate());
058                    attributes.put("classNameId", getClassNameId());
059                    attributes.put("classPK", getClassPK());
060                    attributes.put("type", getType());
061                    attributes.put("extraData", getExtraData());
062                    attributes.put("activityCount", getActivityCount());
063    
064                    return attributes;
065            }
066    
067            @Override
068            public void setModelAttributes(Map<String, Object> attributes) {
069                    Long activitySetId = (Long)attributes.get("activitySetId");
070    
071                    if (activitySetId != null) {
072                            setActivitySetId(activitySetId);
073                    }
074    
075                    Long groupId = (Long)attributes.get("groupId");
076    
077                    if (groupId != null) {
078                            setGroupId(groupId);
079                    }
080    
081                    Long companyId = (Long)attributes.get("companyId");
082    
083                    if (companyId != null) {
084                            setCompanyId(companyId);
085                    }
086    
087                    Long userId = (Long)attributes.get("userId");
088    
089                    if (userId != null) {
090                            setUserId(userId);
091                    }
092    
093                    Long createDate = (Long)attributes.get("createDate");
094    
095                    if (createDate != null) {
096                            setCreateDate(createDate);
097                    }
098    
099                    Long modifiedDate = (Long)attributes.get("modifiedDate");
100    
101                    if (modifiedDate != null) {
102                            setModifiedDate(modifiedDate);
103                    }
104    
105                    Long classNameId = (Long)attributes.get("classNameId");
106    
107                    if (classNameId != null) {
108                            setClassNameId(classNameId);
109                    }
110    
111                    Long classPK = (Long)attributes.get("classPK");
112    
113                    if (classPK != null) {
114                            setClassPK(classPK);
115                    }
116    
117                    Integer type = (Integer)attributes.get("type");
118    
119                    if (type != null) {
120                            setType(type);
121                    }
122    
123                    String extraData = (String)attributes.get("extraData");
124    
125                    if (extraData != null) {
126                            setExtraData(extraData);
127                    }
128    
129                    Integer activityCount = (Integer)attributes.get("activityCount");
130    
131                    if (activityCount != null) {
132                            setActivityCount(activityCount);
133                    }
134            }
135    
136            /**
137            * Returns the primary key of this social activity set.
138            *
139            * @return the primary key of this social activity set
140            */
141            @Override
142            public long getPrimaryKey() {
143                    return _socialActivitySet.getPrimaryKey();
144            }
145    
146            /**
147            * Sets the primary key of this social activity set.
148            *
149            * @param primaryKey the primary key of this social activity set
150            */
151            @Override
152            public void setPrimaryKey(long primaryKey) {
153                    _socialActivitySet.setPrimaryKey(primaryKey);
154            }
155    
156            /**
157            * Returns the activity set ID of this social activity set.
158            *
159            * @return the activity set ID of this social activity set
160            */
161            @Override
162            public long getActivitySetId() {
163                    return _socialActivitySet.getActivitySetId();
164            }
165    
166            /**
167            * Sets the activity set ID of this social activity set.
168            *
169            * @param activitySetId the activity set ID of this social activity set
170            */
171            @Override
172            public void setActivitySetId(long activitySetId) {
173                    _socialActivitySet.setActivitySetId(activitySetId);
174            }
175    
176            /**
177            * Returns the group ID of this social activity set.
178            *
179            * @return the group ID of this social activity set
180            */
181            @Override
182            public long getGroupId() {
183                    return _socialActivitySet.getGroupId();
184            }
185    
186            /**
187            * Sets the group ID of this social activity set.
188            *
189            * @param groupId the group ID of this social activity set
190            */
191            @Override
192            public void setGroupId(long groupId) {
193                    _socialActivitySet.setGroupId(groupId);
194            }
195    
196            /**
197            * Returns the company ID of this social activity set.
198            *
199            * @return the company ID of this social activity set
200            */
201            @Override
202            public long getCompanyId() {
203                    return _socialActivitySet.getCompanyId();
204            }
205    
206            /**
207            * Sets the company ID of this social activity set.
208            *
209            * @param companyId the company ID of this social activity set
210            */
211            @Override
212            public void setCompanyId(long companyId) {
213                    _socialActivitySet.setCompanyId(companyId);
214            }
215    
216            /**
217            * Returns the user ID of this social activity set.
218            *
219            * @return the user ID of this social activity set
220            */
221            @Override
222            public long getUserId() {
223                    return _socialActivitySet.getUserId();
224            }
225    
226            /**
227            * Sets the user ID of this social activity set.
228            *
229            * @param userId the user ID of this social activity set
230            */
231            @Override
232            public void setUserId(long userId) {
233                    _socialActivitySet.setUserId(userId);
234            }
235    
236            /**
237            * Returns the user uuid of this social activity set.
238            *
239            * @return the user uuid of this social activity set
240            * @throws SystemException if a system exception occurred
241            */
242            @Override
243            public java.lang.String getUserUuid()
244                    throws com.liferay.portal.kernel.exception.SystemException {
245                    return _socialActivitySet.getUserUuid();
246            }
247    
248            /**
249            * Sets the user uuid of this social activity set.
250            *
251            * @param userUuid the user uuid of this social activity set
252            */
253            @Override
254            public void setUserUuid(java.lang.String userUuid) {
255                    _socialActivitySet.setUserUuid(userUuid);
256            }
257    
258            /**
259            * Returns the create date of this social activity set.
260            *
261            * @return the create date of this social activity set
262            */
263            @Override
264            public long getCreateDate() {
265                    return _socialActivitySet.getCreateDate();
266            }
267    
268            /**
269            * Sets the create date of this social activity set.
270            *
271            * @param createDate the create date of this social activity set
272            */
273            @Override
274            public void setCreateDate(long createDate) {
275                    _socialActivitySet.setCreateDate(createDate);
276            }
277    
278            /**
279            * Returns the modified date of this social activity set.
280            *
281            * @return the modified date of this social activity set
282            */
283            @Override
284            public long getModifiedDate() {
285                    return _socialActivitySet.getModifiedDate();
286            }
287    
288            /**
289            * Sets the modified date of this social activity set.
290            *
291            * @param modifiedDate the modified date of this social activity set
292            */
293            @Override
294            public void setModifiedDate(long modifiedDate) {
295                    _socialActivitySet.setModifiedDate(modifiedDate);
296            }
297    
298            /**
299            * Returns the fully qualified class name of this social activity set.
300            *
301            * @return the fully qualified class name of this social activity set
302            */
303            @Override
304            public java.lang.String getClassName() {
305                    return _socialActivitySet.getClassName();
306            }
307    
308            @Override
309            public void setClassName(java.lang.String className) {
310                    _socialActivitySet.setClassName(className);
311            }
312    
313            /**
314            * Returns the class name ID of this social activity set.
315            *
316            * @return the class name ID of this social activity set
317            */
318            @Override
319            public long getClassNameId() {
320                    return _socialActivitySet.getClassNameId();
321            }
322    
323            /**
324            * Sets the class name ID of this social activity set.
325            *
326            * @param classNameId the class name ID of this social activity set
327            */
328            @Override
329            public void setClassNameId(long classNameId) {
330                    _socialActivitySet.setClassNameId(classNameId);
331            }
332    
333            /**
334            * Returns the class p k of this social activity set.
335            *
336            * @return the class p k of this social activity set
337            */
338            @Override
339            public long getClassPK() {
340                    return _socialActivitySet.getClassPK();
341            }
342    
343            /**
344            * Sets the class p k of this social activity set.
345            *
346            * @param classPK the class p k of this social activity set
347            */
348            @Override
349            public void setClassPK(long classPK) {
350                    _socialActivitySet.setClassPK(classPK);
351            }
352    
353            /**
354            * Returns the type of this social activity set.
355            *
356            * @return the type of this social activity set
357            */
358            @Override
359            public int getType() {
360                    return _socialActivitySet.getType();
361            }
362    
363            /**
364            * Sets the type of this social activity set.
365            *
366            * @param type the type of this social activity set
367            */
368            @Override
369            public void setType(int type) {
370                    _socialActivitySet.setType(type);
371            }
372    
373            /**
374            * Returns the extra data of this social activity set.
375            *
376            * @return the extra data of this social activity set
377            */
378            @Override
379            public java.lang.String getExtraData() {
380                    return _socialActivitySet.getExtraData();
381            }
382    
383            /**
384            * Sets the extra data of this social activity set.
385            *
386            * @param extraData the extra data of this social activity set
387            */
388            @Override
389            public void setExtraData(java.lang.String extraData) {
390                    _socialActivitySet.setExtraData(extraData);
391            }
392    
393            /**
394            * Returns the activity count of this social activity set.
395            *
396            * @return the activity count of this social activity set
397            */
398            @Override
399            public int getActivityCount() {
400                    return _socialActivitySet.getActivityCount();
401            }
402    
403            /**
404            * Sets the activity count of this social activity set.
405            *
406            * @param activityCount the activity count of this social activity set
407            */
408            @Override
409            public void setActivityCount(int activityCount) {
410                    _socialActivitySet.setActivityCount(activityCount);
411            }
412    
413            @Override
414            public boolean isNew() {
415                    return _socialActivitySet.isNew();
416            }
417    
418            @Override
419            public void setNew(boolean n) {
420                    _socialActivitySet.setNew(n);
421            }
422    
423            @Override
424            public boolean isCachedModel() {
425                    return _socialActivitySet.isCachedModel();
426            }
427    
428            @Override
429            public void setCachedModel(boolean cachedModel) {
430                    _socialActivitySet.setCachedModel(cachedModel);
431            }
432    
433            @Override
434            public boolean isEscapedModel() {
435                    return _socialActivitySet.isEscapedModel();
436            }
437    
438            @Override
439            public java.io.Serializable getPrimaryKeyObj() {
440                    return _socialActivitySet.getPrimaryKeyObj();
441            }
442    
443            @Override
444            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
445                    _socialActivitySet.setPrimaryKeyObj(primaryKeyObj);
446            }
447    
448            @Override
449            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
450                    return _socialActivitySet.getExpandoBridge();
451            }
452    
453            @Override
454            public void setExpandoBridgeAttributes(
455                    com.liferay.portal.model.BaseModel<?> baseModel) {
456                    _socialActivitySet.setExpandoBridgeAttributes(baseModel);
457            }
458    
459            @Override
460            public void setExpandoBridgeAttributes(
461                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
462                    _socialActivitySet.setExpandoBridgeAttributes(expandoBridge);
463            }
464    
465            @Override
466            public void setExpandoBridgeAttributes(
467                    com.liferay.portal.service.ServiceContext serviceContext) {
468                    _socialActivitySet.setExpandoBridgeAttributes(serviceContext);
469            }
470    
471            @Override
472            public java.lang.Object clone() {
473                    return new SocialActivitySetWrapper((SocialActivitySet)_socialActivitySet.clone());
474            }
475    
476            @Override
477            public int compareTo(
478                    com.liferay.portlet.social.model.SocialActivitySet socialActivitySet) {
479                    return _socialActivitySet.compareTo(socialActivitySet);
480            }
481    
482            @Override
483            public int hashCode() {
484                    return _socialActivitySet.hashCode();
485            }
486    
487            @Override
488            public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialActivitySet> toCacheModel() {
489                    return _socialActivitySet.toCacheModel();
490            }
491    
492            @Override
493            public com.liferay.portlet.social.model.SocialActivitySet toEscapedModel() {
494                    return new SocialActivitySetWrapper(_socialActivitySet.toEscapedModel());
495            }
496    
497            @Override
498            public com.liferay.portlet.social.model.SocialActivitySet toUnescapedModel() {
499                    return new SocialActivitySetWrapper(_socialActivitySet.toUnescapedModel());
500            }
501    
502            @Override
503            public java.lang.String toString() {
504                    return _socialActivitySet.toString();
505            }
506    
507            @Override
508            public java.lang.String toXmlString() {
509                    return _socialActivitySet.toXmlString();
510            }
511    
512            @Override
513            public void persist()
514                    throws com.liferay.portal.kernel.exception.SystemException {
515                    _socialActivitySet.persist();
516            }
517    
518            @Override
519            public boolean equals(Object obj) {
520                    if (this == obj) {
521                            return true;
522                    }
523    
524                    if (!(obj instanceof SocialActivitySetWrapper)) {
525                            return false;
526                    }
527    
528                    SocialActivitySetWrapper socialActivitySetWrapper = (SocialActivitySetWrapper)obj;
529    
530                    if (Validator.equals(_socialActivitySet,
531                                            socialActivitySetWrapper._socialActivitySet)) {
532                            return true;
533                    }
534    
535                    return false;
536            }
537    
538            /**
539             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
540             */
541            public SocialActivitySet getWrappedSocialActivitySet() {
542                    return _socialActivitySet;
543            }
544    
545            @Override
546            public SocialActivitySet getWrappedModel() {
547                    return _socialActivitySet;
548            }
549    
550            @Override
551            public void resetOriginalValues() {
552                    _socialActivitySet.resetOriginalValues();
553            }
554    
555            private SocialActivitySet _socialActivitySet;
556    }