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