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