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