001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class UserNotificationEventWrapper implements UserNotificationEvent,
032 ModelWrapper<UserNotificationEvent> {
033 public UserNotificationEventWrapper(
034 UserNotificationEvent userNotificationEvent) {
035 _userNotificationEvent = userNotificationEvent;
036 }
037
038 @Override
039 public Class<?> getModelClass() {
040 return UserNotificationEvent.class;
041 }
042
043 @Override
044 public String getModelClassName() {
045 return UserNotificationEvent.class.getName();
046 }
047
048 @Override
049 public Map<String, Object> getModelAttributes() {
050 Map<String, Object> attributes = new HashMap<String, Object>();
051
052 attributes.put("uuid", getUuid());
053 attributes.put("userNotificationEventId", getUserNotificationEventId());
054 attributes.put("companyId", getCompanyId());
055 attributes.put("userId", getUserId());
056 attributes.put("type", getType());
057 attributes.put("timestamp", getTimestamp());
058 attributes.put("deliverBy", getDeliverBy());
059 attributes.put("delivered", getDelivered());
060 attributes.put("payload", getPayload());
061 attributes.put("archived", getArchived());
062
063 return attributes;
064 }
065
066 @Override
067 public void setModelAttributes(Map<String, Object> attributes) {
068 String uuid = (String)attributes.get("uuid");
069
070 if (uuid != null) {
071 setUuid(uuid);
072 }
073
074 Long userNotificationEventId = (Long)attributes.get(
075 "userNotificationEventId");
076
077 if (userNotificationEventId != null) {
078 setUserNotificationEventId(userNotificationEventId);
079 }
080
081 Long companyId = (Long)attributes.get("companyId");
082
083 if (companyId != null) {
084 setCompanyId(companyId);
085 }
086
087 Long userId = (Long)attributes.get("userId");
088
089 if (userId != null) {
090 setUserId(userId);
091 }
092
093 String type = (String)attributes.get("type");
094
095 if (type != null) {
096 setType(type);
097 }
098
099 Long timestamp = (Long)attributes.get("timestamp");
100
101 if (timestamp != null) {
102 setTimestamp(timestamp);
103 }
104
105 Long deliverBy = (Long)attributes.get("deliverBy");
106
107 if (deliverBy != null) {
108 setDeliverBy(deliverBy);
109 }
110
111 Boolean delivered = (Boolean)attributes.get("delivered");
112
113 if (delivered != null) {
114 setDelivered(delivered);
115 }
116
117 String payload = (String)attributes.get("payload");
118
119 if (payload != null) {
120 setPayload(payload);
121 }
122
123 Boolean archived = (Boolean)attributes.get("archived");
124
125 if (archived != null) {
126 setArchived(archived);
127 }
128 }
129
130
135 @Override
136 public long getPrimaryKey() {
137 return _userNotificationEvent.getPrimaryKey();
138 }
139
140
145 @Override
146 public void setPrimaryKey(long primaryKey) {
147 _userNotificationEvent.setPrimaryKey(primaryKey);
148 }
149
150
155 @Override
156 public java.lang.String getUuid() {
157 return _userNotificationEvent.getUuid();
158 }
159
160
165 @Override
166 public void setUuid(java.lang.String uuid) {
167 _userNotificationEvent.setUuid(uuid);
168 }
169
170
175 @Override
176 public long getUserNotificationEventId() {
177 return _userNotificationEvent.getUserNotificationEventId();
178 }
179
180
185 @Override
186 public void setUserNotificationEventId(long userNotificationEventId) {
187 _userNotificationEvent.setUserNotificationEventId(userNotificationEventId);
188 }
189
190
195 @Override
196 public long getCompanyId() {
197 return _userNotificationEvent.getCompanyId();
198 }
199
200
205 @Override
206 public void setCompanyId(long companyId) {
207 _userNotificationEvent.setCompanyId(companyId);
208 }
209
210
215 @Override
216 public long getUserId() {
217 return _userNotificationEvent.getUserId();
218 }
219
220
225 @Override
226 public void setUserId(long userId) {
227 _userNotificationEvent.setUserId(userId);
228 }
229
230
236 @Override
237 public java.lang.String getUserUuid()
238 throws com.liferay.portal.kernel.exception.SystemException {
239 return _userNotificationEvent.getUserUuid();
240 }
241
242
247 @Override
248 public void setUserUuid(java.lang.String userUuid) {
249 _userNotificationEvent.setUserUuid(userUuid);
250 }
251
252
257 @Override
258 public java.lang.String getType() {
259 return _userNotificationEvent.getType();
260 }
261
262
267 @Override
268 public void setType(java.lang.String type) {
269 _userNotificationEvent.setType(type);
270 }
271
272
277 @Override
278 public long getTimestamp() {
279 return _userNotificationEvent.getTimestamp();
280 }
281
282
287 @Override
288 public void setTimestamp(long timestamp) {
289 _userNotificationEvent.setTimestamp(timestamp);
290 }
291
292
297 @Override
298 public long getDeliverBy() {
299 return _userNotificationEvent.getDeliverBy();
300 }
301
302
307 @Override
308 public void setDeliverBy(long deliverBy) {
309 _userNotificationEvent.setDeliverBy(deliverBy);
310 }
311
312
317 @Override
318 public boolean getDelivered() {
319 return _userNotificationEvent.getDelivered();
320 }
321
322
327 @Override
328 public boolean isDelivered() {
329 return _userNotificationEvent.isDelivered();
330 }
331
332
337 @Override
338 public void setDelivered(boolean delivered) {
339 _userNotificationEvent.setDelivered(delivered);
340 }
341
342
347 @Override
348 public java.lang.String getPayload() {
349 return _userNotificationEvent.getPayload();
350 }
351
352
357 @Override
358 public void setPayload(java.lang.String payload) {
359 _userNotificationEvent.setPayload(payload);
360 }
361
362
367 @Override
368 public boolean getArchived() {
369 return _userNotificationEvent.getArchived();
370 }
371
372
377 @Override
378 public boolean isArchived() {
379 return _userNotificationEvent.isArchived();
380 }
381
382
387 @Override
388 public void setArchived(boolean archived) {
389 _userNotificationEvent.setArchived(archived);
390 }
391
392 @Override
393 public boolean isNew() {
394 return _userNotificationEvent.isNew();
395 }
396
397 @Override
398 public void setNew(boolean n) {
399 _userNotificationEvent.setNew(n);
400 }
401
402 @Override
403 public boolean isCachedModel() {
404 return _userNotificationEvent.isCachedModel();
405 }
406
407 @Override
408 public void setCachedModel(boolean cachedModel) {
409 _userNotificationEvent.setCachedModel(cachedModel);
410 }
411
412 @Override
413 public boolean isEscapedModel() {
414 return _userNotificationEvent.isEscapedModel();
415 }
416
417 @Override
418 public java.io.Serializable getPrimaryKeyObj() {
419 return _userNotificationEvent.getPrimaryKeyObj();
420 }
421
422 @Override
423 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
424 _userNotificationEvent.setPrimaryKeyObj(primaryKeyObj);
425 }
426
427 @Override
428 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
429 return _userNotificationEvent.getExpandoBridge();
430 }
431
432 @Override
433 public void setExpandoBridgeAttributes(
434 com.liferay.portal.model.BaseModel<?> baseModel) {
435 _userNotificationEvent.setExpandoBridgeAttributes(baseModel);
436 }
437
438 @Override
439 public void setExpandoBridgeAttributes(
440 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
441 _userNotificationEvent.setExpandoBridgeAttributes(expandoBridge);
442 }
443
444 @Override
445 public void setExpandoBridgeAttributes(
446 com.liferay.portal.service.ServiceContext serviceContext) {
447 _userNotificationEvent.setExpandoBridgeAttributes(serviceContext);
448 }
449
450 @Override
451 public java.lang.Object clone() {
452 return new UserNotificationEventWrapper((UserNotificationEvent)_userNotificationEvent.clone());
453 }
454
455 @Override
456 public int compareTo(
457 com.liferay.portal.model.UserNotificationEvent userNotificationEvent) {
458 return _userNotificationEvent.compareTo(userNotificationEvent);
459 }
460
461 @Override
462 public int hashCode() {
463 return _userNotificationEvent.hashCode();
464 }
465
466 @Override
467 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.UserNotificationEvent> toCacheModel() {
468 return _userNotificationEvent.toCacheModel();
469 }
470
471 @Override
472 public com.liferay.portal.model.UserNotificationEvent toEscapedModel() {
473 return new UserNotificationEventWrapper(_userNotificationEvent.toEscapedModel());
474 }
475
476 @Override
477 public com.liferay.portal.model.UserNotificationEvent toUnescapedModel() {
478 return new UserNotificationEventWrapper(_userNotificationEvent.toUnescapedModel());
479 }
480
481 @Override
482 public java.lang.String toString() {
483 return _userNotificationEvent.toString();
484 }
485
486 @Override
487 public java.lang.String toXmlString() {
488 return _userNotificationEvent.toXmlString();
489 }
490
491 @Override
492 public void persist()
493 throws com.liferay.portal.kernel.exception.SystemException {
494 _userNotificationEvent.persist();
495 }
496
497 @Override
498 public boolean equals(Object obj) {
499 if (this == obj) {
500 return true;
501 }
502
503 if (!(obj instanceof UserNotificationEventWrapper)) {
504 return false;
505 }
506
507 UserNotificationEventWrapper userNotificationEventWrapper = (UserNotificationEventWrapper)obj;
508
509 if (Validator.equals(_userNotificationEvent,
510 userNotificationEventWrapper._userNotificationEvent)) {
511 return true;
512 }
513
514 return false;
515 }
516
517
520 public UserNotificationEvent getWrappedUserNotificationEvent() {
521 return _userNotificationEvent;
522 }
523
524 @Override
525 public UserNotificationEvent getWrappedModel() {
526 return _userNotificationEvent;
527 }
528
529 @Override
530 public void resetOriginalValues() {
531 _userNotificationEvent.resetOriginalValues();
532 }
533
534 private UserNotificationEvent _userNotificationEvent;
535 }