001    /**
002     * Copyright (c) 2000-2013 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("uuid", getUuid());
056                    attributes.put("userNotificationEventId", getUserNotificationEventId());
057                    attributes.put("companyId", getCompanyId());
058                    attributes.put("userId", getUserId());
059                    attributes.put("type", getType());
060                    attributes.put("timestamp", getTimestamp());
061                    attributes.put("deliverBy", getDeliverBy());
062                    attributes.put("delivered", getDelivered());
063                    attributes.put("payload", getPayload());
064                    attributes.put("archived", getArchived());
065    
066                    return attributes;
067            }
068    
069            @Override
070            public void setModelAttributes(Map<String, Object> attributes) {
071                    String uuid = (String)attributes.get("uuid");
072    
073                    if (uuid != null) {
074                            setUuid(uuid);
075                    }
076    
077                    Long userNotificationEventId = (Long)attributes.get(
078                                    "userNotificationEventId");
079    
080                    if (userNotificationEventId != null) {
081                            setUserNotificationEventId(userNotificationEventId);
082                    }
083    
084                    Long companyId = (Long)attributes.get("companyId");
085    
086                    if (companyId != null) {
087                            setCompanyId(companyId);
088                    }
089    
090                    Long userId = (Long)attributes.get("userId");
091    
092                    if (userId != null) {
093                            setUserId(userId);
094                    }
095    
096                    String type = (String)attributes.get("type");
097    
098                    if (type != null) {
099                            setType(type);
100                    }
101    
102                    Long timestamp = (Long)attributes.get("timestamp");
103    
104                    if (timestamp != null) {
105                            setTimestamp(timestamp);
106                    }
107    
108                    Long deliverBy = (Long)attributes.get("deliverBy");
109    
110                    if (deliverBy != null) {
111                            setDeliverBy(deliverBy);
112                    }
113    
114                    Boolean delivered = (Boolean)attributes.get("delivered");
115    
116                    if (delivered != null) {
117                            setDelivered(delivered);
118                    }
119    
120                    String payload = (String)attributes.get("payload");
121    
122                    if (payload != null) {
123                            setPayload(payload);
124                    }
125    
126                    Boolean archived = (Boolean)attributes.get("archived");
127    
128                    if (archived != null) {
129                            setArchived(archived);
130                    }
131            }
132    
133            /**
134            * Returns the primary key of this user notification event.
135            *
136            * @return the primary key of this user notification event
137            */
138            @Override
139            public long getPrimaryKey() {
140                    return _userNotificationEvent.getPrimaryKey();
141            }
142    
143            /**
144            * Sets the primary key of this user notification event.
145            *
146            * @param primaryKey the primary key of this user notification event
147            */
148            @Override
149            public void setPrimaryKey(long primaryKey) {
150                    _userNotificationEvent.setPrimaryKey(primaryKey);
151            }
152    
153            /**
154            * Returns the uuid of this user notification event.
155            *
156            * @return the uuid of this user notification event
157            */
158            @Override
159            public java.lang.String getUuid() {
160                    return _userNotificationEvent.getUuid();
161            }
162    
163            /**
164            * Sets the uuid of this user notification event.
165            *
166            * @param uuid the uuid of this user notification event
167            */
168            @Override
169            public void setUuid(java.lang.String uuid) {
170                    _userNotificationEvent.setUuid(uuid);
171            }
172    
173            /**
174            * Returns the user notification event ID of this user notification event.
175            *
176            * @return the user notification event ID of this user notification event
177            */
178            @Override
179            public long getUserNotificationEventId() {
180                    return _userNotificationEvent.getUserNotificationEventId();
181            }
182    
183            /**
184            * Sets the user notification event ID of this user notification event.
185            *
186            * @param userNotificationEventId the user notification event ID of this user notification event
187            */
188            @Override
189            public void setUserNotificationEventId(long userNotificationEventId) {
190                    _userNotificationEvent.setUserNotificationEventId(userNotificationEventId);
191            }
192    
193            /**
194            * Returns the company ID of this user notification event.
195            *
196            * @return the company ID of this user notification event
197            */
198            @Override
199            public long getCompanyId() {
200                    return _userNotificationEvent.getCompanyId();
201            }
202    
203            /**
204            * Sets the company ID of this user notification event.
205            *
206            * @param companyId the company ID of this user notification event
207            */
208            @Override
209            public void setCompanyId(long companyId) {
210                    _userNotificationEvent.setCompanyId(companyId);
211            }
212    
213            /**
214            * Returns the user ID of this user notification event.
215            *
216            * @return the user ID of this user notification event
217            */
218            @Override
219            public long getUserId() {
220                    return _userNotificationEvent.getUserId();
221            }
222    
223            /**
224            * Sets the user ID of this user notification event.
225            *
226            * @param userId the user ID of this user notification event
227            */
228            @Override
229            public void setUserId(long userId) {
230                    _userNotificationEvent.setUserId(userId);
231            }
232    
233            /**
234            * Returns the user uuid of this user notification event.
235            *
236            * @return the user uuid of this user notification event
237            * @throws SystemException if a system exception occurred
238            */
239            @Override
240            public java.lang.String getUserUuid()
241                    throws com.liferay.portal.kernel.exception.SystemException {
242                    return _userNotificationEvent.getUserUuid();
243            }
244    
245            /**
246            * Sets the user uuid of this user notification event.
247            *
248            * @param userUuid the user uuid of this user notification event
249            */
250            @Override
251            public void setUserUuid(java.lang.String userUuid) {
252                    _userNotificationEvent.setUserUuid(userUuid);
253            }
254    
255            /**
256            * Returns the type of this user notification event.
257            *
258            * @return the type of this user notification event
259            */
260            @Override
261            public java.lang.String getType() {
262                    return _userNotificationEvent.getType();
263            }
264    
265            /**
266            * Sets the type of this user notification event.
267            *
268            * @param type the type of this user notification event
269            */
270            @Override
271            public void setType(java.lang.String type) {
272                    _userNotificationEvent.setType(type);
273            }
274    
275            /**
276            * Returns the timestamp of this user notification event.
277            *
278            * @return the timestamp of this user notification event
279            */
280            @Override
281            public long getTimestamp() {
282                    return _userNotificationEvent.getTimestamp();
283            }
284    
285            /**
286            * Sets the timestamp of this user notification event.
287            *
288            * @param timestamp the timestamp of this user notification event
289            */
290            @Override
291            public void setTimestamp(long timestamp) {
292                    _userNotificationEvent.setTimestamp(timestamp);
293            }
294    
295            /**
296            * Returns the deliver by of this user notification event.
297            *
298            * @return the deliver by of this user notification event
299            */
300            @Override
301            public long getDeliverBy() {
302                    return _userNotificationEvent.getDeliverBy();
303            }
304    
305            /**
306            * Sets the deliver by of this user notification event.
307            *
308            * @param deliverBy the deliver by of this user notification event
309            */
310            @Override
311            public void setDeliverBy(long deliverBy) {
312                    _userNotificationEvent.setDeliverBy(deliverBy);
313            }
314    
315            /**
316            * Returns the delivered of this user notification event.
317            *
318            * @return the delivered of this user notification event
319            */
320            @Override
321            public boolean getDelivered() {
322                    return _userNotificationEvent.getDelivered();
323            }
324    
325            /**
326            * Returns <code>true</code> if this user notification event is delivered.
327            *
328            * @return <code>true</code> if this user notification event is delivered; <code>false</code> otherwise
329            */
330            @Override
331            public boolean isDelivered() {
332                    return _userNotificationEvent.isDelivered();
333            }
334    
335            /**
336            * Sets whether this user notification event is delivered.
337            *
338            * @param delivered the delivered of this user notification event
339            */
340            @Override
341            public void setDelivered(boolean delivered) {
342                    _userNotificationEvent.setDelivered(delivered);
343            }
344    
345            /**
346            * Returns the payload of this user notification event.
347            *
348            * @return the payload of this user notification event
349            */
350            @Override
351            public java.lang.String getPayload() {
352                    return _userNotificationEvent.getPayload();
353            }
354    
355            /**
356            * Sets the payload of this user notification event.
357            *
358            * @param payload the payload of this user notification event
359            */
360            @Override
361            public void setPayload(java.lang.String payload) {
362                    _userNotificationEvent.setPayload(payload);
363            }
364    
365            /**
366            * Returns the archived of this user notification event.
367            *
368            * @return the archived of this user notification event
369            */
370            @Override
371            public boolean getArchived() {
372                    return _userNotificationEvent.getArchived();
373            }
374    
375            /**
376            * Returns <code>true</code> if this user notification event is archived.
377            *
378            * @return <code>true</code> if this user notification event is archived; <code>false</code> otherwise
379            */
380            @Override
381            public boolean isArchived() {
382                    return _userNotificationEvent.isArchived();
383            }
384    
385            /**
386            * Sets whether this user notification event is archived.
387            *
388            * @param archived the archived of this user notification event
389            */
390            @Override
391            public void setArchived(boolean archived) {
392                    _userNotificationEvent.setArchived(archived);
393            }
394    
395            @Override
396            public boolean isNew() {
397                    return _userNotificationEvent.isNew();
398            }
399    
400            @Override
401            public void setNew(boolean n) {
402                    _userNotificationEvent.setNew(n);
403            }
404    
405            @Override
406            public boolean isCachedModel() {
407                    return _userNotificationEvent.isCachedModel();
408            }
409    
410            @Override
411            public void setCachedModel(boolean cachedModel) {
412                    _userNotificationEvent.setCachedModel(cachedModel);
413            }
414    
415            @Override
416            public boolean isEscapedModel() {
417                    return _userNotificationEvent.isEscapedModel();
418            }
419    
420            @Override
421            public java.io.Serializable getPrimaryKeyObj() {
422                    return _userNotificationEvent.getPrimaryKeyObj();
423            }
424    
425            @Override
426            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
427                    _userNotificationEvent.setPrimaryKeyObj(primaryKeyObj);
428            }
429    
430            @Override
431            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
432                    return _userNotificationEvent.getExpandoBridge();
433            }
434    
435            @Override
436            public void setExpandoBridgeAttributes(
437                    com.liferay.portal.model.BaseModel<?> baseModel) {
438                    _userNotificationEvent.setExpandoBridgeAttributes(baseModel);
439            }
440    
441            @Override
442            public void setExpandoBridgeAttributes(
443                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
444                    _userNotificationEvent.setExpandoBridgeAttributes(expandoBridge);
445            }
446    
447            @Override
448            public void setExpandoBridgeAttributes(
449                    com.liferay.portal.service.ServiceContext serviceContext) {
450                    _userNotificationEvent.setExpandoBridgeAttributes(serviceContext);
451            }
452    
453            @Override
454            public java.lang.Object clone() {
455                    return new UserNotificationEventWrapper((UserNotificationEvent)_userNotificationEvent.clone());
456            }
457    
458            @Override
459            public int compareTo(
460                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent) {
461                    return _userNotificationEvent.compareTo(userNotificationEvent);
462            }
463    
464            @Override
465            public int hashCode() {
466                    return _userNotificationEvent.hashCode();
467            }
468    
469            @Override
470            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.UserNotificationEvent> toCacheModel() {
471                    return _userNotificationEvent.toCacheModel();
472            }
473    
474            @Override
475            public com.liferay.portal.model.UserNotificationEvent toEscapedModel() {
476                    return new UserNotificationEventWrapper(_userNotificationEvent.toEscapedModel());
477            }
478    
479            @Override
480            public com.liferay.portal.model.UserNotificationEvent toUnescapedModel() {
481                    return new UserNotificationEventWrapper(_userNotificationEvent.toUnescapedModel());
482            }
483    
484            @Override
485            public java.lang.String toString() {
486                    return _userNotificationEvent.toString();
487            }
488    
489            @Override
490            public java.lang.String toXmlString() {
491                    return _userNotificationEvent.toXmlString();
492            }
493    
494            @Override
495            public void persist()
496                    throws com.liferay.portal.kernel.exception.SystemException {
497                    _userNotificationEvent.persist();
498            }
499    
500            @Override
501            public boolean equals(Object obj) {
502                    if (this == obj) {
503                            return true;
504                    }
505    
506                    if (!(obj instanceof UserNotificationEventWrapper)) {
507                            return false;
508                    }
509    
510                    UserNotificationEventWrapper userNotificationEventWrapper = (UserNotificationEventWrapper)obj;
511    
512                    if (Validator.equals(_userNotificationEvent,
513                                            userNotificationEventWrapper._userNotificationEvent)) {
514                            return true;
515                    }
516    
517                    return false;
518            }
519    
520            /**
521             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
522             */
523            public UserNotificationEvent getWrappedUserNotificationEvent() {
524                    return _userNotificationEvent;
525            }
526    
527            @Override
528            public UserNotificationEvent getWrappedModel() {
529                    return _userNotificationEvent;
530            }
531    
532            @Override
533            public void resetOriginalValues() {
534                    _userNotificationEvent.resetOriginalValues();
535            }
536    
537            private UserNotificationEvent _userNotificationEvent;
538    }