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(
355                    com.liferay.portal.model.BaseModel<?> baseModel) {
356                    _userNotificationDelivery.setExpandoBridgeAttributes(baseModel);
357            }
358    
359            @Override
360            public void setExpandoBridgeAttributes(
361                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
362                    _userNotificationDelivery.setExpandoBridgeAttributes(expandoBridge);
363            }
364    
365            @Override
366            public void setExpandoBridgeAttributes(
367                    com.liferay.portal.service.ServiceContext serviceContext) {
368                    _userNotificationDelivery.setExpandoBridgeAttributes(serviceContext);
369            }
370    
371            /**
372            * Sets the mvcc version of this user notification delivery.
373            *
374            * @param mvccVersion the mvcc version of this user notification delivery
375            */
376            @Override
377            public void setMvccVersion(long mvccVersion) {
378                    _userNotificationDelivery.setMvccVersion(mvccVersion);
379            }
380    
381            @Override
382            public void setNew(boolean n) {
383                    _userNotificationDelivery.setNew(n);
384            }
385    
386            /**
387            * Sets the notification type of this user notification delivery.
388            *
389            * @param notificationType the notification type of this user notification delivery
390            */
391            @Override
392            public void setNotificationType(int notificationType) {
393                    _userNotificationDelivery.setNotificationType(notificationType);
394            }
395    
396            /**
397            * Sets the portlet ID of this user notification delivery.
398            *
399            * @param portletId the portlet ID of this user notification delivery
400            */
401            @Override
402            public void setPortletId(java.lang.String portletId) {
403                    _userNotificationDelivery.setPortletId(portletId);
404            }
405    
406            /**
407            * Sets the primary key of this user notification delivery.
408            *
409            * @param primaryKey the primary key of this user notification delivery
410            */
411            @Override
412            public void setPrimaryKey(long primaryKey) {
413                    _userNotificationDelivery.setPrimaryKey(primaryKey);
414            }
415    
416            @Override
417            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
418                    _userNotificationDelivery.setPrimaryKeyObj(primaryKeyObj);
419            }
420    
421            /**
422            * Sets the user ID of this user notification delivery.
423            *
424            * @param userId the user ID of this user notification delivery
425            */
426            @Override
427            public void setUserId(long userId) {
428                    _userNotificationDelivery.setUserId(userId);
429            }
430    
431            /**
432            * Sets the user notification delivery ID of this user notification delivery.
433            *
434            * @param userNotificationDeliveryId the user notification delivery ID of this user notification delivery
435            */
436            @Override
437            public void setUserNotificationDeliveryId(long userNotificationDeliveryId) {
438                    _userNotificationDelivery.setUserNotificationDeliveryId(userNotificationDeliveryId);
439            }
440    
441            /**
442            * Sets the user uuid of this user notification delivery.
443            *
444            * @param userUuid the user uuid of this user notification delivery
445            */
446            @Override
447            public void setUserUuid(java.lang.String userUuid) {
448                    _userNotificationDelivery.setUserUuid(userUuid);
449            }
450    
451            @Override
452            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.UserNotificationDelivery> toCacheModel() {
453                    return _userNotificationDelivery.toCacheModel();
454            }
455    
456            @Override
457            public com.liferay.portal.model.UserNotificationDelivery toEscapedModel() {
458                    return new UserNotificationDeliveryWrapper(_userNotificationDelivery.toEscapedModel());
459            }
460    
461            @Override
462            public java.lang.String toString() {
463                    return _userNotificationDelivery.toString();
464            }
465    
466            @Override
467            public com.liferay.portal.model.UserNotificationDelivery toUnescapedModel() {
468                    return new UserNotificationDeliveryWrapper(_userNotificationDelivery.toUnescapedModel());
469            }
470    
471            @Override
472            public java.lang.String toXmlString() {
473                    return _userNotificationDelivery.toXmlString();
474            }
475    
476            @Override
477            public boolean equals(Object obj) {
478                    if (this == obj) {
479                            return true;
480                    }
481    
482                    if (!(obj instanceof UserNotificationDeliveryWrapper)) {
483                            return false;
484                    }
485    
486                    UserNotificationDeliveryWrapper userNotificationDeliveryWrapper = (UserNotificationDeliveryWrapper)obj;
487    
488                    if (Validator.equals(_userNotificationDelivery,
489                                            userNotificationDeliveryWrapper._userNotificationDelivery)) {
490                            return true;
491                    }
492    
493                    return false;
494            }
495    
496            /**
497             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
498             */
499            @Deprecated
500            public UserNotificationDelivery getWrappedUserNotificationDelivery() {
501                    return _userNotificationDelivery;
502            }
503    
504            @Override
505            public UserNotificationDelivery getWrappedModel() {
506                    return _userNotificationDelivery;
507            }
508    
509            @Override
510            public boolean isEntityCacheEnabled() {
511                    return _userNotificationDelivery.isEntityCacheEnabled();
512            }
513    
514            @Override
515            public boolean isFinderCacheEnabled() {
516                    return _userNotificationDelivery.isFinderCacheEnabled();
517            }
518    
519            @Override
520            public void resetOriginalValues() {
521                    _userNotificationDelivery.resetOriginalValues();
522            }
523    
524            private final UserNotificationDelivery _userNotificationDelivery;
525    }