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