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(
447                    com.liferay.portal.model.BaseModel<?> baseModel) {
448                    _userNotificationEvent.setExpandoBridgeAttributes(baseModel);
449            }
450    
451            @Override
452            public void setExpandoBridgeAttributes(
453                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
454                    _userNotificationEvent.setExpandoBridgeAttributes(expandoBridge);
455            }
456    
457            @Override
458            public void setExpandoBridgeAttributes(
459                    com.liferay.portal.service.ServiceContext serviceContext) {
460                    _userNotificationEvent.setExpandoBridgeAttributes(serviceContext);
461            }
462    
463            /**
464            * Sets the mvcc version of this user notification event.
465            *
466            * @param mvccVersion the mvcc version of this user notification event
467            */
468            @Override
469            public void setMvccVersion(long mvccVersion) {
470                    _userNotificationEvent.setMvccVersion(mvccVersion);
471            }
472    
473            @Override
474            public void setNew(boolean n) {
475                    _userNotificationEvent.setNew(n);
476            }
477    
478            /**
479            * Sets the payload of this user notification event.
480            *
481            * @param payload the payload of this user notification event
482            */
483            @Override
484            public void setPayload(java.lang.String payload) {
485                    _userNotificationEvent.setPayload(payload);
486            }
487    
488            /**
489            * Sets the primary key of this user notification event.
490            *
491            * @param primaryKey the primary key of this user notification event
492            */
493            @Override
494            public void setPrimaryKey(long primaryKey) {
495                    _userNotificationEvent.setPrimaryKey(primaryKey);
496            }
497    
498            @Override
499            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
500                    _userNotificationEvent.setPrimaryKeyObj(primaryKeyObj);
501            }
502    
503            /**
504            * Sets the timestamp of this user notification event.
505            *
506            * @param timestamp the timestamp of this user notification event
507            */
508            @Override
509            public void setTimestamp(long timestamp) {
510                    _userNotificationEvent.setTimestamp(timestamp);
511            }
512    
513            /**
514            * Sets the type of this user notification event.
515            *
516            * @param type the type of this user notification event
517            */
518            @Override
519            public void setType(java.lang.String type) {
520                    _userNotificationEvent.setType(type);
521            }
522    
523            /**
524            * Sets the user ID of this user notification event.
525            *
526            * @param userId the user ID of this user notification event
527            */
528            @Override
529            public void setUserId(long userId) {
530                    _userNotificationEvent.setUserId(userId);
531            }
532    
533            /**
534            * Sets the user notification event ID of this user notification event.
535            *
536            * @param userNotificationEventId the user notification event ID of this user notification event
537            */
538            @Override
539            public void setUserNotificationEventId(long userNotificationEventId) {
540                    _userNotificationEvent.setUserNotificationEventId(userNotificationEventId);
541            }
542    
543            /**
544            * Sets the user uuid of this user notification event.
545            *
546            * @param userUuid the user uuid of this user notification event
547            */
548            @Override
549            public void setUserUuid(java.lang.String userUuid) {
550                    _userNotificationEvent.setUserUuid(userUuid);
551            }
552    
553            /**
554            * Sets the uuid of this user notification event.
555            *
556            * @param uuid the uuid of this user notification event
557            */
558            @Override
559            public void setUuid(java.lang.String uuid) {
560                    _userNotificationEvent.setUuid(uuid);
561            }
562    
563            @Override
564            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.UserNotificationEvent> toCacheModel() {
565                    return _userNotificationEvent.toCacheModel();
566            }
567    
568            @Override
569            public com.liferay.portal.model.UserNotificationEvent toEscapedModel() {
570                    return new UserNotificationEventWrapper(_userNotificationEvent.toEscapedModel());
571            }
572    
573            @Override
574            public java.lang.String toString() {
575                    return _userNotificationEvent.toString();
576            }
577    
578            @Override
579            public com.liferay.portal.model.UserNotificationEvent toUnescapedModel() {
580                    return new UserNotificationEventWrapper(_userNotificationEvent.toUnescapedModel());
581            }
582    
583            @Override
584            public java.lang.String toXmlString() {
585                    return _userNotificationEvent.toXmlString();
586            }
587    
588            @Override
589            public boolean equals(Object obj) {
590                    if (this == obj) {
591                            return true;
592                    }
593    
594                    if (!(obj instanceof UserNotificationEventWrapper)) {
595                            return false;
596                    }
597    
598                    UserNotificationEventWrapper userNotificationEventWrapper = (UserNotificationEventWrapper)obj;
599    
600                    if (Validator.equals(_userNotificationEvent,
601                                            userNotificationEventWrapper._userNotificationEvent)) {
602                            return true;
603                    }
604    
605                    return false;
606            }
607    
608            /**
609             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
610             */
611            @Deprecated
612            public UserNotificationEvent getWrappedUserNotificationEvent() {
613                    return _userNotificationEvent;
614            }
615    
616            @Override
617            public UserNotificationEvent getWrappedModel() {
618                    return _userNotificationEvent;
619            }
620    
621            @Override
622            public boolean isEntityCacheEnabled() {
623                    return _userNotificationEvent.isEntityCacheEnabled();
624            }
625    
626            @Override
627            public boolean isFinderCacheEnabled() {
628                    return _userNotificationEvent.isFinderCacheEnabled();
629            }
630    
631            @Override
632            public void resetOriginalValues() {
633                    _userNotificationEvent.resetOriginalValues();
634            }
635    
636            private final UserNotificationEvent _userNotificationEvent;
637    }