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