001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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    
062                    return attributes;
063            }
064    
065            public void setModelAttributes(Map<String, Object> attributes) {
066                    Long activityCounterId = (Long)attributes.get("activityCounterId");
067    
068                    if (activityCounterId != null) {
069                            setActivityCounterId(activityCounterId);
070                    }
071    
072                    Long groupId = (Long)attributes.get("groupId");
073    
074                    if (groupId != null) {
075                            setGroupId(groupId);
076                    }
077    
078                    Long companyId = (Long)attributes.get("companyId");
079    
080                    if (companyId != null) {
081                            setCompanyId(companyId);
082                    }
083    
084                    Long classNameId = (Long)attributes.get("classNameId");
085    
086                    if (classNameId != null) {
087                            setClassNameId(classNameId);
088                    }
089    
090                    Long classPK = (Long)attributes.get("classPK");
091    
092                    if (classPK != null) {
093                            setClassPK(classPK);
094                    }
095    
096                    String name = (String)attributes.get("name");
097    
098                    if (name != null) {
099                            setName(name);
100                    }
101    
102                    Integer ownerType = (Integer)attributes.get("ownerType");
103    
104                    if (ownerType != null) {
105                            setOwnerType(ownerType);
106                    }
107    
108                    Integer currentValue = (Integer)attributes.get("currentValue");
109    
110                    if (currentValue != null) {
111                            setCurrentValue(currentValue);
112                    }
113    
114                    Integer totalValue = (Integer)attributes.get("totalValue");
115    
116                    if (totalValue != null) {
117                            setTotalValue(totalValue);
118                    }
119    
120                    Integer graceValue = (Integer)attributes.get("graceValue");
121    
122                    if (graceValue != null) {
123                            setGraceValue(graceValue);
124                    }
125    
126                    Integer startPeriod = (Integer)attributes.get("startPeriod");
127    
128                    if (startPeriod != null) {
129                            setStartPeriod(startPeriod);
130                    }
131    
132                    Integer endPeriod = (Integer)attributes.get("endPeriod");
133    
134                    if (endPeriod != null) {
135                            setEndPeriod(endPeriod);
136                    }
137            }
138    
139            /**
140            * Returns the primary key of this social activity counter.
141            *
142            * @return the primary key of this social activity counter
143            */
144            public long getPrimaryKey() {
145                    return _socialActivityCounter.getPrimaryKey();
146            }
147    
148            /**
149            * Sets the primary key of this social activity counter.
150            *
151            * @param primaryKey the primary key of this social activity counter
152            */
153            public void setPrimaryKey(long primaryKey) {
154                    _socialActivityCounter.setPrimaryKey(primaryKey);
155            }
156    
157            /**
158            * Returns the activity counter ID of this social activity counter.
159            *
160            * @return the activity counter ID of this social activity counter
161            */
162            public long getActivityCounterId() {
163                    return _socialActivityCounter.getActivityCounterId();
164            }
165    
166            /**
167            * Sets the activity counter ID of this social activity counter.
168            *
169            * @param activityCounterId the activity counter ID of this social activity counter
170            */
171            public void setActivityCounterId(long activityCounterId) {
172                    _socialActivityCounter.setActivityCounterId(activityCounterId);
173            }
174    
175            /**
176            * Returns the group ID of this social activity counter.
177            *
178            * @return the group ID of this social activity counter
179            */
180            public long getGroupId() {
181                    return _socialActivityCounter.getGroupId();
182            }
183    
184            /**
185            * Sets the group ID of this social activity counter.
186            *
187            * @param groupId the group ID of this social activity counter
188            */
189            public void setGroupId(long groupId) {
190                    _socialActivityCounter.setGroupId(groupId);
191            }
192    
193            /**
194            * Returns the company ID of this social activity counter.
195            *
196            * @return the company ID of this social activity counter
197            */
198            public long getCompanyId() {
199                    return _socialActivityCounter.getCompanyId();
200            }
201    
202            /**
203            * Sets the company ID of this social activity counter.
204            *
205            * @param companyId the company ID of this social activity counter
206            */
207            public void setCompanyId(long companyId) {
208                    _socialActivityCounter.setCompanyId(companyId);
209            }
210    
211            /**
212            * Returns the fully qualified class name of this social activity counter.
213            *
214            * @return the fully qualified class name of this social activity counter
215            */
216            public java.lang.String getClassName() {
217                    return _socialActivityCounter.getClassName();
218            }
219    
220            public void setClassName(java.lang.String className) {
221                    _socialActivityCounter.setClassName(className);
222            }
223    
224            /**
225            * Returns the class name ID of this social activity counter.
226            *
227            * @return the class name ID of this social activity counter
228            */
229            public long getClassNameId() {
230                    return _socialActivityCounter.getClassNameId();
231            }
232    
233            /**
234            * Sets the class name ID of this social activity counter.
235            *
236            * @param classNameId the class name ID of this social activity counter
237            */
238            public void setClassNameId(long classNameId) {
239                    _socialActivityCounter.setClassNameId(classNameId);
240            }
241    
242            /**
243            * Returns the class p k of this social activity counter.
244            *
245            * @return the class p k of this social activity counter
246            */
247            public long getClassPK() {
248                    return _socialActivityCounter.getClassPK();
249            }
250    
251            /**
252            * Sets the class p k of this social activity counter.
253            *
254            * @param classPK the class p k of this social activity counter
255            */
256            public void setClassPK(long classPK) {
257                    _socialActivityCounter.setClassPK(classPK);
258            }
259    
260            /**
261            * Returns the name of this social activity counter.
262            *
263            * @return the name of this social activity counter
264            */
265            public java.lang.String getName() {
266                    return _socialActivityCounter.getName();
267            }
268    
269            /**
270            * Sets the name of this social activity counter.
271            *
272            * @param name the name of this social activity counter
273            */
274            public void setName(java.lang.String name) {
275                    _socialActivityCounter.setName(name);
276            }
277    
278            /**
279            * Returns the owner type of this social activity counter.
280            *
281            * @return the owner type of this social activity counter
282            */
283            public int getOwnerType() {
284                    return _socialActivityCounter.getOwnerType();
285            }
286    
287            /**
288            * Sets the owner type of this social activity counter.
289            *
290            * @param ownerType the owner type of this social activity counter
291            */
292            public void setOwnerType(int ownerType) {
293                    _socialActivityCounter.setOwnerType(ownerType);
294            }
295    
296            /**
297            * Returns the current value of this social activity counter.
298            *
299            * @return the current value of this social activity counter
300            */
301            public int getCurrentValue() {
302                    return _socialActivityCounter.getCurrentValue();
303            }
304    
305            /**
306            * Sets the current value of this social activity counter.
307            *
308            * @param currentValue the current value of this social activity counter
309            */
310            public void setCurrentValue(int currentValue) {
311                    _socialActivityCounter.setCurrentValue(currentValue);
312            }
313    
314            /**
315            * Returns the total value of this social activity counter.
316            *
317            * @return the total value of this social activity counter
318            */
319            public int getTotalValue() {
320                    return _socialActivityCounter.getTotalValue();
321            }
322    
323            /**
324            * Sets the total value of this social activity counter.
325            *
326            * @param totalValue the total value of this social activity counter
327            */
328            public void setTotalValue(int totalValue) {
329                    _socialActivityCounter.setTotalValue(totalValue);
330            }
331    
332            /**
333            * Returns the grace value of this social activity counter.
334            *
335            * @return the grace value of this social activity counter
336            */
337            public int getGraceValue() {
338                    return _socialActivityCounter.getGraceValue();
339            }
340    
341            /**
342            * Sets the grace value of this social activity counter.
343            *
344            * @param graceValue the grace value of this social activity counter
345            */
346            public void setGraceValue(int graceValue) {
347                    _socialActivityCounter.setGraceValue(graceValue);
348            }
349    
350            /**
351            * Returns the start period of this social activity counter.
352            *
353            * @return the start period of this social activity counter
354            */
355            public int getStartPeriod() {
356                    return _socialActivityCounter.getStartPeriod();
357            }
358    
359            /**
360            * Sets the start period of this social activity counter.
361            *
362            * @param startPeriod the start period of this social activity counter
363            */
364            public void setStartPeriod(int startPeriod) {
365                    _socialActivityCounter.setStartPeriod(startPeriod);
366            }
367    
368            /**
369            * Returns the end period of this social activity counter.
370            *
371            * @return the end period of this social activity counter
372            */
373            public int getEndPeriod() {
374                    return _socialActivityCounter.getEndPeriod();
375            }
376    
377            /**
378            * Sets the end period of this social activity counter.
379            *
380            * @param endPeriod the end period of this social activity counter
381            */
382            public void setEndPeriod(int endPeriod) {
383                    _socialActivityCounter.setEndPeriod(endPeriod);
384            }
385    
386            public boolean isNew() {
387                    return _socialActivityCounter.isNew();
388            }
389    
390            public void setNew(boolean n) {
391                    _socialActivityCounter.setNew(n);
392            }
393    
394            public boolean isCachedModel() {
395                    return _socialActivityCounter.isCachedModel();
396            }
397    
398            public void setCachedModel(boolean cachedModel) {
399                    _socialActivityCounter.setCachedModel(cachedModel);
400            }
401    
402            public boolean isEscapedModel() {
403                    return _socialActivityCounter.isEscapedModel();
404            }
405    
406            public java.io.Serializable getPrimaryKeyObj() {
407                    return _socialActivityCounter.getPrimaryKeyObj();
408            }
409    
410            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
411                    _socialActivityCounter.setPrimaryKeyObj(primaryKeyObj);
412            }
413    
414            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
415                    return _socialActivityCounter.getExpandoBridge();
416            }
417    
418            public void setExpandoBridgeAttributes(
419                    com.liferay.portal.service.ServiceContext serviceContext) {
420                    _socialActivityCounter.setExpandoBridgeAttributes(serviceContext);
421            }
422    
423            @Override
424            public java.lang.Object clone() {
425                    return new SocialActivityCounterWrapper((SocialActivityCounter)_socialActivityCounter.clone());
426            }
427    
428            public int compareTo(
429                    com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter) {
430                    return _socialActivityCounter.compareTo(socialActivityCounter);
431            }
432    
433            @Override
434            public int hashCode() {
435                    return _socialActivityCounter.hashCode();
436            }
437    
438            public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialActivityCounter> toCacheModel() {
439                    return _socialActivityCounter.toCacheModel();
440            }
441    
442            public com.liferay.portlet.social.model.SocialActivityCounter toEscapedModel() {
443                    return new SocialActivityCounterWrapper(_socialActivityCounter.toEscapedModel());
444            }
445    
446            @Override
447            public java.lang.String toString() {
448                    return _socialActivityCounter.toString();
449            }
450    
451            public java.lang.String toXmlString() {
452                    return _socialActivityCounter.toXmlString();
453            }
454    
455            public void persist()
456                    throws com.liferay.portal.kernel.exception.SystemException {
457                    _socialActivityCounter.persist();
458            }
459    
460            public boolean isActivePeriod(int periodLength) {
461                    return _socialActivityCounter.isActivePeriod(periodLength);
462            }
463    
464            /**
465             * @deprecated Renamed to {@link #getWrappedModel}
466             */
467            public SocialActivityCounter getWrappedSocialActivityCounter() {
468                    return _socialActivityCounter;
469            }
470    
471            public SocialActivityCounter getWrappedModel() {
472                    return _socialActivityCounter;
473            }
474    
475            public void resetOriginalValues() {
476                    _socialActivityCounter.resetOriginalValues();
477            }
478    
479            private SocialActivityCounter _socialActivityCounter;
480    }