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 UserNotificationDelivery}.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see UserNotificationDelivery
029     * @generated
030     */
031    public class UserNotificationDeliveryWrapper implements UserNotificationDelivery,
032            ModelWrapper<UserNotificationDelivery> {
033            public UserNotificationDeliveryWrapper(
034                    UserNotificationDelivery userNotificationDelivery) {
035                    _userNotificationDelivery = userNotificationDelivery;
036            }
037    
038            @Override
039            public Class<?> getModelClass() {
040                    return UserNotificationDelivery.class;
041            }
042    
043            @Override
044            public String getModelClassName() {
045                    return UserNotificationDelivery.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("userNotificationDeliveryId",
053                            getUserNotificationDeliveryId());
054                    attributes.put("companyId", getCompanyId());
055                    attributes.put("userId", getUserId());
056                    attributes.put("portletId", getPortletId());
057                    attributes.put("classNameId", getClassNameId());
058                    attributes.put("notificationType", getNotificationType());
059                    attributes.put("deliveryType", getDeliveryType());
060                    attributes.put("deliver", getDeliver());
061    
062                    return attributes;
063            }
064    
065            @Override
066            public void setModelAttributes(Map<String, Object> attributes) {
067                    Long userNotificationDeliveryId = (Long)attributes.get(
068                                    "userNotificationDeliveryId");
069    
070                    if (userNotificationDeliveryId != null) {
071                            setUserNotificationDeliveryId(userNotificationDeliveryId);
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 portletId = (String)attributes.get("portletId");
087    
088                    if (portletId != null) {
089                            setPortletId(portletId);
090                    }
091    
092                    Long classNameId = (Long)attributes.get("classNameId");
093    
094                    if (classNameId != null) {
095                            setClassNameId(classNameId);
096                    }
097    
098                    Integer notificationType = (Integer)attributes.get("notificationType");
099    
100                    if (notificationType != null) {
101                            setNotificationType(notificationType);
102                    }
103    
104                    Integer deliveryType = (Integer)attributes.get("deliveryType");
105    
106                    if (deliveryType != null) {
107                            setDeliveryType(deliveryType);
108                    }
109    
110                    Boolean deliver = (Boolean)attributes.get("deliver");
111    
112                    if (deliver != null) {
113                            setDeliver(deliver);
114                    }
115            }
116    
117            /**
118            * Returns the primary key of this user notification delivery.
119            *
120            * @return the primary key of this user notification delivery
121            */
122            @Override
123            public long getPrimaryKey() {
124                    return _userNotificationDelivery.getPrimaryKey();
125            }
126    
127            /**
128            * Sets the primary key of this user notification delivery.
129            *
130            * @param primaryKey the primary key of this user notification delivery
131            */
132            @Override
133            public void setPrimaryKey(long primaryKey) {
134                    _userNotificationDelivery.setPrimaryKey(primaryKey);
135            }
136    
137            /**
138            * Returns the user notification delivery ID of this user notification delivery.
139            *
140            * @return the user notification delivery ID of this user notification delivery
141            */
142            @Override
143            public long getUserNotificationDeliveryId() {
144                    return _userNotificationDelivery.getUserNotificationDeliveryId();
145            }
146    
147            /**
148            * Sets the user notification delivery ID of this user notification delivery.
149            *
150            * @param userNotificationDeliveryId the user notification delivery ID of this user notification delivery
151            */
152            @Override
153            public void setUserNotificationDeliveryId(long userNotificationDeliveryId) {
154                    _userNotificationDelivery.setUserNotificationDeliveryId(userNotificationDeliveryId);
155            }
156    
157            /**
158            * Returns the company ID of this user notification delivery.
159            *
160            * @return the company ID of this user notification delivery
161            */
162            @Override
163            public long getCompanyId() {
164                    return _userNotificationDelivery.getCompanyId();
165            }
166    
167            /**
168            * Sets the company ID of this user notification delivery.
169            *
170            * @param companyId the company ID of this user notification delivery
171            */
172            @Override
173            public void setCompanyId(long companyId) {
174                    _userNotificationDelivery.setCompanyId(companyId);
175            }
176    
177            /**
178            * Returns the user ID of this user notification delivery.
179            *
180            * @return the user ID of this user notification delivery
181            */
182            @Override
183            public long getUserId() {
184                    return _userNotificationDelivery.getUserId();
185            }
186    
187            /**
188            * Sets the user ID of this user notification delivery.
189            *
190            * @param userId the user ID of this user notification delivery
191            */
192            @Override
193            public void setUserId(long userId) {
194                    _userNotificationDelivery.setUserId(userId);
195            }
196    
197            /**
198            * Returns the user uuid of this user notification delivery.
199            *
200            * @return the user uuid of this user notification delivery
201            * @throws SystemException if a system exception occurred
202            */
203            @Override
204            public java.lang.String getUserUuid()
205                    throws com.liferay.portal.kernel.exception.SystemException {
206                    return _userNotificationDelivery.getUserUuid();
207            }
208    
209            /**
210            * Sets the user uuid of this user notification delivery.
211            *
212            * @param userUuid the user uuid of this user notification delivery
213            */
214            @Override
215            public void setUserUuid(java.lang.String userUuid) {
216                    _userNotificationDelivery.setUserUuid(userUuid);
217            }
218    
219            /**
220            * Returns the portlet ID of this user notification delivery.
221            *
222            * @return the portlet ID of this user notification delivery
223            */
224            @Override
225            public java.lang.String getPortletId() {
226                    return _userNotificationDelivery.getPortletId();
227            }
228    
229            /**
230            * Sets the portlet ID of this user notification delivery.
231            *
232            * @param portletId the portlet ID of this user notification delivery
233            */
234            @Override
235            public void setPortletId(java.lang.String portletId) {
236                    _userNotificationDelivery.setPortletId(portletId);
237            }
238    
239            /**
240            * Returns the fully qualified class name of this user notification delivery.
241            *
242            * @return the fully qualified class name of this user notification delivery
243            */
244            @Override
245            public java.lang.String getClassName() {
246                    return _userNotificationDelivery.getClassName();
247            }
248    
249            @Override
250            public void setClassName(java.lang.String className) {
251                    _userNotificationDelivery.setClassName(className);
252            }
253    
254            /**
255            * Returns the class name ID of this user notification delivery.
256            *
257            * @return the class name ID of this user notification delivery
258            */
259            @Override
260            public long getClassNameId() {
261                    return _userNotificationDelivery.getClassNameId();
262            }
263    
264            /**
265            * Sets the class name ID of this user notification delivery.
266            *
267            * @param classNameId the class name ID of this user notification delivery
268            */
269            @Override
270            public void setClassNameId(long classNameId) {
271                    _userNotificationDelivery.setClassNameId(classNameId);
272            }
273    
274            /**
275            * Returns the notification type of this user notification delivery.
276            *
277            * @return the notification type of this user notification delivery
278            */
279            @Override
280            public int getNotificationType() {
281                    return _userNotificationDelivery.getNotificationType();
282            }
283    
284            /**
285            * Sets the notification type of this user notification delivery.
286            *
287            * @param notificationType the notification type of this user notification delivery
288            */
289            @Override
290            public void setNotificationType(int notificationType) {
291                    _userNotificationDelivery.setNotificationType(notificationType);
292            }
293    
294            /**
295            * Returns the delivery type of this user notification delivery.
296            *
297            * @return the delivery type of this user notification delivery
298            */
299            @Override
300            public int getDeliveryType() {
301                    return _userNotificationDelivery.getDeliveryType();
302            }
303    
304            /**
305            * Sets the delivery type of this user notification delivery.
306            *
307            * @param deliveryType the delivery type of this user notification delivery
308            */
309            @Override
310            public void setDeliveryType(int deliveryType) {
311                    _userNotificationDelivery.setDeliveryType(deliveryType);
312            }
313    
314            /**
315            * Returns the deliver of this user notification delivery.
316            *
317            * @return the deliver of this user notification delivery
318            */
319            @Override
320            public boolean getDeliver() {
321                    return _userNotificationDelivery.getDeliver();
322            }
323    
324            /**
325            * Returns <code>true</code> if this user notification delivery is deliver.
326            *
327            * @return <code>true</code> if this user notification delivery is deliver; <code>false</code> otherwise
328            */
329            @Override
330            public boolean isDeliver() {
331                    return _userNotificationDelivery.isDeliver();
332            }
333    
334            /**
335            * Sets whether this user notification delivery is deliver.
336            *
337            * @param deliver the deliver of this user notification delivery
338            */
339            @Override
340            public void setDeliver(boolean deliver) {
341                    _userNotificationDelivery.setDeliver(deliver);
342            }
343    
344            @Override
345            public boolean isNew() {
346                    return _userNotificationDelivery.isNew();
347            }
348    
349            @Override
350            public void setNew(boolean n) {
351                    _userNotificationDelivery.setNew(n);
352            }
353    
354            @Override
355            public boolean isCachedModel() {
356                    return _userNotificationDelivery.isCachedModel();
357            }
358    
359            @Override
360            public void setCachedModel(boolean cachedModel) {
361                    _userNotificationDelivery.setCachedModel(cachedModel);
362            }
363    
364            @Override
365            public boolean isEscapedModel() {
366                    return _userNotificationDelivery.isEscapedModel();
367            }
368    
369            @Override
370            public java.io.Serializable getPrimaryKeyObj() {
371                    return _userNotificationDelivery.getPrimaryKeyObj();
372            }
373    
374            @Override
375            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
376                    _userNotificationDelivery.setPrimaryKeyObj(primaryKeyObj);
377            }
378    
379            @Override
380            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
381                    return _userNotificationDelivery.getExpandoBridge();
382            }
383    
384            @Override
385            public void setExpandoBridgeAttributes(
386                    com.liferay.portal.model.BaseModel<?> baseModel) {
387                    _userNotificationDelivery.setExpandoBridgeAttributes(baseModel);
388            }
389    
390            @Override
391            public void setExpandoBridgeAttributes(
392                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
393                    _userNotificationDelivery.setExpandoBridgeAttributes(expandoBridge);
394            }
395    
396            @Override
397            public void setExpandoBridgeAttributes(
398                    com.liferay.portal.service.ServiceContext serviceContext) {
399                    _userNotificationDelivery.setExpandoBridgeAttributes(serviceContext);
400            }
401    
402            @Override
403            public java.lang.Object clone() {
404                    return new UserNotificationDeliveryWrapper((UserNotificationDelivery)_userNotificationDelivery.clone());
405            }
406    
407            @Override
408            public int compareTo(
409                    com.liferay.portal.model.UserNotificationDelivery userNotificationDelivery) {
410                    return _userNotificationDelivery.compareTo(userNotificationDelivery);
411            }
412    
413            @Override
414            public int hashCode() {
415                    return _userNotificationDelivery.hashCode();
416            }
417    
418            @Override
419            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.UserNotificationDelivery> toCacheModel() {
420                    return _userNotificationDelivery.toCacheModel();
421            }
422    
423            @Override
424            public com.liferay.portal.model.UserNotificationDelivery toEscapedModel() {
425                    return new UserNotificationDeliveryWrapper(_userNotificationDelivery.toEscapedModel());
426            }
427    
428            @Override
429            public com.liferay.portal.model.UserNotificationDelivery toUnescapedModel() {
430                    return new UserNotificationDeliveryWrapper(_userNotificationDelivery.toUnescapedModel());
431            }
432    
433            @Override
434            public java.lang.String toString() {
435                    return _userNotificationDelivery.toString();
436            }
437    
438            @Override
439            public java.lang.String toXmlString() {
440                    return _userNotificationDelivery.toXmlString();
441            }
442    
443            @Override
444            public void persist()
445                    throws com.liferay.portal.kernel.exception.SystemException {
446                    _userNotificationDelivery.persist();
447            }
448    
449            @Override
450            public boolean equals(Object obj) {
451                    if (this == obj) {
452                            return true;
453                    }
454    
455                    if (!(obj instanceof UserNotificationDeliveryWrapper)) {
456                            return false;
457                    }
458    
459                    UserNotificationDeliveryWrapper userNotificationDeliveryWrapper = (UserNotificationDeliveryWrapper)obj;
460    
461                    if (Validator.equals(_userNotificationDelivery,
462                                            userNotificationDeliveryWrapper._userNotificationDelivery)) {
463                            return true;
464                    }
465    
466                    return false;
467            }
468    
469            /**
470             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
471             */
472            public UserNotificationDelivery getWrappedUserNotificationDelivery() {
473                    return _userNotificationDelivery;
474            }
475    
476            @Override
477            public UserNotificationDelivery getWrappedModel() {
478                    return _userNotificationDelivery;
479            }
480    
481            @Override
482            public void resetOriginalValues() {
483                    _userNotificationDelivery.resetOriginalValues();
484            }
485    
486            private UserNotificationDelivery _userNotificationDelivery;
487    }