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