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.portlet.announcements.model;
016    
017    import com.liferay.portal.model.ModelWrapper;
018    
019    import java.util.HashMap;
020    import java.util.Map;
021    
022    /**
023     * <p>
024     * This class is a wrapper for {@link AnnouncementsDelivery}.
025     * </p>
026     *
027     * @author    Brian Wing Shun Chan
028     * @see       AnnouncementsDelivery
029     * @generated
030     */
031    public class AnnouncementsDeliveryWrapper implements AnnouncementsDelivery,
032            ModelWrapper<AnnouncementsDelivery> {
033            public AnnouncementsDeliveryWrapper(
034                    AnnouncementsDelivery announcementsDelivery) {
035                    _announcementsDelivery = announcementsDelivery;
036            }
037    
038            public Class<?> getModelClass() {
039                    return AnnouncementsDelivery.class;
040            }
041    
042            public String getModelClassName() {
043                    return AnnouncementsDelivery.class.getName();
044            }
045    
046            public Map<String, Object> getModelAttributes() {
047                    Map<String, Object> attributes = new HashMap<String, Object>();
048    
049                    attributes.put("deliveryId", getDeliveryId());
050                    attributes.put("companyId", getCompanyId());
051                    attributes.put("userId", getUserId());
052                    attributes.put("type", getType());
053                    attributes.put("email", getEmail());
054                    attributes.put("sms", getSms());
055                    attributes.put("website", getWebsite());
056    
057                    return attributes;
058            }
059    
060            public void setModelAttributes(Map<String, Object> attributes) {
061                    Long deliveryId = (Long)attributes.get("deliveryId");
062    
063                    if (deliveryId != null) {
064                            setDeliveryId(deliveryId);
065                    }
066    
067                    Long companyId = (Long)attributes.get("companyId");
068    
069                    if (companyId != null) {
070                            setCompanyId(companyId);
071                    }
072    
073                    Long userId = (Long)attributes.get("userId");
074    
075                    if (userId != null) {
076                            setUserId(userId);
077                    }
078    
079                    String type = (String)attributes.get("type");
080    
081                    if (type != null) {
082                            setType(type);
083                    }
084    
085                    Boolean email = (Boolean)attributes.get("email");
086    
087                    if (email != null) {
088                            setEmail(email);
089                    }
090    
091                    Boolean sms = (Boolean)attributes.get("sms");
092    
093                    if (sms != null) {
094                            setSms(sms);
095                    }
096    
097                    Boolean website = (Boolean)attributes.get("website");
098    
099                    if (website != null) {
100                            setWebsite(website);
101                    }
102            }
103    
104            /**
105            * Returns the primary key of this announcements delivery.
106            *
107            * @return the primary key of this announcements delivery
108            */
109            public long getPrimaryKey() {
110                    return _announcementsDelivery.getPrimaryKey();
111            }
112    
113            /**
114            * Sets the primary key of this announcements delivery.
115            *
116            * @param primaryKey the primary key of this announcements delivery
117            */
118            public void setPrimaryKey(long primaryKey) {
119                    _announcementsDelivery.setPrimaryKey(primaryKey);
120            }
121    
122            /**
123            * Returns the delivery ID of this announcements delivery.
124            *
125            * @return the delivery ID of this announcements delivery
126            */
127            public long getDeliveryId() {
128                    return _announcementsDelivery.getDeliveryId();
129            }
130    
131            /**
132            * Sets the delivery ID of this announcements delivery.
133            *
134            * @param deliveryId the delivery ID of this announcements delivery
135            */
136            public void setDeliveryId(long deliveryId) {
137                    _announcementsDelivery.setDeliveryId(deliveryId);
138            }
139    
140            /**
141            * Returns the company ID of this announcements delivery.
142            *
143            * @return the company ID of this announcements delivery
144            */
145            public long getCompanyId() {
146                    return _announcementsDelivery.getCompanyId();
147            }
148    
149            /**
150            * Sets the company ID of this announcements delivery.
151            *
152            * @param companyId the company ID of this announcements delivery
153            */
154            public void setCompanyId(long companyId) {
155                    _announcementsDelivery.setCompanyId(companyId);
156            }
157    
158            /**
159            * Returns the user ID of this announcements delivery.
160            *
161            * @return the user ID of this announcements delivery
162            */
163            public long getUserId() {
164                    return _announcementsDelivery.getUserId();
165            }
166    
167            /**
168            * Sets the user ID of this announcements delivery.
169            *
170            * @param userId the user ID of this announcements delivery
171            */
172            public void setUserId(long userId) {
173                    _announcementsDelivery.setUserId(userId);
174            }
175    
176            /**
177            * Returns the user uuid of this announcements delivery.
178            *
179            * @return the user uuid of this announcements delivery
180            * @throws SystemException if a system exception occurred
181            */
182            public java.lang.String getUserUuid()
183                    throws com.liferay.portal.kernel.exception.SystemException {
184                    return _announcementsDelivery.getUserUuid();
185            }
186    
187            /**
188            * Sets the user uuid of this announcements delivery.
189            *
190            * @param userUuid the user uuid of this announcements delivery
191            */
192            public void setUserUuid(java.lang.String userUuid) {
193                    _announcementsDelivery.setUserUuid(userUuid);
194            }
195    
196            /**
197            * Returns the type of this announcements delivery.
198            *
199            * @return the type of this announcements delivery
200            */
201            public java.lang.String getType() {
202                    return _announcementsDelivery.getType();
203            }
204    
205            /**
206            * Sets the type of this announcements delivery.
207            *
208            * @param type the type of this announcements delivery
209            */
210            public void setType(java.lang.String type) {
211                    _announcementsDelivery.setType(type);
212            }
213    
214            /**
215            * Returns the email of this announcements delivery.
216            *
217            * @return the email of this announcements delivery
218            */
219            public boolean getEmail() {
220                    return _announcementsDelivery.getEmail();
221            }
222    
223            /**
224            * Returns <code>true</code> if this announcements delivery is email.
225            *
226            * @return <code>true</code> if this announcements delivery is email; <code>false</code> otherwise
227            */
228            public boolean isEmail() {
229                    return _announcementsDelivery.isEmail();
230            }
231    
232            /**
233            * Sets whether this announcements delivery is email.
234            *
235            * @param email the email of this announcements delivery
236            */
237            public void setEmail(boolean email) {
238                    _announcementsDelivery.setEmail(email);
239            }
240    
241            /**
242            * Returns the sms of this announcements delivery.
243            *
244            * @return the sms of this announcements delivery
245            */
246            public boolean getSms() {
247                    return _announcementsDelivery.getSms();
248            }
249    
250            /**
251            * Returns <code>true</code> if this announcements delivery is sms.
252            *
253            * @return <code>true</code> if this announcements delivery is sms; <code>false</code> otherwise
254            */
255            public boolean isSms() {
256                    return _announcementsDelivery.isSms();
257            }
258    
259            /**
260            * Sets whether this announcements delivery is sms.
261            *
262            * @param sms the sms of this announcements delivery
263            */
264            public void setSms(boolean sms) {
265                    _announcementsDelivery.setSms(sms);
266            }
267    
268            /**
269            * Returns the website of this announcements delivery.
270            *
271            * @return the website of this announcements delivery
272            */
273            public boolean getWebsite() {
274                    return _announcementsDelivery.getWebsite();
275            }
276    
277            /**
278            * Returns <code>true</code> if this announcements delivery is website.
279            *
280            * @return <code>true</code> if this announcements delivery is website; <code>false</code> otherwise
281            */
282            public boolean isWebsite() {
283                    return _announcementsDelivery.isWebsite();
284            }
285    
286            /**
287            * Sets whether this announcements delivery is website.
288            *
289            * @param website the website of this announcements delivery
290            */
291            public void setWebsite(boolean website) {
292                    _announcementsDelivery.setWebsite(website);
293            }
294    
295            public boolean isNew() {
296                    return _announcementsDelivery.isNew();
297            }
298    
299            public void setNew(boolean n) {
300                    _announcementsDelivery.setNew(n);
301            }
302    
303            public boolean isCachedModel() {
304                    return _announcementsDelivery.isCachedModel();
305            }
306    
307            public void setCachedModel(boolean cachedModel) {
308                    _announcementsDelivery.setCachedModel(cachedModel);
309            }
310    
311            public boolean isEscapedModel() {
312                    return _announcementsDelivery.isEscapedModel();
313            }
314    
315            public java.io.Serializable getPrimaryKeyObj() {
316                    return _announcementsDelivery.getPrimaryKeyObj();
317            }
318    
319            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
320                    _announcementsDelivery.setPrimaryKeyObj(primaryKeyObj);
321            }
322    
323            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
324                    return _announcementsDelivery.getExpandoBridge();
325            }
326    
327            public void setExpandoBridgeAttributes(
328                    com.liferay.portal.model.BaseModel<?> baseModel) {
329                    _announcementsDelivery.setExpandoBridgeAttributes(baseModel);
330            }
331    
332            public void setExpandoBridgeAttributes(
333                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
334                    _announcementsDelivery.setExpandoBridgeAttributes(expandoBridge);
335            }
336    
337            public void setExpandoBridgeAttributes(
338                    com.liferay.portal.service.ServiceContext serviceContext) {
339                    _announcementsDelivery.setExpandoBridgeAttributes(serviceContext);
340            }
341    
342            @Override
343            public java.lang.Object clone() {
344                    return new AnnouncementsDeliveryWrapper((AnnouncementsDelivery)_announcementsDelivery.clone());
345            }
346    
347            public int compareTo(
348                    com.liferay.portlet.announcements.model.AnnouncementsDelivery announcementsDelivery) {
349                    return _announcementsDelivery.compareTo(announcementsDelivery);
350            }
351    
352            @Override
353            public int hashCode() {
354                    return _announcementsDelivery.hashCode();
355            }
356    
357            public com.liferay.portal.model.CacheModel<com.liferay.portlet.announcements.model.AnnouncementsDelivery> toCacheModel() {
358                    return _announcementsDelivery.toCacheModel();
359            }
360    
361            public com.liferay.portlet.announcements.model.AnnouncementsDelivery toEscapedModel() {
362                    return new AnnouncementsDeliveryWrapper(_announcementsDelivery.toEscapedModel());
363            }
364    
365            public com.liferay.portlet.announcements.model.AnnouncementsDelivery toUnescapedModel() {
366                    return new AnnouncementsDeliveryWrapper(_announcementsDelivery.toUnescapedModel());
367            }
368    
369            @Override
370            public java.lang.String toString() {
371                    return _announcementsDelivery.toString();
372            }
373    
374            public java.lang.String toXmlString() {
375                    return _announcementsDelivery.toXmlString();
376            }
377    
378            public void persist()
379                    throws com.liferay.portal.kernel.exception.SystemException {
380                    _announcementsDelivery.persist();
381            }
382    
383            /**
384             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
385             */
386            public AnnouncementsDelivery getWrappedAnnouncementsDelivery() {
387                    return _announcementsDelivery;
388            }
389    
390            public AnnouncementsDelivery getWrappedModel() {
391                    return _announcementsDelivery;
392            }
393    
394            public void resetOriginalValues() {
395                    _announcementsDelivery.resetOriginalValues();
396            }
397    
398            private AnnouncementsDelivery _announcementsDelivery;
399    }