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.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    import com.liferay.portal.kernel.util.Validator;
023    
024    import java.io.Serializable;
025    
026    import java.util.HashMap;
027    import java.util.Map;
028    
029    /**
030     * <p>
031     * This class is a wrapper for {@link UserNotificationEvent}.
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see UserNotificationEvent
036     * @generated
037     */
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 java.lang.Object clone() {
161                    return new UserNotificationEventWrapper((UserNotificationEvent)_userNotificationEvent.clone());
162            }
163    
164            @Override
165            public int compareTo(
166                    com.liferay.portal.kernel.model.UserNotificationEvent userNotificationEvent) {
167                    return _userNotificationEvent.compareTo(userNotificationEvent);
168            }
169    
170            /**
171            * Returns the action required of this user notification event.
172            *
173            * @return the action required of this user notification event
174            */
175            @Override
176            public boolean getActionRequired() {
177                    return _userNotificationEvent.getActionRequired();
178            }
179    
180            /**
181            * Returns the archived of this user notification event.
182            *
183            * @return the archived of this user notification event
184            */
185            @Override
186            public boolean getArchived() {
187                    return _userNotificationEvent.getArchived();
188            }
189    
190            /**
191            * Returns the company ID of this user notification event.
192            *
193            * @return the company ID of this user notification event
194            */
195            @Override
196            public long getCompanyId() {
197                    return _userNotificationEvent.getCompanyId();
198            }
199    
200            /**
201            * Returns the deliver by of this user notification event.
202            *
203            * @return the deliver by of this user notification event
204            */
205            @Override
206            public long getDeliverBy() {
207                    return _userNotificationEvent.getDeliverBy();
208            }
209    
210            /**
211            * Returns the delivered of this user notification event.
212            *
213            * @return the delivered of this user notification event
214            */
215            @Override
216            public boolean getDelivered() {
217                    return _userNotificationEvent.getDelivered();
218            }
219    
220            /**
221            * Returns the delivery type of this user notification event.
222            *
223            * @return the delivery type of this user notification event
224            */
225            @Override
226            public int getDeliveryType() {
227                    return _userNotificationEvent.getDeliveryType();
228            }
229    
230            @Override
231            public ExpandoBridge getExpandoBridge() {
232                    return _userNotificationEvent.getExpandoBridge();
233            }
234    
235            /**
236            * Returns the mvcc version of this user notification event.
237            *
238            * @return the mvcc version of this user notification event
239            */
240            @Override
241            public long getMvccVersion() {
242                    return _userNotificationEvent.getMvccVersion();
243            }
244    
245            /**
246            * Returns the payload of this user notification event.
247            *
248            * @return the payload of this user notification event
249            */
250            @Override
251            public java.lang.String getPayload() {
252                    return _userNotificationEvent.getPayload();
253            }
254    
255            /**
256            * Returns the primary key of this user notification event.
257            *
258            * @return the primary key of this user notification event
259            */
260            @Override
261            public long getPrimaryKey() {
262                    return _userNotificationEvent.getPrimaryKey();
263            }
264    
265            @Override
266            public Serializable getPrimaryKeyObj() {
267                    return _userNotificationEvent.getPrimaryKeyObj();
268            }
269    
270            /**
271            * Returns the timestamp of this user notification event.
272            *
273            * @return the timestamp of this user notification event
274            */
275            @Override
276            public long getTimestamp() {
277                    return _userNotificationEvent.getTimestamp();
278            }
279    
280            /**
281            * Returns the type of this user notification event.
282            *
283            * @return the type of this user notification event
284            */
285            @Override
286            public java.lang.String getType() {
287                    return _userNotificationEvent.getType();
288            }
289    
290            /**
291            * Returns the user ID of this user notification event.
292            *
293            * @return the user ID of this user notification event
294            */
295            @Override
296            public long getUserId() {
297                    return _userNotificationEvent.getUserId();
298            }
299    
300            /**
301            * Returns the user notification event ID of this user notification event.
302            *
303            * @return the user notification event ID of this user notification event
304            */
305            @Override
306            public long getUserNotificationEventId() {
307                    return _userNotificationEvent.getUserNotificationEventId();
308            }
309    
310            /**
311            * Returns the user uuid of this user notification event.
312            *
313            * @return the user uuid of this user notification event
314            */
315            @Override
316            public java.lang.String getUserUuid() {
317                    return _userNotificationEvent.getUserUuid();
318            }
319    
320            /**
321            * Returns the uuid of this user notification event.
322            *
323            * @return the uuid of this user notification event
324            */
325            @Override
326            public java.lang.String getUuid() {
327                    return _userNotificationEvent.getUuid();
328            }
329    
330            @Override
331            public int hashCode() {
332                    return _userNotificationEvent.hashCode();
333            }
334    
335            /**
336            * Returns <code>true</code> if this user notification event is action required.
337            *
338            * @return <code>true</code> if this user notification event is action required; <code>false</code> otherwise
339            */
340            @Override
341            public boolean isActionRequired() {
342                    return _userNotificationEvent.isActionRequired();
343            }
344    
345            /**
346            * Returns <code>true</code> if this user notification event is archived.
347            *
348            * @return <code>true</code> if this user notification event is archived; <code>false</code> otherwise
349            */
350            @Override
351            public boolean isArchived() {
352                    return _userNotificationEvent.isArchived();
353            }
354    
355            @Override
356            public boolean isCachedModel() {
357                    return _userNotificationEvent.isCachedModel();
358            }
359    
360            /**
361            * Returns <code>true</code> if this user notification event is delivered.
362            *
363            * @return <code>true</code> if this user notification event is delivered; <code>false</code> otherwise
364            */
365            @Override
366            public boolean isDelivered() {
367                    return _userNotificationEvent.isDelivered();
368            }
369    
370            @Override
371            public boolean isEscapedModel() {
372                    return _userNotificationEvent.isEscapedModel();
373            }
374    
375            @Override
376            public boolean isNew() {
377                    return _userNotificationEvent.isNew();
378            }
379    
380            @Override
381            public void persist() {
382                    _userNotificationEvent.persist();
383            }
384    
385            /**
386            * Sets whether this user notification event is action required.
387            *
388            * @param actionRequired the action required of this user notification event
389            */
390            @Override
391            public void setActionRequired(boolean actionRequired) {
392                    _userNotificationEvent.setActionRequired(actionRequired);
393            }
394    
395            /**
396            * Sets whether this user notification event is archived.
397            *
398            * @param archived the archived of this user notification event
399            */
400            @Override
401            public void setArchived(boolean archived) {
402                    _userNotificationEvent.setArchived(archived);
403            }
404    
405            @Override
406            public void setCachedModel(boolean cachedModel) {
407                    _userNotificationEvent.setCachedModel(cachedModel);
408            }
409    
410            /**
411            * Sets the company ID of this user notification event.
412            *
413            * @param companyId the company ID of this user notification event
414            */
415            @Override
416            public void setCompanyId(long companyId) {
417                    _userNotificationEvent.setCompanyId(companyId);
418            }
419    
420            /**
421            * Sets the deliver by of this user notification event.
422            *
423            * @param deliverBy the deliver by of this user notification event
424            */
425            @Override
426            public void setDeliverBy(long deliverBy) {
427                    _userNotificationEvent.setDeliverBy(deliverBy);
428            }
429    
430            /**
431            * Sets whether this user notification event is delivered.
432            *
433            * @param delivered the delivered of this user notification event
434            */
435            @Override
436            public void setDelivered(boolean delivered) {
437                    _userNotificationEvent.setDelivered(delivered);
438            }
439    
440            /**
441            * Sets the delivery type of this user notification event.
442            *
443            * @param deliveryType the delivery type of this user notification event
444            */
445            @Override
446            public void setDeliveryType(int deliveryType) {
447                    _userNotificationEvent.setDeliveryType(deliveryType);
448            }
449    
450            @Override
451            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
452                    _userNotificationEvent.setExpandoBridgeAttributes(baseModel);
453            }
454    
455            @Override
456            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
457                    _userNotificationEvent.setExpandoBridgeAttributes(expandoBridge);
458            }
459    
460            @Override
461            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
462                    _userNotificationEvent.setExpandoBridgeAttributes(serviceContext);
463            }
464    
465            /**
466            * Sets the mvcc version of this user notification event.
467            *
468            * @param mvccVersion the mvcc version of this user notification event
469            */
470            @Override
471            public void setMvccVersion(long mvccVersion) {
472                    _userNotificationEvent.setMvccVersion(mvccVersion);
473            }
474    
475            @Override
476            public void setNew(boolean n) {
477                    _userNotificationEvent.setNew(n);
478            }
479    
480            /**
481            * Sets the payload of this user notification event.
482            *
483            * @param payload the payload of this user notification event
484            */
485            @Override
486            public void setPayload(java.lang.String payload) {
487                    _userNotificationEvent.setPayload(payload);
488            }
489    
490            /**
491            * Sets the primary key of this user notification event.
492            *
493            * @param primaryKey the primary key of this user notification event
494            */
495            @Override
496            public void setPrimaryKey(long primaryKey) {
497                    _userNotificationEvent.setPrimaryKey(primaryKey);
498            }
499    
500            @Override
501            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
502                    _userNotificationEvent.setPrimaryKeyObj(primaryKeyObj);
503            }
504    
505            /**
506            * Sets the timestamp of this user notification event.
507            *
508            * @param timestamp the timestamp of this user notification event
509            */
510            @Override
511            public void setTimestamp(long timestamp) {
512                    _userNotificationEvent.setTimestamp(timestamp);
513            }
514    
515            /**
516            * Sets the type of this user notification event.
517            *
518            * @param type the type of this user notification event
519            */
520            @Override
521            public void setType(java.lang.String type) {
522                    _userNotificationEvent.setType(type);
523            }
524    
525            /**
526            * Sets the user ID of this user notification event.
527            *
528            * @param userId the user ID of this user notification event
529            */
530            @Override
531            public void setUserId(long userId) {
532                    _userNotificationEvent.setUserId(userId);
533            }
534    
535            /**
536            * Sets the user notification event ID of this user notification event.
537            *
538            * @param userNotificationEventId the user notification event ID of this user notification event
539            */
540            @Override
541            public void setUserNotificationEventId(long userNotificationEventId) {
542                    _userNotificationEvent.setUserNotificationEventId(userNotificationEventId);
543            }
544    
545            /**
546            * Sets the user uuid of this user notification event.
547            *
548            * @param userUuid the user uuid of this user notification event
549            */
550            @Override
551            public void setUserUuid(java.lang.String userUuid) {
552                    _userNotificationEvent.setUserUuid(userUuid);
553            }
554    
555            /**
556            * Sets the uuid of this user notification event.
557            *
558            * @param uuid the uuid of this user notification event
559            */
560            @Override
561            public void setUuid(java.lang.String uuid) {
562                    _userNotificationEvent.setUuid(uuid);
563            }
564    
565            @Override
566            public CacheModel<com.liferay.portal.kernel.model.UserNotificationEvent> toCacheModel() {
567                    return _userNotificationEvent.toCacheModel();
568            }
569    
570            @Override
571            public com.liferay.portal.kernel.model.UserNotificationEvent toEscapedModel() {
572                    return new UserNotificationEventWrapper(_userNotificationEvent.toEscapedModel());
573            }
574    
575            @Override
576            public java.lang.String toString() {
577                    return _userNotificationEvent.toString();
578            }
579    
580            @Override
581            public com.liferay.portal.kernel.model.UserNotificationEvent toUnescapedModel() {
582                    return new UserNotificationEventWrapper(_userNotificationEvent.toUnescapedModel());
583            }
584    
585            @Override
586            public java.lang.String toXmlString() {
587                    return _userNotificationEvent.toXmlString();
588            }
589    
590            @Override
591            public boolean equals(Object obj) {
592                    if (this == obj) {
593                            return true;
594                    }
595    
596                    if (!(obj instanceof UserNotificationEventWrapper)) {
597                            return false;
598                    }
599    
600                    UserNotificationEventWrapper userNotificationEventWrapper = (UserNotificationEventWrapper)obj;
601    
602                    if (Validator.equals(_userNotificationEvent,
603                                            userNotificationEventWrapper._userNotificationEvent)) {
604                            return true;
605                    }
606    
607                    return false;
608            }
609    
610            @Override
611            public UserNotificationEvent getWrappedModel() {
612                    return _userNotificationEvent;
613            }
614    
615            @Override
616            public boolean isEntityCacheEnabled() {
617                    return _userNotificationEvent.isEntityCacheEnabled();
618            }
619    
620            @Override
621            public boolean isFinderCacheEnabled() {
622                    return _userNotificationEvent.isFinderCacheEnabled();
623            }
624    
625            @Override
626            public void resetOriginalValues() {
627                    _userNotificationEvent.resetOriginalValues();
628            }
629    
630            private final UserNotificationEvent _userNotificationEvent;
631    }