001
014
015 package com.liferay.portal.kernel.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.expando.kernel.model.ExpandoBridge;
020
021 import com.liferay.portal.kernel.service.ServiceContext;
022
023 import java.io.Serializable;
024
025 import java.util.HashMap;
026 import java.util.Map;
027 import java.util.Objects;
028
029
038 @ProviderType
039 public class UserNotificationEventWrapper implements UserNotificationEvent,
040 ModelWrapper<UserNotificationEvent> {
041 public UserNotificationEventWrapper(
042 UserNotificationEvent userNotificationEvent) {
043 _userNotificationEvent = userNotificationEvent;
044 }
045
046 @Override
047 public Class<?> getModelClass() {
048 return UserNotificationEvent.class;
049 }
050
051 @Override
052 public String getModelClassName() {
053 return UserNotificationEvent.class.getName();
054 }
055
056 @Override
057 public Map<String, Object> getModelAttributes() {
058 Map<String, Object> attributes = new HashMap<String, Object>();
059
060 attributes.put("mvccVersion", getMvccVersion());
061 attributes.put("uuid", getUuid());
062 attributes.put("userNotificationEventId", getUserNotificationEventId());
063 attributes.put("companyId", getCompanyId());
064 attributes.put("userId", getUserId());
065 attributes.put("type", getType());
066 attributes.put("timestamp", getTimestamp());
067 attributes.put("deliveryType", getDeliveryType());
068 attributes.put("deliverBy", getDeliverBy());
069 attributes.put("delivered", getDelivered());
070 attributes.put("payload", getPayload());
071 attributes.put("actionRequired", getActionRequired());
072 attributes.put("archived", getArchived());
073
074 return attributes;
075 }
076
077 @Override
078 public void setModelAttributes(Map<String, Object> attributes) {
079 Long mvccVersion = (Long)attributes.get("mvccVersion");
080
081 if (mvccVersion != null) {
082 setMvccVersion(mvccVersion);
083 }
084
085 String uuid = (String)attributes.get("uuid");
086
087 if (uuid != null) {
088 setUuid(uuid);
089 }
090
091 Long userNotificationEventId = (Long)attributes.get(
092 "userNotificationEventId");
093
094 if (userNotificationEventId != null) {
095 setUserNotificationEventId(userNotificationEventId);
096 }
097
098 Long companyId = (Long)attributes.get("companyId");
099
100 if (companyId != null) {
101 setCompanyId(companyId);
102 }
103
104 Long userId = (Long)attributes.get("userId");
105
106 if (userId != null) {
107 setUserId(userId);
108 }
109
110 String type = (String)attributes.get("type");
111
112 if (type != null) {
113 setType(type);
114 }
115
116 Long timestamp = (Long)attributes.get("timestamp");
117
118 if (timestamp != null) {
119 setTimestamp(timestamp);
120 }
121
122 Integer deliveryType = (Integer)attributes.get("deliveryType");
123
124 if (deliveryType != null) {
125 setDeliveryType(deliveryType);
126 }
127
128 Long deliverBy = (Long)attributes.get("deliverBy");
129
130 if (deliverBy != null) {
131 setDeliverBy(deliverBy);
132 }
133
134 Boolean delivered = (Boolean)attributes.get("delivered");
135
136 if (delivered != null) {
137 setDelivered(delivered);
138 }
139
140 String payload = (String)attributes.get("payload");
141
142 if (payload != null) {
143 setPayload(payload);
144 }
145
146 Boolean actionRequired = (Boolean)attributes.get("actionRequired");
147
148 if (actionRequired != null) {
149 setActionRequired(actionRequired);
150 }
151
152 Boolean archived = (Boolean)attributes.get("archived");
153
154 if (archived != null) {
155 setArchived(archived);
156 }
157 }
158
159 @Override
160 public CacheModel<UserNotificationEvent> toCacheModel() {
161 return _userNotificationEvent.toCacheModel();
162 }
163
164 @Override
165 public UserNotificationEvent toEscapedModel() {
166 return new UserNotificationEventWrapper(_userNotificationEvent.toEscapedModel());
167 }
168
169 @Override
170 public UserNotificationEvent toUnescapedModel() {
171 return new UserNotificationEventWrapper(_userNotificationEvent.toUnescapedModel());
172 }
173
174
179 @Override
180 public boolean getActionRequired() {
181 return _userNotificationEvent.getActionRequired();
182 }
183
184
189 @Override
190 public boolean getArchived() {
191 return _userNotificationEvent.getArchived();
192 }
193
194
199 @Override
200 public boolean getDelivered() {
201 return _userNotificationEvent.getDelivered();
202 }
203
204
209 @Override
210 public boolean isActionRequired() {
211 return _userNotificationEvent.isActionRequired();
212 }
213
214
219 @Override
220 public boolean isArchived() {
221 return _userNotificationEvent.isArchived();
222 }
223
224 @Override
225 public boolean isCachedModel() {
226 return _userNotificationEvent.isCachedModel();
227 }
228
229
234 @Override
235 public boolean isDelivered() {
236 return _userNotificationEvent.isDelivered();
237 }
238
239 @Override
240 public boolean isEscapedModel() {
241 return _userNotificationEvent.isEscapedModel();
242 }
243
244 @Override
245 public boolean isNew() {
246 return _userNotificationEvent.isNew();
247 }
248
249 @Override
250 public ExpandoBridge getExpandoBridge() {
251 return _userNotificationEvent.getExpandoBridge();
252 }
253
254 @Override
255 public int compareTo(UserNotificationEvent userNotificationEvent) {
256 return _userNotificationEvent.compareTo(userNotificationEvent);
257 }
258
259
264 @Override
265 public int getDeliveryType() {
266 return _userNotificationEvent.getDeliveryType();
267 }
268
269 @Override
270 public int hashCode() {
271 return _userNotificationEvent.hashCode();
272 }
273
274 @Override
275 public Serializable getPrimaryKeyObj() {
276 return _userNotificationEvent.getPrimaryKeyObj();
277 }
278
279 @Override
280 public java.lang.Object clone() {
281 return new UserNotificationEventWrapper((UserNotificationEvent)_userNotificationEvent.clone());
282 }
283
284
289 @Override
290 public java.lang.String getPayload() {
291 return _userNotificationEvent.getPayload();
292 }
293
294
299 @Override
300 public java.lang.String getType() {
301 return _userNotificationEvent.getType();
302 }
303
304
309 @Override
310 public java.lang.String getUserUuid() {
311 return _userNotificationEvent.getUserUuid();
312 }
313
314
319 @Override
320 public java.lang.String getUuid() {
321 return _userNotificationEvent.getUuid();
322 }
323
324 @Override
325 public java.lang.String toString() {
326 return _userNotificationEvent.toString();
327 }
328
329 @Override
330 public java.lang.String toXmlString() {
331 return _userNotificationEvent.toXmlString();
332 }
333
334
339 @Override
340 public long getCompanyId() {
341 return _userNotificationEvent.getCompanyId();
342 }
343
344
349 @Override
350 public long getDeliverBy() {
351 return _userNotificationEvent.getDeliverBy();
352 }
353
354
359 @Override
360 public long getMvccVersion() {
361 return _userNotificationEvent.getMvccVersion();
362 }
363
364
369 @Override
370 public long getPrimaryKey() {
371 return _userNotificationEvent.getPrimaryKey();
372 }
373
374
379 @Override
380 public long getTimestamp() {
381 return _userNotificationEvent.getTimestamp();
382 }
383
384
389 @Override
390 public long getUserId() {
391 return _userNotificationEvent.getUserId();
392 }
393
394
399 @Override
400 public long getUserNotificationEventId() {
401 return _userNotificationEvent.getUserNotificationEventId();
402 }
403
404 @Override
405 public void persist() {
406 _userNotificationEvent.persist();
407 }
408
409
414 @Override
415 public void setActionRequired(boolean actionRequired) {
416 _userNotificationEvent.setActionRequired(actionRequired);
417 }
418
419
424 @Override
425 public void setArchived(boolean archived) {
426 _userNotificationEvent.setArchived(archived);
427 }
428
429 @Override
430 public void setCachedModel(boolean cachedModel) {
431 _userNotificationEvent.setCachedModel(cachedModel);
432 }
433
434
439 @Override
440 public void setCompanyId(long companyId) {
441 _userNotificationEvent.setCompanyId(companyId);
442 }
443
444
449 @Override
450 public void setDeliverBy(long deliverBy) {
451 _userNotificationEvent.setDeliverBy(deliverBy);
452 }
453
454
459 @Override
460 public void setDelivered(boolean delivered) {
461 _userNotificationEvent.setDelivered(delivered);
462 }
463
464
469 @Override
470 public void setDeliveryType(int deliveryType) {
471 _userNotificationEvent.setDeliveryType(deliveryType);
472 }
473
474 @Override
475 public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
476 _userNotificationEvent.setExpandoBridgeAttributes(baseModel);
477 }
478
479 @Override
480 public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
481 _userNotificationEvent.setExpandoBridgeAttributes(expandoBridge);
482 }
483
484 @Override
485 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
486 _userNotificationEvent.setExpandoBridgeAttributes(serviceContext);
487 }
488
489
494 @Override
495 public void setMvccVersion(long mvccVersion) {
496 _userNotificationEvent.setMvccVersion(mvccVersion);
497 }
498
499 @Override
500 public void setNew(boolean n) {
501 _userNotificationEvent.setNew(n);
502 }
503
504
509 @Override
510 public void setPayload(java.lang.String payload) {
511 _userNotificationEvent.setPayload(payload);
512 }
513
514
519 @Override
520 public void setPrimaryKey(long primaryKey) {
521 _userNotificationEvent.setPrimaryKey(primaryKey);
522 }
523
524 @Override
525 public void setPrimaryKeyObj(Serializable primaryKeyObj) {
526 _userNotificationEvent.setPrimaryKeyObj(primaryKeyObj);
527 }
528
529
534 @Override
535 public void setTimestamp(long timestamp) {
536 _userNotificationEvent.setTimestamp(timestamp);
537 }
538
539
544 @Override
545 public void setType(java.lang.String type) {
546 _userNotificationEvent.setType(type);
547 }
548
549
554 @Override
555 public void setUserId(long userId) {
556 _userNotificationEvent.setUserId(userId);
557 }
558
559
564 @Override
565 public void setUserNotificationEventId(long userNotificationEventId) {
566 _userNotificationEvent.setUserNotificationEventId(userNotificationEventId);
567 }
568
569
574 @Override
575 public void setUserUuid(java.lang.String userUuid) {
576 _userNotificationEvent.setUserUuid(userUuid);
577 }
578
579
584 @Override
585 public void setUuid(java.lang.String uuid) {
586 _userNotificationEvent.setUuid(uuid);
587 }
588
589 @Override
590 public boolean equals(Object obj) {
591 if (this == obj) {
592 return true;
593 }
594
595 if (!(obj instanceof UserNotificationEventWrapper)) {
596 return false;
597 }
598
599 UserNotificationEventWrapper userNotificationEventWrapper = (UserNotificationEventWrapper)obj;
600
601 if (Objects.equals(_userNotificationEvent,
602 userNotificationEventWrapper._userNotificationEvent)) {
603 return true;
604 }
605
606 return false;
607 }
608
609 @Override
610 public UserNotificationEvent getWrappedModel() {
611 return _userNotificationEvent;
612 }
613
614 @Override
615 public boolean isEntityCacheEnabled() {
616 return _userNotificationEvent.isEntityCacheEnabled();
617 }
618
619 @Override
620 public boolean isFinderCacheEnabled() {
621 return _userNotificationEvent.isFinderCacheEnabled();
622 }
623
624 @Override
625 public void resetOriginalValues() {
626 _userNotificationEvent.resetOriginalValues();
627 }
628
629 private final UserNotificationEvent _userNotificationEvent;
630 }