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