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