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            public Class<?> getModelClass() {
039                    return UserNotificationEvent.class;
040            }
041    
042            public String getModelClassName() {
043                    return UserNotificationEvent.class.getName();
044            }
045    
046            public Map<String, Object> getModelAttributes() {
047                    Map<String, Object> attributes = new HashMap<String, Object>();
048    
049                    attributes.put("uuid", getUuid());
050                    attributes.put("userNotificationEventId", getUserNotificationEventId());
051                    attributes.put("companyId", getCompanyId());
052                    attributes.put("userId", getUserId());
053                    attributes.put("type", getType());
054                    attributes.put("timestamp", getTimestamp());
055                    attributes.put("deliverBy", getDeliverBy());
056                    attributes.put("payload", getPayload());
057                    attributes.put("archived", getArchived());
058    
059                    return attributes;
060            }
061    
062            public void setModelAttributes(Map<String, Object> attributes) {
063                    String uuid = (String)attributes.get("uuid");
064    
065                    if (uuid != null) {
066                            setUuid(uuid);
067                    }
068    
069                    Long userNotificationEventId = (Long)attributes.get(
070                                    "userNotificationEventId");
071    
072                    if (userNotificationEventId != null) {
073                            setUserNotificationEventId(userNotificationEventId);
074                    }
075    
076                    Long companyId = (Long)attributes.get("companyId");
077    
078                    if (companyId != null) {
079                            setCompanyId(companyId);
080                    }
081    
082                    Long userId = (Long)attributes.get("userId");
083    
084                    if (userId != null) {
085                            setUserId(userId);
086                    }
087    
088                    String type = (String)attributes.get("type");
089    
090                    if (type != null) {
091                            setType(type);
092                    }
093    
094                    Long timestamp = (Long)attributes.get("timestamp");
095    
096                    if (timestamp != null) {
097                            setTimestamp(timestamp);
098                    }
099    
100                    Long deliverBy = (Long)attributes.get("deliverBy");
101    
102                    if (deliverBy != null) {
103                            setDeliverBy(deliverBy);
104                    }
105    
106                    String payload = (String)attributes.get("payload");
107    
108                    if (payload != null) {
109                            setPayload(payload);
110                    }
111    
112                    Boolean archived = (Boolean)attributes.get("archived");
113    
114                    if (archived != null) {
115                            setArchived(archived);
116                    }
117            }
118    
119            /**
120            * Returns the primary key of this user notification event.
121            *
122            * @return the primary key of this user notification event
123            */
124            public long getPrimaryKey() {
125                    return _userNotificationEvent.getPrimaryKey();
126            }
127    
128            /**
129            * Sets the primary key of this user notification event.
130            *
131            * @param primaryKey the primary key of this user notification event
132            */
133            public void setPrimaryKey(long primaryKey) {
134                    _userNotificationEvent.setPrimaryKey(primaryKey);
135            }
136    
137            /**
138            * Returns the uuid of this user notification event.
139            *
140            * @return the uuid of this user notification event
141            */
142            public java.lang.String getUuid() {
143                    return _userNotificationEvent.getUuid();
144            }
145    
146            /**
147            * Sets the uuid of this user notification event.
148            *
149            * @param uuid the uuid of this user notification event
150            */
151            public void setUuid(java.lang.String uuid) {
152                    _userNotificationEvent.setUuid(uuid);
153            }
154    
155            /**
156            * Returns the user notification event ID of this user notification event.
157            *
158            * @return the user notification event ID of this user notification event
159            */
160            public long getUserNotificationEventId() {
161                    return _userNotificationEvent.getUserNotificationEventId();
162            }
163    
164            /**
165            * Sets the user notification event ID of this user notification event.
166            *
167            * @param userNotificationEventId the user notification event ID of this user notification event
168            */
169            public void setUserNotificationEventId(long userNotificationEventId) {
170                    _userNotificationEvent.setUserNotificationEventId(userNotificationEventId);
171            }
172    
173            /**
174            * Returns the company ID of this user notification event.
175            *
176            * @return the company ID of this user notification event
177            */
178            public long getCompanyId() {
179                    return _userNotificationEvent.getCompanyId();
180            }
181    
182            /**
183            * Sets the company ID of this user notification event.
184            *
185            * @param companyId the company ID of this user notification event
186            */
187            public void setCompanyId(long companyId) {
188                    _userNotificationEvent.setCompanyId(companyId);
189            }
190    
191            /**
192            * Returns the user ID of this user notification event.
193            *
194            * @return the user ID of this user notification event
195            */
196            public long getUserId() {
197                    return _userNotificationEvent.getUserId();
198            }
199    
200            /**
201            * Sets the user ID of this user notification event.
202            *
203            * @param userId the user ID of this user notification event
204            */
205            public void setUserId(long userId) {
206                    _userNotificationEvent.setUserId(userId);
207            }
208    
209            /**
210            * Returns the user uuid of this user notification event.
211            *
212            * @return the user uuid of this user notification event
213            * @throws SystemException if a system exception occurred
214            */
215            public java.lang.String getUserUuid()
216                    throws com.liferay.portal.kernel.exception.SystemException {
217                    return _userNotificationEvent.getUserUuid();
218            }
219    
220            /**
221            * Sets the user uuid of this user notification event.
222            *
223            * @param userUuid the user uuid of this user notification event
224            */
225            public void setUserUuid(java.lang.String userUuid) {
226                    _userNotificationEvent.setUserUuid(userUuid);
227            }
228    
229            /**
230            * Returns the type of this user notification event.
231            *
232            * @return the type of this user notification event
233            */
234            public java.lang.String getType() {
235                    return _userNotificationEvent.getType();
236            }
237    
238            /**
239            * Sets the type of this user notification event.
240            *
241            * @param type the type of this user notification event
242            */
243            public void setType(java.lang.String type) {
244                    _userNotificationEvent.setType(type);
245            }
246    
247            /**
248            * Returns the timestamp of this user notification event.
249            *
250            * @return the timestamp of this user notification event
251            */
252            public long getTimestamp() {
253                    return _userNotificationEvent.getTimestamp();
254            }
255    
256            /**
257            * Sets the timestamp of this user notification event.
258            *
259            * @param timestamp the timestamp of this user notification event
260            */
261            public void setTimestamp(long timestamp) {
262                    _userNotificationEvent.setTimestamp(timestamp);
263            }
264    
265            /**
266            * Returns the deliver by of this user notification event.
267            *
268            * @return the deliver by of this user notification event
269            */
270            public long getDeliverBy() {
271                    return _userNotificationEvent.getDeliverBy();
272            }
273    
274            /**
275            * Sets the deliver by of this user notification event.
276            *
277            * @param deliverBy the deliver by of this user notification event
278            */
279            public void setDeliverBy(long deliverBy) {
280                    _userNotificationEvent.setDeliverBy(deliverBy);
281            }
282    
283            /**
284            * Returns the payload of this user notification event.
285            *
286            * @return the payload of this user notification event
287            */
288            public java.lang.String getPayload() {
289                    return _userNotificationEvent.getPayload();
290            }
291    
292            /**
293            * Sets the payload of this user notification event.
294            *
295            * @param payload the payload of this user notification event
296            */
297            public void setPayload(java.lang.String payload) {
298                    _userNotificationEvent.setPayload(payload);
299            }
300    
301            /**
302            * Returns the archived of this user notification event.
303            *
304            * @return the archived of this user notification event
305            */
306            public boolean getArchived() {
307                    return _userNotificationEvent.getArchived();
308            }
309    
310            /**
311            * Returns <code>true</code> if this user notification event is archived.
312            *
313            * @return <code>true</code> if this user notification event is archived; <code>false</code> otherwise
314            */
315            public boolean isArchived() {
316                    return _userNotificationEvent.isArchived();
317            }
318    
319            /**
320            * Sets whether this user notification event is archived.
321            *
322            * @param archived the archived of this user notification event
323            */
324            public void setArchived(boolean archived) {
325                    _userNotificationEvent.setArchived(archived);
326            }
327    
328            public boolean isNew() {
329                    return _userNotificationEvent.isNew();
330            }
331    
332            public void setNew(boolean n) {
333                    _userNotificationEvent.setNew(n);
334            }
335    
336            public boolean isCachedModel() {
337                    return _userNotificationEvent.isCachedModel();
338            }
339    
340            public void setCachedModel(boolean cachedModel) {
341                    _userNotificationEvent.setCachedModel(cachedModel);
342            }
343    
344            public boolean isEscapedModel() {
345                    return _userNotificationEvent.isEscapedModel();
346            }
347    
348            public java.io.Serializable getPrimaryKeyObj() {
349                    return _userNotificationEvent.getPrimaryKeyObj();
350            }
351    
352            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
353                    _userNotificationEvent.setPrimaryKeyObj(primaryKeyObj);
354            }
355    
356            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
357                    return _userNotificationEvent.getExpandoBridge();
358            }
359    
360            public void setExpandoBridgeAttributes(
361                    com.liferay.portal.service.ServiceContext serviceContext) {
362                    _userNotificationEvent.setExpandoBridgeAttributes(serviceContext);
363            }
364    
365            @Override
366            public java.lang.Object clone() {
367                    return new UserNotificationEventWrapper((UserNotificationEvent)_userNotificationEvent.clone());
368            }
369    
370            public int compareTo(
371                    com.liferay.portal.model.UserNotificationEvent userNotificationEvent) {
372                    return _userNotificationEvent.compareTo(userNotificationEvent);
373            }
374    
375            @Override
376            public int hashCode() {
377                    return _userNotificationEvent.hashCode();
378            }
379    
380            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.UserNotificationEvent> toCacheModel() {
381                    return _userNotificationEvent.toCacheModel();
382            }
383    
384            public com.liferay.portal.model.UserNotificationEvent toEscapedModel() {
385                    return new UserNotificationEventWrapper(_userNotificationEvent.toEscapedModel());
386            }
387    
388            public com.liferay.portal.model.UserNotificationEvent toUnescapedModel() {
389                    return new UserNotificationEventWrapper(_userNotificationEvent.toUnescapedModel());
390            }
391    
392            @Override
393            public java.lang.String toString() {
394                    return _userNotificationEvent.toString();
395            }
396    
397            public java.lang.String toXmlString() {
398                    return _userNotificationEvent.toXmlString();
399            }
400    
401            public void persist()
402                    throws com.liferay.portal.kernel.exception.SystemException {
403                    _userNotificationEvent.persist();
404            }
405    
406            @Override
407            public boolean equals(Object obj) {
408                    if (this == obj) {
409                            return true;
410                    }
411    
412                    if (!(obj instanceof UserNotificationEventWrapper)) {
413                            return false;
414                    }
415    
416                    UserNotificationEventWrapper userNotificationEventWrapper = (UserNotificationEventWrapper)obj;
417    
418                    if (Validator.equals(_userNotificationEvent,
419                                            userNotificationEventWrapper._userNotificationEvent)) {
420                            return true;
421                    }
422    
423                    return false;
424            }
425    
426            /**
427             * @deprecated Renamed to {@link #getWrappedModel}
428             */
429            public UserNotificationEvent getWrappedUserNotificationEvent() {
430                    return _userNotificationEvent;
431            }
432    
433            public UserNotificationEvent getWrappedModel() {
434                    return _userNotificationEvent;
435            }
436    
437            public void resetOriginalValues() {
438                    _userNotificationEvent.resetOriginalValues();
439            }
440    
441            private UserNotificationEvent _userNotificationEvent;
442    }