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