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