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