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