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.social.kernel.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.expando.kernel.model.ExpandoBridge;
020    
021    import com.liferay.portal.kernel.model.ModelWrapper;
022    import com.liferay.portal.kernel.service.ServiceContext;
023    
024    import java.io.Serializable;
025    
026    import java.util.HashMap;
027    import java.util.Map;
028    import java.util.Objects;
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 SocialActivitySet toEscapedModel() {
146                    return new SocialActivitySetWrapper(_socialActivitySet.toEscapedModel());
147            }
148    
149            @Override
150            public SocialActivitySet toUnescapedModel() {
151                    return new SocialActivitySetWrapper(_socialActivitySet.toUnescapedModel());
152            }
153    
154            @Override
155            public boolean isCachedModel() {
156                    return _socialActivitySet.isCachedModel();
157            }
158    
159            @Override
160            public boolean isEscapedModel() {
161                    return _socialActivitySet.isEscapedModel();
162            }
163    
164            @Override
165            public boolean isNew() {
166                    return _socialActivitySet.isNew();
167            }
168    
169            @Override
170            public ExpandoBridge getExpandoBridge() {
171                    return _socialActivitySet.getExpandoBridge();
172            }
173    
174            @Override
175            public com.liferay.portal.kernel.model.CacheModel<SocialActivitySet> toCacheModel() {
176                    return _socialActivitySet.toCacheModel();
177            }
178    
179            @Override
180            public int compareTo(SocialActivitySet socialActivitySet) {
181                    return _socialActivitySet.compareTo(socialActivitySet);
182            }
183    
184            /**
185            * Returns the activity count of this social activity set.
186            *
187            * @return the activity count of this social activity set
188            */
189            @Override
190            public int getActivityCount() {
191                    return _socialActivitySet.getActivityCount();
192            }
193    
194            /**
195            * Returns the type of this social activity set.
196            *
197            * @return the type of this social activity set
198            */
199            @Override
200            public int getType() {
201                    return _socialActivitySet.getType();
202            }
203    
204            @Override
205            public int hashCode() {
206                    return _socialActivitySet.hashCode();
207            }
208    
209            @Override
210            public Serializable getPrimaryKeyObj() {
211                    return _socialActivitySet.getPrimaryKeyObj();
212            }
213    
214            @Override
215            public java.lang.Object clone() {
216                    return new SocialActivitySetWrapper((SocialActivitySet)_socialActivitySet.clone());
217            }
218    
219            /**
220            * Returns the fully qualified class name of this social activity set.
221            *
222            * @return the fully qualified class name of this social activity set
223            */
224            @Override
225            public java.lang.String getClassName() {
226                    return _socialActivitySet.getClassName();
227            }
228    
229            /**
230            * Returns the extra data of this social activity set.
231            *
232            * @return the extra data of this social activity set
233            */
234            @Override
235            public java.lang.String getExtraData() {
236                    return _socialActivitySet.getExtraData();
237            }
238    
239            /**
240            * Returns the user uuid of this social activity set.
241            *
242            * @return the user uuid of this social activity set
243            */
244            @Override
245            public java.lang.String getUserUuid() {
246                    return _socialActivitySet.getUserUuid();
247            }
248    
249            @Override
250            public java.lang.String toString() {
251                    return _socialActivitySet.toString();
252            }
253    
254            @Override
255            public java.lang.String toXmlString() {
256                    return _socialActivitySet.toXmlString();
257            }
258    
259            /**
260            * Returns the activity set ID of this social activity set.
261            *
262            * @return the activity set ID of this social activity set
263            */
264            @Override
265            public long getActivitySetId() {
266                    return _socialActivitySet.getActivitySetId();
267            }
268    
269            /**
270            * Returns the class name ID of this social activity set.
271            *
272            * @return the class name ID of this social activity set
273            */
274            @Override
275            public long getClassNameId() {
276                    return _socialActivitySet.getClassNameId();
277            }
278    
279            /**
280            * Returns the class p k of this social activity set.
281            *
282            * @return the class p k of this social activity set
283            */
284            @Override
285            public long getClassPK() {
286                    return _socialActivitySet.getClassPK();
287            }
288    
289            /**
290            * Returns the company ID of this social activity set.
291            *
292            * @return the company ID of this social activity set
293            */
294            @Override
295            public long getCompanyId() {
296                    return _socialActivitySet.getCompanyId();
297            }
298    
299            /**
300            * Returns the create date of this social activity set.
301            *
302            * @return the create date of this social activity set
303            */
304            @Override
305            public long getCreateDate() {
306                    return _socialActivitySet.getCreateDate();
307            }
308    
309            /**
310            * Returns the group ID of this social activity set.
311            *
312            * @return the group ID of this social activity set
313            */
314            @Override
315            public long getGroupId() {
316                    return _socialActivitySet.getGroupId();
317            }
318    
319            /**
320            * Returns the modified date of this social activity set.
321            *
322            * @return the modified date of this social activity set
323            */
324            @Override
325            public long getModifiedDate() {
326                    return _socialActivitySet.getModifiedDate();
327            }
328    
329            /**
330            * Returns the primary key of this social activity set.
331            *
332            * @return the primary key of this social activity set
333            */
334            @Override
335            public long getPrimaryKey() {
336                    return _socialActivitySet.getPrimaryKey();
337            }
338    
339            /**
340            * Returns the user ID of this social activity set.
341            *
342            * @return the user ID of this social activity set
343            */
344            @Override
345            public long getUserId() {
346                    return _socialActivitySet.getUserId();
347            }
348    
349            @Override
350            public void persist() {
351                    _socialActivitySet.persist();
352            }
353    
354            /**
355            * Sets the activity count of this social activity set.
356            *
357            * @param activityCount the activity count of this social activity set
358            */
359            @Override
360            public void setActivityCount(int activityCount) {
361                    _socialActivitySet.setActivityCount(activityCount);
362            }
363    
364            /**
365            * Sets the activity set ID of this social activity set.
366            *
367            * @param activitySetId the activity set ID of this social activity set
368            */
369            @Override
370            public void setActivitySetId(long activitySetId) {
371                    _socialActivitySet.setActivitySetId(activitySetId);
372            }
373    
374            @Override
375            public void setCachedModel(boolean cachedModel) {
376                    _socialActivitySet.setCachedModel(cachedModel);
377            }
378    
379            @Override
380            public void setClassName(java.lang.String className) {
381                    _socialActivitySet.setClassName(className);
382            }
383    
384            /**
385            * Sets the class name ID of this social activity set.
386            *
387            * @param classNameId the class name ID of this social activity set
388            */
389            @Override
390            public void setClassNameId(long classNameId) {
391                    _socialActivitySet.setClassNameId(classNameId);
392            }
393    
394            /**
395            * Sets the class p k of this social activity set.
396            *
397            * @param classPK the class p k of this social activity set
398            */
399            @Override
400            public void setClassPK(long classPK) {
401                    _socialActivitySet.setClassPK(classPK);
402            }
403    
404            /**
405            * Sets the company ID of this social activity set.
406            *
407            * @param companyId the company ID of this social activity set
408            */
409            @Override
410            public void setCompanyId(long companyId) {
411                    _socialActivitySet.setCompanyId(companyId);
412            }
413    
414            /**
415            * Sets the create date of this social activity set.
416            *
417            * @param createDate the create date of this social activity set
418            */
419            @Override
420            public void setCreateDate(long createDate) {
421                    _socialActivitySet.setCreateDate(createDate);
422            }
423    
424            @Override
425            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
426                    _socialActivitySet.setExpandoBridgeAttributes(expandoBridge);
427            }
428    
429            @Override
430            public void setExpandoBridgeAttributes(
431                    com.liferay.portal.kernel.model.BaseModel<?> baseModel) {
432                    _socialActivitySet.setExpandoBridgeAttributes(baseModel);
433            }
434    
435            @Override
436            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
437                    _socialActivitySet.setExpandoBridgeAttributes(serviceContext);
438            }
439    
440            /**
441            * Sets the extra data of this social activity set.
442            *
443            * @param extraData the extra data of this social activity set
444            */
445            @Override
446            public void setExtraData(java.lang.String extraData) {
447                    _socialActivitySet.setExtraData(extraData);
448            }
449    
450            /**
451            * Sets the group ID of this social activity set.
452            *
453            * @param groupId the group ID of this social activity set
454            */
455            @Override
456            public void setGroupId(long groupId) {
457                    _socialActivitySet.setGroupId(groupId);
458            }
459    
460            /**
461            * Sets the modified date of this social activity set.
462            *
463            * @param modifiedDate the modified date of this social activity set
464            */
465            @Override
466            public void setModifiedDate(long modifiedDate) {
467                    _socialActivitySet.setModifiedDate(modifiedDate);
468            }
469    
470            @Override
471            public void setNew(boolean n) {
472                    _socialActivitySet.setNew(n);
473            }
474    
475            /**
476            * Sets the primary key of this social activity set.
477            *
478            * @param primaryKey the primary key of this social activity set
479            */
480            @Override
481            public void setPrimaryKey(long primaryKey) {
482                    _socialActivitySet.setPrimaryKey(primaryKey);
483            }
484    
485            @Override
486            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
487                    _socialActivitySet.setPrimaryKeyObj(primaryKeyObj);
488            }
489    
490            /**
491            * Sets the type of this social activity set.
492            *
493            * @param type the type of this social activity set
494            */
495            @Override
496            public void setType(int type) {
497                    _socialActivitySet.setType(type);
498            }
499    
500            /**
501            * Sets the user ID of this social activity set.
502            *
503            * @param userId the user ID of this social activity set
504            */
505            @Override
506            public void setUserId(long userId) {
507                    _socialActivitySet.setUserId(userId);
508            }
509    
510            /**
511            * Sets the user uuid of this social activity set.
512            *
513            * @param userUuid the user uuid of this social activity set
514            */
515            @Override
516            public void setUserUuid(java.lang.String userUuid) {
517                    _socialActivitySet.setUserUuid(userUuid);
518            }
519    
520            @Override
521            public boolean equals(Object obj) {
522                    if (this == obj) {
523                            return true;
524                    }
525    
526                    if (!(obj instanceof SocialActivitySetWrapper)) {
527                            return false;
528                    }
529    
530                    SocialActivitySetWrapper socialActivitySetWrapper = (SocialActivitySetWrapper)obj;
531    
532                    if (Objects.equals(_socialActivitySet,
533                                            socialActivitySetWrapper._socialActivitySet)) {
534                            return true;
535                    }
536    
537                    return false;
538            }
539    
540            @Override
541            public SocialActivitySet getWrappedModel() {
542                    return _socialActivitySet;
543            }
544    
545            @Override
546            public boolean isEntityCacheEnabled() {
547                    return _socialActivitySet.isEntityCacheEnabled();
548            }
549    
550            @Override
551            public boolean isFinderCacheEnabled() {
552                    return _socialActivitySet.isFinderCacheEnabled();
553            }
554    
555            @Override
556            public void resetOriginalValues() {
557                    _socialActivitySet.resetOriginalValues();
558            }
559    
560            private final SocialActivitySet _socialActivitySet;
561    }