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