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