001
014
015 package com.liferay.portlet.social.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 @ProviderType
035 public class SocialActivityCounterWrapper implements SocialActivityCounter,
036 ModelWrapper<SocialActivityCounter> {
037 public SocialActivityCounterWrapper(
038 SocialActivityCounter socialActivityCounter) {
039 _socialActivityCounter = socialActivityCounter;
040 }
041
042 @Override
043 public Class<?> getModelClass() {
044 return SocialActivityCounter.class;
045 }
046
047 @Override
048 public String getModelClassName() {
049 return SocialActivityCounter.class.getName();
050 }
051
052 @Override
053 public Map<String, Object> getModelAttributes() {
054 Map<String, Object> attributes = new HashMap<String, Object>();
055
056 attributes.put("activityCounterId", getActivityCounterId());
057 attributes.put("groupId", getGroupId());
058 attributes.put("companyId", getCompanyId());
059 attributes.put("classNameId", getClassNameId());
060 attributes.put("classPK", getClassPK());
061 attributes.put("name", getName());
062 attributes.put("ownerType", getOwnerType());
063 attributes.put("currentValue", getCurrentValue());
064 attributes.put("totalValue", getTotalValue());
065 attributes.put("graceValue", getGraceValue());
066 attributes.put("startPeriod", getStartPeriod());
067 attributes.put("endPeriod", getEndPeriod());
068 attributes.put("active", getActive());
069
070 return attributes;
071 }
072
073 @Override
074 public void setModelAttributes(Map<String, Object> attributes) {
075 Long activityCounterId = (Long)attributes.get("activityCounterId");
076
077 if (activityCounterId != null) {
078 setActivityCounterId(activityCounterId);
079 }
080
081 Long groupId = (Long)attributes.get("groupId");
082
083 if (groupId != null) {
084 setGroupId(groupId);
085 }
086
087 Long companyId = (Long)attributes.get("companyId");
088
089 if (companyId != null) {
090 setCompanyId(companyId);
091 }
092
093 Long classNameId = (Long)attributes.get("classNameId");
094
095 if (classNameId != null) {
096 setClassNameId(classNameId);
097 }
098
099 Long classPK = (Long)attributes.get("classPK");
100
101 if (classPK != null) {
102 setClassPK(classPK);
103 }
104
105 String name = (String)attributes.get("name");
106
107 if (name != null) {
108 setName(name);
109 }
110
111 Integer ownerType = (Integer)attributes.get("ownerType");
112
113 if (ownerType != null) {
114 setOwnerType(ownerType);
115 }
116
117 Integer currentValue = (Integer)attributes.get("currentValue");
118
119 if (currentValue != null) {
120 setCurrentValue(currentValue);
121 }
122
123 Integer totalValue = (Integer)attributes.get("totalValue");
124
125 if (totalValue != null) {
126 setTotalValue(totalValue);
127 }
128
129 Integer graceValue = (Integer)attributes.get("graceValue");
130
131 if (graceValue != null) {
132 setGraceValue(graceValue);
133 }
134
135 Integer startPeriod = (Integer)attributes.get("startPeriod");
136
137 if (startPeriod != null) {
138 setStartPeriod(startPeriod);
139 }
140
141 Integer endPeriod = (Integer)attributes.get("endPeriod");
142
143 if (endPeriod != null) {
144 setEndPeriod(endPeriod);
145 }
146
147 Boolean active = (Boolean)attributes.get("active");
148
149 if (active != null) {
150 setActive(active);
151 }
152 }
153
154
159 @Override
160 public long getPrimaryKey() {
161 return _socialActivityCounter.getPrimaryKey();
162 }
163
164
169 @Override
170 public void setPrimaryKey(long primaryKey) {
171 _socialActivityCounter.setPrimaryKey(primaryKey);
172 }
173
174
179 @Override
180 public long getActivityCounterId() {
181 return _socialActivityCounter.getActivityCounterId();
182 }
183
184
189 @Override
190 public void setActivityCounterId(long activityCounterId) {
191 _socialActivityCounter.setActivityCounterId(activityCounterId);
192 }
193
194
199 @Override
200 public long getGroupId() {
201 return _socialActivityCounter.getGroupId();
202 }
203
204
209 @Override
210 public void setGroupId(long groupId) {
211 _socialActivityCounter.setGroupId(groupId);
212 }
213
214
219 @Override
220 public long getCompanyId() {
221 return _socialActivityCounter.getCompanyId();
222 }
223
224
229 @Override
230 public void setCompanyId(long companyId) {
231 _socialActivityCounter.setCompanyId(companyId);
232 }
233
234
239 @Override
240 public java.lang.String getClassName() {
241 return _socialActivityCounter.getClassName();
242 }
243
244 @Override
245 public void setClassName(java.lang.String className) {
246 _socialActivityCounter.setClassName(className);
247 }
248
249
254 @Override
255 public long getClassNameId() {
256 return _socialActivityCounter.getClassNameId();
257 }
258
259
264 @Override
265 public void setClassNameId(long classNameId) {
266 _socialActivityCounter.setClassNameId(classNameId);
267 }
268
269
274 @Override
275 public long getClassPK() {
276 return _socialActivityCounter.getClassPK();
277 }
278
279
284 @Override
285 public void setClassPK(long classPK) {
286 _socialActivityCounter.setClassPK(classPK);
287 }
288
289
294 @Override
295 public java.lang.String getName() {
296 return _socialActivityCounter.getName();
297 }
298
299
304 @Override
305 public void setName(java.lang.String name) {
306 _socialActivityCounter.setName(name);
307 }
308
309
314 @Override
315 public int getOwnerType() {
316 return _socialActivityCounter.getOwnerType();
317 }
318
319
324 @Override
325 public void setOwnerType(int ownerType) {
326 _socialActivityCounter.setOwnerType(ownerType);
327 }
328
329
334 @Override
335 public int getCurrentValue() {
336 return _socialActivityCounter.getCurrentValue();
337 }
338
339
344 @Override
345 public void setCurrentValue(int currentValue) {
346 _socialActivityCounter.setCurrentValue(currentValue);
347 }
348
349
354 @Override
355 public int getTotalValue() {
356 return _socialActivityCounter.getTotalValue();
357 }
358
359
364 @Override
365 public void setTotalValue(int totalValue) {
366 _socialActivityCounter.setTotalValue(totalValue);
367 }
368
369
374 @Override
375 public int getGraceValue() {
376 return _socialActivityCounter.getGraceValue();
377 }
378
379
384 @Override
385 public void setGraceValue(int graceValue) {
386 _socialActivityCounter.setGraceValue(graceValue);
387 }
388
389
394 @Override
395 public int getStartPeriod() {
396 return _socialActivityCounter.getStartPeriod();
397 }
398
399
404 @Override
405 public void setStartPeriod(int startPeriod) {
406 _socialActivityCounter.setStartPeriod(startPeriod);
407 }
408
409
414 @Override
415 public int getEndPeriod() {
416 return _socialActivityCounter.getEndPeriod();
417 }
418
419
424 @Override
425 public void setEndPeriod(int endPeriod) {
426 _socialActivityCounter.setEndPeriod(endPeriod);
427 }
428
429
434 @Override
435 public boolean getActive() {
436 return _socialActivityCounter.getActive();
437 }
438
439
444 @Override
445 public boolean isActive() {
446 return _socialActivityCounter.isActive();
447 }
448
449
454 @Override
455 public void setActive(boolean active) {
456 _socialActivityCounter.setActive(active);
457 }
458
459 @Override
460 public boolean isNew() {
461 return _socialActivityCounter.isNew();
462 }
463
464 @Override
465 public void setNew(boolean n) {
466 _socialActivityCounter.setNew(n);
467 }
468
469 @Override
470 public boolean isCachedModel() {
471 return _socialActivityCounter.isCachedModel();
472 }
473
474 @Override
475 public void setCachedModel(boolean cachedModel) {
476 _socialActivityCounter.setCachedModel(cachedModel);
477 }
478
479 @Override
480 public boolean isEscapedModel() {
481 return _socialActivityCounter.isEscapedModel();
482 }
483
484 @Override
485 public java.io.Serializable getPrimaryKeyObj() {
486 return _socialActivityCounter.getPrimaryKeyObj();
487 }
488
489 @Override
490 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
491 _socialActivityCounter.setPrimaryKeyObj(primaryKeyObj);
492 }
493
494 @Override
495 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
496 return _socialActivityCounter.getExpandoBridge();
497 }
498
499 @Override
500 public void setExpandoBridgeAttributes(
501 com.liferay.portal.model.BaseModel<?> baseModel) {
502 _socialActivityCounter.setExpandoBridgeAttributes(baseModel);
503 }
504
505 @Override
506 public void setExpandoBridgeAttributes(
507 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
508 _socialActivityCounter.setExpandoBridgeAttributes(expandoBridge);
509 }
510
511 @Override
512 public void setExpandoBridgeAttributes(
513 com.liferay.portal.service.ServiceContext serviceContext) {
514 _socialActivityCounter.setExpandoBridgeAttributes(serviceContext);
515 }
516
517 @Override
518 public java.lang.Object clone() {
519 return new SocialActivityCounterWrapper((SocialActivityCounter)_socialActivityCounter.clone());
520 }
521
522 @Override
523 public int compareTo(
524 com.liferay.portlet.social.model.SocialActivityCounter socialActivityCounter) {
525 return _socialActivityCounter.compareTo(socialActivityCounter);
526 }
527
528 @Override
529 public int hashCode() {
530 return _socialActivityCounter.hashCode();
531 }
532
533 @Override
534 public com.liferay.portal.model.CacheModel<com.liferay.portlet.social.model.SocialActivityCounter> toCacheModel() {
535 return _socialActivityCounter.toCacheModel();
536 }
537
538 @Override
539 public com.liferay.portlet.social.model.SocialActivityCounter toEscapedModel() {
540 return new SocialActivityCounterWrapper(_socialActivityCounter.toEscapedModel());
541 }
542
543 @Override
544 public com.liferay.portlet.social.model.SocialActivityCounter toUnescapedModel() {
545 return new SocialActivityCounterWrapper(_socialActivityCounter.toUnescapedModel());
546 }
547
548 @Override
549 public java.lang.String toString() {
550 return _socialActivityCounter.toString();
551 }
552
553 @Override
554 public java.lang.String toXmlString() {
555 return _socialActivityCounter.toXmlString();
556 }
557
558 @Override
559 public void persist()
560 throws com.liferay.portal.kernel.exception.SystemException {
561 _socialActivityCounter.persist();
562 }
563
564 @Override
565 public boolean isActivePeriod(int periodLength) {
566 return _socialActivityCounter.isActivePeriod(periodLength);
567 }
568
569 @Override
570 public boolean equals(Object obj) {
571 if (this == obj) {
572 return true;
573 }
574
575 if (!(obj instanceof SocialActivityCounterWrapper)) {
576 return false;
577 }
578
579 SocialActivityCounterWrapper socialActivityCounterWrapper = (SocialActivityCounterWrapper)obj;
580
581 if (Validator.equals(_socialActivityCounter,
582 socialActivityCounterWrapper._socialActivityCounter)) {
583 return true;
584 }
585
586 return false;
587 }
588
589
592 public SocialActivityCounter getWrappedSocialActivityCounter() {
593 return _socialActivityCounter;
594 }
595
596 @Override
597 public SocialActivityCounter getWrappedModel() {
598 return _socialActivityCounter;
599 }
600
601 @Override
602 public void resetOriginalValues() {
603 _socialActivityCounter.resetOriginalValues();
604 }
605
606 private SocialActivityCounter _socialActivityCounter;
607 }