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