001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.Validator;
020    
021    import java.util.HashMap;
022    import java.util.Map;
023    
024    /**
025     * <p>
026     * This class is a wrapper for {@link UserNotificationEvent}.
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see UserNotificationEvent
031     * @generated
032     */
033    @ProviderType
034    public class UserNotificationEventWrapper implements UserNotificationEvent,
035            ModelWrapper<UserNotificationEvent> {
036            public UserNotificationEventWrapper(
037                    UserNotificationEvent userNotificationEvent) {
038                    _userNotificationEvent = userNotificationEvent;
039            }
040    
041            @Override
042            public Class<?> getModelClass() {
043                    return UserNotificationEvent.class;
044            }
045    
046            @Override
047            public String getModelClassName() {
048                    return UserNotificationEvent.class.getName();
049            }
050    
051            @Override
052            public Map<String, Object> getModelAttributes() {
053                    Map<String, Object> attributes = new HashMap<String, Object>();
054    
055                    attributes.put("mvccVersion", getMvccVersion());
056                    attributes.put("uuid", getUuid());
057                    attributes.put("userNotificationEventId", getUserNotificationEventId());
058                    attributes.put("companyId", getCompanyId());
059                    attributes.put("userId", getUserId());
060                    attributes.put("type", getType());
061                    attributes.put("timestamp", getTimestamp());
062                    attributes.put("deliveryType", getDeliveryType());
063                    attributes.put("deliverBy", getDeliverBy());
064                    attributes.put("delivered", getDelivered());
065                    attributes.put("payload", getPayload());
066                    attributes.put("actionRequired", getActionRequired());
067                    attributes.put("archived", getArchived());
068    
069                    return attributes;
070            }
071    
072            @Override
073            public void setModelAttributes(Map<String, Object> attributes) {
074                    Long mvccVersion = (Long)attributes.get("mvccVersion");
075    
076                    if (mvccVersion != null) {
077                            setMvccVersion(mvccVersion);
078                    }
079    
080                    String uuid = (String)attributes.get("uuid");
081    
082                    if (uuid != null) {
083                            setUuid(uuid);
084                    }
085    
086                    Long userNotificationEventId = (Long)attributes.get(
087                                    "userNotificationEventId");
088    
089                    if (userNotificationEventId != null) {
090                            setUserNotificationEventId(userNotificationEventId);
091                    }
092    
093                    Long companyId = (Long)attributes.get("companyId");
094    
095                    if (companyId != null) {
096                            setCompanyId(companyId);
097                    }
098    
099                    Long userId = (Long)attributes.get("userId");
100    
101                    if (userId != null) {
102                            setUserId(userId);
103                    }
104    
105                    String type = (String)attributes.get("type");
106    
107                    if (type != null) {
108                            setType(type);
109                    }
110    
111                    Long timestamp = (Long)attributes.get("timestamp");
112    
113                    if (timestamp != null) {
114                            setTimestamp(timestamp);
115                    }
116    
117                    Integer deliveryType = (Integer)attributes.get("deliveryType");
118    
119                    if (deliveryType != null) {
120                            setDeliveryType(deliveryType);
121                    }
122    
123                    Long deliverBy = (Long)attributes.get("deliverBy");
124    
125                    if (deliverBy != null) {
126                            setDeliverBy(deliverBy);
127                    }
128    
129                    Boolean delivered = (Boolean)attributes.get("delivered");
130    
131                    if (delivered != null) {
132                            setDelivered(delivered);
133                    }
134    
135                    String payload = (String)attributes.get("payload");
136    
137                    if (payload != null) {
138                            setPayload(payload);
139                    }
140    
141                    Boolean actionRequired = (Boolean)attributes.get("actionRequired");
142    
143                    if (actionRequired != null) {
144                            setActionRequired(actionRequired);
145                    }
146    
147                    Boolean archived = (Boolean)attributes.get("archived");
148    
149                    if (archived != null) {
150                            setArchived(archived);
151                    }
152            }
153    
154            @Override
155            public java.lang.Object clone() {
156                    return new UserNotificationEventWrapper((UserNotificationEvent)_userNotificationEvent.clone());
157            }
158    
159            @Override
160            public int compareTo(
161                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent) {
162                    return _userNotificationEvent.compareTo(userNotificationEvent);
163            }
164    
165            /**
166            * Returns the action required of this user notification event.
167            *
168            * @return the action required of this user notification event
169            */
170            @Override
171            public boolean getActionRequired() {
172                    return _userNotificationEvent.getActionRequired();
173            }
174    
175            /**
176            * Returns the archived of this user notification event.
177            *
178            * @return the archived of this user notification event
179            */
180            @Override
181            public boolean getArchived() {
182                    return _userNotificationEvent.getArchived();
183            }
184    
185            /**
186            * Returns the company ID of this user notification event.
187            *
188            * @return the company ID of this user notification event
189            */
190            @Override
191            public long getCompanyId() {
192                    return _userNotificationEvent.getCompanyId();
193            }
194    
195            /**
196            * Returns the deliver by of this user notification event.
197            *
198            * @return the deliver by of this user notification event
199            */
200            @Override
201            public long getDeliverBy() {
202                    return _userNotificationEvent.getDeliverBy();
203            }
204    
205            /**
206            * Returns the delivered of this user notification event.
207            *
208            * @return the delivered of this user notification event
209            */
210            @Override
211            public boolean getDelivered() {
212                    return _userNotificationEvent.getDelivered();
213            }
214    
215            /**
216            * Returns the delivery type of this user notification event.
217            *
218            * @return the delivery type of this user notification event
219            */
220            @Override
221            public int getDeliveryType() {
222                    return _userNotificationEvent.getDeliveryType();
223            }
224    
225            @Override
226            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
227                    return _userNotificationEvent.getExpandoBridge();
228            }
229    
230            /**
231            * Returns the mvcc version of this user notification event.
232            *
233            * @return the mvcc version of this user notification event
234            */
235            @Override
236            public long getMvccVersion() {
237                    return _userNotificationEvent.getMvccVersion();
238            }
239    
240            /**
241            * Returns the payload of this user notification event.
242            *
243            * @return the payload of this user notification event
244            */
245            @Override
246            public java.lang.String getPayload() {
247                    return _userNotificationEvent.getPayload();
248            }
249    
250            /**
251            * Returns the primary key of this user notification event.
252            *
253            * @return the primary key of this user notification event
254            */
255            @Override
256            public long getPrimaryKey() {
257                    return _userNotificationEvent.getPrimaryKey();
258            }
259    
260            @Override
261            public java.io.Serializable getPrimaryKeyObj() {
262                    return _userNotificationEvent.getPrimaryKeyObj();
263            }
264    
265            /**
266            * Returns the timestamp of this user notification event.
267            *
268            * @return the timestamp of this user notification event
269            */
270            @Override
271            public long getTimestamp() {
272                    return _userNotificationEvent.getTimestamp();
273            }
274    
275            /**
276            * Returns the type of this user notification event.
277            *
278            * @return the type of this user notification event
279            */
280            @Override
281            public java.lang.String getType() {
282                    return _userNotificationEvent.getType();
283            }
284    
285            /**
286            * Returns the user ID of this user notification event.
287            *
288            * @return the user ID of this user notification event
289            */
290            @Override
291            public long getUserId() {
292                    return _userNotificationEvent.getUserId();
293            }
294    
295            /**
296            * Returns the user notification event ID of this user notification event.
297            *
298            * @return the user notification event ID of this user notification event
299            */
300            @Override
301            public long getUserNotificationEventId() {
302                    return _userNotificationEvent.getUserNotificationEventId();
303            }
304    
305            /**
306            * Returns the user uuid of this user notification event.
307            *
308            * @return the user uuid of this user notification event
309            */
310            @Override
311            public java.lang.String getUserUuid() {
312                    return _userNotificationEvent.getUserUuid();
313            }
314    
315            /**
316            * Returns the uuid of this user notification event.
317            *
318            * @return the uuid of this user notification event
319            */
320            @Override
321            public java.lang.String getUuid() {
322                    return _userNotificationEvent.getUuid();
323            }
324    
325            @Override
326            public int hashCode() {
327                    return _userNotificationEvent.hashCode();
328            }
329    
330            /**
331            * Returns <code>true</code> if this user notification event is action required.
332            *
333            * @return <code>true</code> if this user notification event is action required; <code>false</code> otherwise
334            */
335            @Override
336            public boolean isActionRequired() {
337                    return _userNotificationEvent.isActionRequired();
338            }
339    
340            /**
341            * Returns <code>true</code> if this user notification event is archived.
342            *
343            * @return <code>true</code> if this user notification event is archived; <code>false</code> otherwise
344            */
345            @Override
346            public boolean isArchived() {
347                    return _userNotificationEvent.isArchived();
348            }
349    
350            @Override
351            public boolean isCachedModel() {
352                    return _userNotificationEvent.isCachedModel();
353            }
354    
355            /**
356            * Returns <code>true</code> if this user notification event is delivered.
357            *
358            * @return <code>true</code> if this user notification event is delivered; <code>false</code> otherwise
359            */
360            @Override
361            public boolean isDelivered() {
362                    return _userNotificationEvent.isDelivered();
363            }
364    
365            @Override
366            public boolean isEscapedModel() {
367                    return _userNotificationEvent.isEscapedModel();
368            }
369    
370            @Override
371            public boolean isNew() {
372                    return _userNotificationEvent.isNew();
373            }
374    
375            @Override
376            public void persist() {
377                    _userNotificationEvent.persist();
378            }
379    
380            /**
381            * Sets whether this user notification event is action required.
382            *
383            * @param actionRequired the action required of this user notification event
384            */
385            @Override
386            public void setActionRequired(boolean actionRequired) {
387                    _userNotificationEvent.setActionRequired(actionRequired);
388            }
389    
390            /**
391            * Sets whether this user notification event is archived.
392            *
393            * @param archived the archived of this user notification event
394            */
395            @Override
396            public void setArchived(boolean archived) {
397                    _userNotificationEvent.setArchived(archived);
398            }
399    
400            @Override
401            public void setCachedModel(boolean cachedModel) {
402                    _userNotificationEvent.setCachedModel(cachedModel);
403            }
404    
405            /**
406            * Sets the company ID of this user notification event.
407            *
408            * @param companyId the company ID of this user notification event
409            */
410            @Override
411            public void setCompanyId(long companyId) {
412                    _userNotificationEvent.setCompanyId(companyId);
413            }
414    
415            /**
416            * Sets the deliver by of this user notification event.
417            *
418            * @param deliverBy the deliver by of this user notification event
419            */
420            @Override
421            public void setDeliverBy(long deliverBy) {
422                    _userNotificationEvent.setDeliverBy(deliverBy);
423            }
424    
425            /**
426            * Sets whether this user notification event is delivered.
427            *
428            * @param delivered the delivered of this user notification event
429            */
430            @Override
431            public void setDelivered(boolean delivered) {
432                    _userNotificationEvent.setDelivered(delivered);
433            }
434    
435            /**
436            * Sets the delivery type of this user notification event.
437            *
438            * @param deliveryType the delivery type of this user notification event
439            */
440            @Override
441            public void setDeliveryType(int deliveryType) {
442                    _userNotificationEvent.setDeliveryType(deliveryType);
443            }
444    
445            @Override
446            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
447                    _userNotificationEvent.setExpandoBridgeAttributes(baseModel);
448            }
449    
450            @Override
451            public void setExpandoBridgeAttributes(
452                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
453                    _userNotificationEvent.setExpandoBridgeAttributes(expandoBridge);
454            }
455    
456            @Override
457            public void setExpandoBridgeAttributes(
458                    com.liferay.portal.service.ServiceContext serviceContext) {
459                    _userNotificationEvent.setExpandoBridgeAttributes(serviceContext);
460            }
461    
462            /**
463            * Sets the mvcc version of this user notification event.
464            *
465            * @param mvccVersion the mvcc version of this user notification event
466            */
467            @Override
468            public void setMvccVersion(long mvccVersion) {
469                    _userNotificationEvent.setMvccVersion(mvccVersion);
470            }
471    
472            @Override
473            public void setNew(boolean n) {
474                    _userNotificationEvent.setNew(n);
475            }
476    
477            /**
478            * Sets the payload of this user notification event.
479            *
480            * @param payload the payload of this user notification event
481            */
482            @Override
483            public void setPayload(java.lang.String payload) {
484                    _userNotificationEvent.setPayload(payload);
485            }
486    
487            /**
488            * Sets the primary key of this user notification event.
489            *
490            * @param primaryKey the primary key of this user notification event
491            */
492            @Override
493            public void setPrimaryKey(long primaryKey) {
494                    _userNotificationEvent.setPrimaryKey(primaryKey);
495            }
496    
497            @Override
498            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
499                    _userNotificationEvent.setPrimaryKeyObj(primaryKeyObj);
500            }
501    
502            /**
503            * Sets the timestamp of this user notification event.
504            *
505            * @param timestamp the timestamp of this user notification event
506            */
507            @Override
508            public void setTimestamp(long timestamp) {
509                    _userNotificationEvent.setTimestamp(timestamp);
510            }
511    
512            /**
513            * Sets the type of this user notification event.
514            *
515            * @param type the type of this user notification event
516            */
517            @Override
518            public void setType(java.lang.String type) {
519                    _userNotificationEvent.setType(type);
520            }
521    
522            /**
523            * Sets the user ID of this user notification event.
524            *
525            * @param userId the user ID of this user notification event
526            */
527            @Override
528            public void setUserId(long userId) {
529                    _userNotificationEvent.setUserId(userId);
530            }
531    
532            /**
533            * Sets the user notification event ID of this user notification event.
534            *
535            * @param userNotificationEventId the user notification event ID of this user notification event
536            */
537            @Override
538            public void setUserNotificationEventId(long userNotificationEventId) {
539                    _userNotificationEvent.setUserNotificationEventId(userNotificationEventId);
540            }
541    
542            /**
543            * Sets the user uuid of this user notification event.
544            *
545            * @param userUuid the user uuid of this user notification event
546            */
547            @Override
548            public void setUserUuid(java.lang.String userUuid) {
549                    _userNotificationEvent.setUserUuid(userUuid);
550            }
551    
552            /**
553            * Sets the uuid of this user notification event.
554            *
555            * @param uuid the uuid of this user notification event
556            */
557            @Override
558            public void setUuid(java.lang.String uuid) {
559                    _userNotificationEvent.setUuid(uuid);
560            }
561    
562            @Override
563            public CacheModel<com.liferay.portal.model.UserNotificationEvent> toCacheModel() {
564                    return _userNotificationEvent.toCacheModel();
565            }
566    
567            @Override
568            public com.liferay.portal.model.UserNotificationEvent toEscapedModel() {
569                    return new UserNotificationEventWrapper(_userNotificationEvent.toEscapedModel());
570            }
571    
572            @Override
573            public java.lang.String toString() {
574                    return _userNotificationEvent.toString();
575            }
576    
577            @Override
578            public com.liferay.portal.model.UserNotificationEvent toUnescapedModel() {
579                    return new UserNotificationEventWrapper(_userNotificationEvent.toUnescapedModel());
580            }
581    
582            @Override
583            public java.lang.String toXmlString() {
584                    return _userNotificationEvent.toXmlString();
585            }
586    
587            @Override
588            public boolean equals(Object obj) {
589                    if (this == obj) {
590                            return true;
591                    }
592    
593                    if (!(obj instanceof UserNotificationEventWrapper)) {
594                            return false;
595                    }
596    
597                    UserNotificationEventWrapper userNotificationEventWrapper = (UserNotificationEventWrapper)obj;
598    
599                    if (Validator.equals(_userNotificationEvent,
600                                            userNotificationEventWrapper._userNotificationEvent)) {
601                            return true;
602                    }
603    
604                    return false;
605            }
606    
607            @Override
608            public UserNotificationEvent getWrappedModel() {
609                    return _userNotificationEvent;
610            }
611    
612            @Override
613            public boolean isEntityCacheEnabled() {
614                    return _userNotificationEvent.isEntityCacheEnabled();
615            }
616    
617            @Override
618            public boolean isFinderCacheEnabled() {
619                    return _userNotificationEvent.isFinderCacheEnabled();
620            }
621    
622            @Override
623            public void resetOriginalValues() {
624                    _userNotificationEvent.resetOriginalValues();
625            }
626    
627            private final UserNotificationEvent _userNotificationEvent;
628    }