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