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.Date;
021    import java.util.HashMap;
022    import java.util.Map;
023    
024    /**
025     * <p>
026     * This class is a wrapper for {@link AnnouncementsEntry}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       AnnouncementsEntry
031     * @generated
032     */
033    public class AnnouncementsEntryWrapper implements AnnouncementsEntry,
034            ModelWrapper<AnnouncementsEntry> {
035            public AnnouncementsEntryWrapper(AnnouncementsEntry announcementsEntry) {
036                    _announcementsEntry = announcementsEntry;
037            }
038    
039            public Class<?> getModelClass() {
040                    return AnnouncementsEntry.class;
041            }
042    
043            public String getModelClassName() {
044                    return AnnouncementsEntry.class.getName();
045            }
046    
047            public Map<String, Object> getModelAttributes() {
048                    Map<String, Object> attributes = new HashMap<String, Object>();
049    
050                    attributes.put("uuid", getUuid());
051                    attributes.put("entryId", getEntryId());
052                    attributes.put("companyId", getCompanyId());
053                    attributes.put("userId", getUserId());
054                    attributes.put("userName", getUserName());
055                    attributes.put("createDate", getCreateDate());
056                    attributes.put("modifiedDate", getModifiedDate());
057                    attributes.put("classNameId", getClassNameId());
058                    attributes.put("classPK", getClassPK());
059                    attributes.put("title", getTitle());
060                    attributes.put("content", getContent());
061                    attributes.put("url", getUrl());
062                    attributes.put("type", getType());
063                    attributes.put("displayDate", getDisplayDate());
064                    attributes.put("expirationDate", getExpirationDate());
065                    attributes.put("priority", getPriority());
066                    attributes.put("alert", getAlert());
067    
068                    return attributes;
069            }
070    
071            public void setModelAttributes(Map<String, Object> attributes) {
072                    String uuid = (String)attributes.get("uuid");
073    
074                    if (uuid != null) {
075                            setUuid(uuid);
076                    }
077    
078                    Long entryId = (Long)attributes.get("entryId");
079    
080                    if (entryId != null) {
081                            setEntryId(entryId);
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 userName = (String)attributes.get("userName");
097    
098                    if (userName != null) {
099                            setUserName(userName);
100                    }
101    
102                    Date createDate = (Date)attributes.get("createDate");
103    
104                    if (createDate != null) {
105                            setCreateDate(createDate);
106                    }
107    
108                    Date modifiedDate = (Date)attributes.get("modifiedDate");
109    
110                    if (modifiedDate != null) {
111                            setModifiedDate(modifiedDate);
112                    }
113    
114                    Long classNameId = (Long)attributes.get("classNameId");
115    
116                    if (classNameId != null) {
117                            setClassNameId(classNameId);
118                    }
119    
120                    Long classPK = (Long)attributes.get("classPK");
121    
122                    if (classPK != null) {
123                            setClassPK(classPK);
124                    }
125    
126                    String title = (String)attributes.get("title");
127    
128                    if (title != null) {
129                            setTitle(title);
130                    }
131    
132                    String content = (String)attributes.get("content");
133    
134                    if (content != null) {
135                            setContent(content);
136                    }
137    
138                    String url = (String)attributes.get("url");
139    
140                    if (url != null) {
141                            setUrl(url);
142                    }
143    
144                    String type = (String)attributes.get("type");
145    
146                    if (type != null) {
147                            setType(type);
148                    }
149    
150                    Date displayDate = (Date)attributes.get("displayDate");
151    
152                    if (displayDate != null) {
153                            setDisplayDate(displayDate);
154                    }
155    
156                    Date expirationDate = (Date)attributes.get("expirationDate");
157    
158                    if (expirationDate != null) {
159                            setExpirationDate(expirationDate);
160                    }
161    
162                    Integer priority = (Integer)attributes.get("priority");
163    
164                    if (priority != null) {
165                            setPriority(priority);
166                    }
167    
168                    Boolean alert = (Boolean)attributes.get("alert");
169    
170                    if (alert != null) {
171                            setAlert(alert);
172                    }
173            }
174    
175            /**
176            * Returns the primary key of this announcements entry.
177            *
178            * @return the primary key of this announcements entry
179            */
180            public long getPrimaryKey() {
181                    return _announcementsEntry.getPrimaryKey();
182            }
183    
184            /**
185            * Sets the primary key of this announcements entry.
186            *
187            * @param primaryKey the primary key of this announcements entry
188            */
189            public void setPrimaryKey(long primaryKey) {
190                    _announcementsEntry.setPrimaryKey(primaryKey);
191            }
192    
193            /**
194            * Returns the uuid of this announcements entry.
195            *
196            * @return the uuid of this announcements entry
197            */
198            public java.lang.String getUuid() {
199                    return _announcementsEntry.getUuid();
200            }
201    
202            /**
203            * Sets the uuid of this announcements entry.
204            *
205            * @param uuid the uuid of this announcements entry
206            */
207            public void setUuid(java.lang.String uuid) {
208                    _announcementsEntry.setUuid(uuid);
209            }
210    
211            /**
212            * Returns the entry ID of this announcements entry.
213            *
214            * @return the entry ID of this announcements entry
215            */
216            public long getEntryId() {
217                    return _announcementsEntry.getEntryId();
218            }
219    
220            /**
221            * Sets the entry ID of this announcements entry.
222            *
223            * @param entryId the entry ID of this announcements entry
224            */
225            public void setEntryId(long entryId) {
226                    _announcementsEntry.setEntryId(entryId);
227            }
228    
229            /**
230            * Returns the company ID of this announcements entry.
231            *
232            * @return the company ID of this announcements entry
233            */
234            public long getCompanyId() {
235                    return _announcementsEntry.getCompanyId();
236            }
237    
238            /**
239            * Sets the company ID of this announcements entry.
240            *
241            * @param companyId the company ID of this announcements entry
242            */
243            public void setCompanyId(long companyId) {
244                    _announcementsEntry.setCompanyId(companyId);
245            }
246    
247            /**
248            * Returns the user ID of this announcements entry.
249            *
250            * @return the user ID of this announcements entry
251            */
252            public long getUserId() {
253                    return _announcementsEntry.getUserId();
254            }
255    
256            /**
257            * Sets the user ID of this announcements entry.
258            *
259            * @param userId the user ID of this announcements entry
260            */
261            public void setUserId(long userId) {
262                    _announcementsEntry.setUserId(userId);
263            }
264    
265            /**
266            * Returns the user uuid of this announcements entry.
267            *
268            * @return the user uuid of this announcements entry
269            * @throws SystemException if a system exception occurred
270            */
271            public java.lang.String getUserUuid()
272                    throws com.liferay.portal.kernel.exception.SystemException {
273                    return _announcementsEntry.getUserUuid();
274            }
275    
276            /**
277            * Sets the user uuid of this announcements entry.
278            *
279            * @param userUuid the user uuid of this announcements entry
280            */
281            public void setUserUuid(java.lang.String userUuid) {
282                    _announcementsEntry.setUserUuid(userUuid);
283            }
284    
285            /**
286            * Returns the user name of this announcements entry.
287            *
288            * @return the user name of this announcements entry
289            */
290            public java.lang.String getUserName() {
291                    return _announcementsEntry.getUserName();
292            }
293    
294            /**
295            * Sets the user name of this announcements entry.
296            *
297            * @param userName the user name of this announcements entry
298            */
299            public void setUserName(java.lang.String userName) {
300                    _announcementsEntry.setUserName(userName);
301            }
302    
303            /**
304            * Returns the create date of this announcements entry.
305            *
306            * @return the create date of this announcements entry
307            */
308            public java.util.Date getCreateDate() {
309                    return _announcementsEntry.getCreateDate();
310            }
311    
312            /**
313            * Sets the create date of this announcements entry.
314            *
315            * @param createDate the create date of this announcements entry
316            */
317            public void setCreateDate(java.util.Date createDate) {
318                    _announcementsEntry.setCreateDate(createDate);
319            }
320    
321            /**
322            * Returns the modified date of this announcements entry.
323            *
324            * @return the modified date of this announcements entry
325            */
326            public java.util.Date getModifiedDate() {
327                    return _announcementsEntry.getModifiedDate();
328            }
329    
330            /**
331            * Sets the modified date of this announcements entry.
332            *
333            * @param modifiedDate the modified date of this announcements entry
334            */
335            public void setModifiedDate(java.util.Date modifiedDate) {
336                    _announcementsEntry.setModifiedDate(modifiedDate);
337            }
338    
339            /**
340            * Returns the fully qualified class name of this announcements entry.
341            *
342            * @return the fully qualified class name of this announcements entry
343            */
344            public java.lang.String getClassName() {
345                    return _announcementsEntry.getClassName();
346            }
347    
348            public void setClassName(java.lang.String className) {
349                    _announcementsEntry.setClassName(className);
350            }
351    
352            /**
353            * Returns the class name ID of this announcements entry.
354            *
355            * @return the class name ID of this announcements entry
356            */
357            public long getClassNameId() {
358                    return _announcementsEntry.getClassNameId();
359            }
360    
361            /**
362            * Sets the class name ID of this announcements entry.
363            *
364            * @param classNameId the class name ID of this announcements entry
365            */
366            public void setClassNameId(long classNameId) {
367                    _announcementsEntry.setClassNameId(classNameId);
368            }
369    
370            /**
371            * Returns the class p k of this announcements entry.
372            *
373            * @return the class p k of this announcements entry
374            */
375            public long getClassPK() {
376                    return _announcementsEntry.getClassPK();
377            }
378    
379            /**
380            * Sets the class p k of this announcements entry.
381            *
382            * @param classPK the class p k of this announcements entry
383            */
384            public void setClassPK(long classPK) {
385                    _announcementsEntry.setClassPK(classPK);
386            }
387    
388            /**
389            * Returns the title of this announcements entry.
390            *
391            * @return the title of this announcements entry
392            */
393            public java.lang.String getTitle() {
394                    return _announcementsEntry.getTitle();
395            }
396    
397            /**
398            * Sets the title of this announcements entry.
399            *
400            * @param title the title of this announcements entry
401            */
402            public void setTitle(java.lang.String title) {
403                    _announcementsEntry.setTitle(title);
404            }
405    
406            /**
407            * Returns the content of this announcements entry.
408            *
409            * @return the content of this announcements entry
410            */
411            public java.lang.String getContent() {
412                    return _announcementsEntry.getContent();
413            }
414    
415            /**
416            * Sets the content of this announcements entry.
417            *
418            * @param content the content of this announcements entry
419            */
420            public void setContent(java.lang.String content) {
421                    _announcementsEntry.setContent(content);
422            }
423    
424            /**
425            * Returns the url of this announcements entry.
426            *
427            * @return the url of this announcements entry
428            */
429            public java.lang.String getUrl() {
430                    return _announcementsEntry.getUrl();
431            }
432    
433            /**
434            * Sets the url of this announcements entry.
435            *
436            * @param url the url of this announcements entry
437            */
438            public void setUrl(java.lang.String url) {
439                    _announcementsEntry.setUrl(url);
440            }
441    
442            /**
443            * Returns the type of this announcements entry.
444            *
445            * @return the type of this announcements entry
446            */
447            public java.lang.String getType() {
448                    return _announcementsEntry.getType();
449            }
450    
451            /**
452            * Sets the type of this announcements entry.
453            *
454            * @param type the type of this announcements entry
455            */
456            public void setType(java.lang.String type) {
457                    _announcementsEntry.setType(type);
458            }
459    
460            /**
461            * Returns the display date of this announcements entry.
462            *
463            * @return the display date of this announcements entry
464            */
465            public java.util.Date getDisplayDate() {
466                    return _announcementsEntry.getDisplayDate();
467            }
468    
469            /**
470            * Sets the display date of this announcements entry.
471            *
472            * @param displayDate the display date of this announcements entry
473            */
474            public void setDisplayDate(java.util.Date displayDate) {
475                    _announcementsEntry.setDisplayDate(displayDate);
476            }
477    
478            /**
479            * Returns the expiration date of this announcements entry.
480            *
481            * @return the expiration date of this announcements entry
482            */
483            public java.util.Date getExpirationDate() {
484                    return _announcementsEntry.getExpirationDate();
485            }
486    
487            /**
488            * Sets the expiration date of this announcements entry.
489            *
490            * @param expirationDate the expiration date of this announcements entry
491            */
492            public void setExpirationDate(java.util.Date expirationDate) {
493                    _announcementsEntry.setExpirationDate(expirationDate);
494            }
495    
496            /**
497            * Returns the priority of this announcements entry.
498            *
499            * @return the priority of this announcements entry
500            */
501            public int getPriority() {
502                    return _announcementsEntry.getPriority();
503            }
504    
505            /**
506            * Sets the priority of this announcements entry.
507            *
508            * @param priority the priority of this announcements entry
509            */
510            public void setPriority(int priority) {
511                    _announcementsEntry.setPriority(priority);
512            }
513    
514            /**
515            * Returns the alert of this announcements entry.
516            *
517            * @return the alert of this announcements entry
518            */
519            public boolean getAlert() {
520                    return _announcementsEntry.getAlert();
521            }
522    
523            /**
524            * Returns <code>true</code> if this announcements entry is alert.
525            *
526            * @return <code>true</code> if this announcements entry is alert; <code>false</code> otherwise
527            */
528            public boolean isAlert() {
529                    return _announcementsEntry.isAlert();
530            }
531    
532            /**
533            * Sets whether this announcements entry is alert.
534            *
535            * @param alert the alert of this announcements entry
536            */
537            public void setAlert(boolean alert) {
538                    _announcementsEntry.setAlert(alert);
539            }
540    
541            public boolean isNew() {
542                    return _announcementsEntry.isNew();
543            }
544    
545            public void setNew(boolean n) {
546                    _announcementsEntry.setNew(n);
547            }
548    
549            public boolean isCachedModel() {
550                    return _announcementsEntry.isCachedModel();
551            }
552    
553            public void setCachedModel(boolean cachedModel) {
554                    _announcementsEntry.setCachedModel(cachedModel);
555            }
556    
557            public boolean isEscapedModel() {
558                    return _announcementsEntry.isEscapedModel();
559            }
560    
561            public java.io.Serializable getPrimaryKeyObj() {
562                    return _announcementsEntry.getPrimaryKeyObj();
563            }
564    
565            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
566                    _announcementsEntry.setPrimaryKeyObj(primaryKeyObj);
567            }
568    
569            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
570                    return _announcementsEntry.getExpandoBridge();
571            }
572    
573            public void setExpandoBridgeAttributes(
574                    com.liferay.portal.service.ServiceContext serviceContext) {
575                    _announcementsEntry.setExpandoBridgeAttributes(serviceContext);
576            }
577    
578            @Override
579            public java.lang.Object clone() {
580                    return new AnnouncementsEntryWrapper((AnnouncementsEntry)_announcementsEntry.clone());
581            }
582    
583            public int compareTo(
584                    com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry) {
585                    return _announcementsEntry.compareTo(announcementsEntry);
586            }
587    
588            @Override
589            public int hashCode() {
590                    return _announcementsEntry.hashCode();
591            }
592    
593            public com.liferay.portal.model.CacheModel<com.liferay.portlet.announcements.model.AnnouncementsEntry> toCacheModel() {
594                    return _announcementsEntry.toCacheModel();
595            }
596    
597            public com.liferay.portlet.announcements.model.AnnouncementsEntry toEscapedModel() {
598                    return new AnnouncementsEntryWrapper(_announcementsEntry.toEscapedModel());
599            }
600    
601            public com.liferay.portlet.announcements.model.AnnouncementsEntry toUnescapedModel() {
602                    return new AnnouncementsEntryWrapper(_announcementsEntry.toUnescapedModel());
603            }
604    
605            @Override
606            public java.lang.String toString() {
607                    return _announcementsEntry.toString();
608            }
609    
610            public java.lang.String toXmlString() {
611                    return _announcementsEntry.toXmlString();
612            }
613    
614            public void persist()
615                    throws com.liferay.portal.kernel.exception.SystemException {
616                    _announcementsEntry.persist();
617            }
618    
619            public long getGroupId()
620                    throws com.liferay.portal.kernel.exception.PortalException,
621                            com.liferay.portal.kernel.exception.SystemException {
622                    return _announcementsEntry.getGroupId();
623            }
624    
625            @Override
626            public boolean equals(Object obj) {
627                    if (this == obj) {
628                            return true;
629                    }
630    
631                    if (!(obj instanceof AnnouncementsEntryWrapper)) {
632                            return false;
633                    }
634    
635                    AnnouncementsEntryWrapper announcementsEntryWrapper = (AnnouncementsEntryWrapper)obj;
636    
637                    if (Validator.equals(_announcementsEntry,
638                                            announcementsEntryWrapper._announcementsEntry)) {
639                            return true;
640                    }
641    
642                    return false;
643            }
644    
645            /**
646             * @deprecated Renamed to {@link #getWrappedModel}
647             */
648            public AnnouncementsEntry getWrappedAnnouncementsEntry() {
649                    return _announcementsEntry;
650            }
651    
652            public AnnouncementsEntry getWrappedModel() {
653                    return _announcementsEntry;
654            }
655    
656            public void resetOriginalValues() {
657                    _announcementsEntry.resetOriginalValues();
658            }
659    
660            private AnnouncementsEntry _announcementsEntry;
661    }