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