001
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
032 public class SocialActivityCounterWrapper implements SocialActivityCounter,
033 ModelWrapper<SocialActivityCounter> {
034 public SocialActivityCounterWrapper(
035 SocialActivityCounter socialActivityCounter) {
036 _socialActivityCounter = socialActivityCounter;
037 }
038
039 public Class<?> getModelClass() {
040 return SocialActivityCounter.class;
041 }
042
043 public String getModelClassName() {
044 return SocialActivityCounter.class.getName();
045 }
046
047 public Map<String, Object> getModelAttributes() {
048 Map<String, Object> attributes = new HashMap<String, Object>();
049
050 attributes.put("activityCounterId", getActivityCounterId());
051 attributes.put("groupId", getGroupId());
052 attributes.put("companyId", getCompanyId());
053 attributes.put("classNameId", getClassNameId());
054 attributes.put("classPK", getClassPK());
055 attributes.put("name", getName());
056 attributes.put("ownerType", getOwnerType());
057 attributes.put("currentValue", getCurrentValue());
058 attributes.put("totalValue", getTotalValue());
059 attributes.put("graceValue", getGraceValue());
060 attributes.put("startPeriod", getStartPeriod());
061 attributes.put("endPeriod", getEndPeriod());
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
140
145 public long getPrimaryKey() {
146 return _socialActivityCounter.getPrimaryKey();
147 }
148
149
154 public void setPrimaryKey(long primaryKey) {
155 _socialActivityCounter.setPrimaryKey(primaryKey);
156 }
157
158
163 public long getActivityCounterId() {
164 return _socialActivityCounter.getActivityCounterId();
165 }
166
167
172 public void setActivityCounterId(long activityCounterId) {
173 _socialActivityCounter.setActivityCounterId(activityCounterId);
174 }
175
176
181 public long getGroupId() {
182 return _socialActivityCounter.getGroupId();
183 }
184
185
190 public void setGroupId(long groupId) {
191 _socialActivityCounter.setGroupId(groupId);
192 }
193
194
199 public long getCompanyId() {
200 return _socialActivityCounter.getCompanyId();
201 }
202
203
208 public void setCompanyId(long companyId) {
209 _socialActivityCounter.setCompanyId(companyId);
210 }
211
212
217 public java.lang.String getClassName() {
218 return _socialActivityCounter.getClassName();
219 }
220
221 public void setClassName(java.lang.String className) {
222 _socialActivityCounter.setClassName(className);
223 }
224
225
230 public long getClassNameId() {
231 return _socialActivityCounter.getClassNameId();
232 }
233
234
239 public void setClassNameId(long classNameId) {
240 _socialActivityCounter.setClassNameId(classNameId);
241 }
242
243
248 public long getClassPK() {
249 return _socialActivityCounter.getClassPK();
250 }
251
252
257 public void setClassPK(long classPK) {
258 _socialActivityCounter.setClassPK(classPK);
259 }
260
261
266 public java.lang.String getName() {
267 return _socialActivityCounter.getName();
268 }
269
270
275 public void setName(java.lang.String name) {
276 _socialActivityCounter.setName(name);
277 }
278
279
284 public int getOwnerType() {
285 return _socialActivityCounter.getOwnerType();
286 }
287
288
293 public void setOwnerType(int ownerType) {
294 _socialActivityCounter.setOwnerType(ownerType);
295 }
296
297
302 public int getCurrentValue() {
303 return _socialActivityCounter.getCurrentValue();
304 }
305
306
311 public void setCurrentValue(int currentValue) {
312 _socialActivityCounter.setCurrentValue(currentValue);
313 }
314
315
320 public int getTotalValue() {
321 return _socialActivityCounter.getTotalValue();
322 }
323
324
329 public void setTotalValue(int totalValue) {
330 _socialActivityCounter.setTotalValue(totalValue);
331 }
332
333
338 public int getGraceValue() {
339 return _socialActivityCounter.getGraceValue();
340 }
341
342
347 public void setGraceValue(int graceValue) {
348 _socialActivityCounter.setGraceValue(graceValue);
349 }
350
351
356 public int getStartPeriod() {
357 return _socialActivityCounter.getStartPeriod();
358 }
359
360
365 public void setStartPeriod(int startPeriod) {
366 _socialActivityCounter.setStartPeriod(startPeriod);
367 }
368
369
374 public int getEndPeriod() {
375 return _socialActivityCounter.getEndPeriod();
376 }
377
378
383 public void setEndPeriod(int endPeriod) {
384 _socialActivityCounter.setEndPeriod(endPeriod);
385 }
386
387 public boolean isNew() {
388 return _socialActivityCounter.isNew();
389 }
390
391 public void setNew(boolean n) {
392 _socialActivityCounter.setNew(n);
393 }
394
395 public boolean isCachedModel() {
396 return _socialActivityCounter.isCachedModel();
397 }
398
399 public void setCachedModel(boolean cachedModel) {
400 _socialActivityCounter.setCachedModel(cachedModel);
401 }
402
403 public boolean isEscapedModel() {
404 return _socialActivityCounter.isEscapedModel();
405 }
406
407 public java.io.Serializable getPrimaryKeyObj() {
408 return _socialActivityCounter.getPrimaryKeyObj();
409 }
410
411 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
412 _socialActivityCounter.setPrimaryKeyObj(primaryKeyObj);
413 }
414
415 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
416 return _socialActivityCounter.getExpandoBridge();
417 }
418
419 public void setExpandoBridgeAttributes(
420 com.liferay.portal.service.ServiceContext serviceContext) {
421 _socialActivityCounter.setExpandoBridgeAttributes(serviceContext);
422 }
423
424 @Override
425 public java.lang.Object clone() {
426 return new SocialActivityCounterWrapper((SocialActivityCounter)_socialActivityCounter.clone());
427 }
428
429 public int compareTo(
430 com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter) {
431 return _socialActivityCounter.compareTo(socialActivityCounter);
432 }
433
434 @Override
435 public int hashCode() {
436 return _socialActivityCounter.hashCode();
437 }
438
439 public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialActivityCounter> toCacheModel() {
440 return _socialActivityCounter.toCacheModel();
441 }
442
443 public com.liferay.portlet.social.model.SocialActivityCounter toEscapedModel() {
444 return new SocialActivityCounterWrapper(_socialActivityCounter.toEscapedModel());
445 }
446
447 public com.liferay.portlet.social.model.SocialActivityCounter toUnescapedModel() {
448 return new SocialActivityCounterWrapper(_socialActivityCounter.toUnescapedModel());
449 }
450
451 @Override
452 public java.lang.String toString() {
453 return _socialActivityCounter.toString();
454 }
455
456 public java.lang.String toXmlString() {
457 return _socialActivityCounter.toXmlString();
458 }
459
460 public void persist()
461 throws com.liferay.portal.kernel.exception.SystemException {
462 _socialActivityCounter.persist();
463 }
464
465 public boolean isActivePeriod(int periodLength) {
466 return _socialActivityCounter.isActivePeriod(periodLength);
467 }
468
469 @Override
470 public boolean equals(Object obj) {
471 if (this == obj) {
472 return true;
473 }
474
475 if (!(obj instanceof SocialActivityCounterWrapper)) {
476 return false;
477 }
478
479 SocialActivityCounterWrapper socialActivityCounterWrapper = (SocialActivityCounterWrapper)obj;
480
481 if (Validator.equals(_socialActivityCounter,
482 socialActivityCounterWrapper._socialActivityCounter)) {
483 return true;
484 }
485
486 return false;
487 }
488
489
492 public SocialActivityCounter getWrappedSocialActivityCounter() {
493 return _socialActivityCounter;
494 }
495
496 public SocialActivityCounter getWrappedModel() {
497 return _socialActivityCounter;
498 }
499
500 public void resetOriginalValues() {
501 _socialActivityCounter.resetOriginalValues();
502 }
503
504 private SocialActivityCounter _socialActivityCounter;
505 }