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