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