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