001
014
015 package com.liferay.portlet.announcements.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.lar.StagedModelType;
020 import com.liferay.portal.kernel.util.Validator;
021 import com.liferay.portal.model.ModelWrapper;
022
023 import java.util.Date;
024 import java.util.HashMap;
025 import java.util.Map;
026
027
036 @ProviderType
037 public class AnnouncementsEntryWrapper implements AnnouncementsEntry,
038 ModelWrapper<AnnouncementsEntry> {
039 public AnnouncementsEntryWrapper(AnnouncementsEntry announcementsEntry) {
040 _announcementsEntry = announcementsEntry;
041 }
042
043 @Override
044 public Class<?> getModelClass() {
045 return AnnouncementsEntry.class;
046 }
047
048 @Override
049 public String getModelClassName() {
050 return AnnouncementsEntry.class.getName();
051 }
052
053 @Override
054 public Map<String, Object> getModelAttributes() {
055 Map<String, Object> attributes = new HashMap<String, Object>();
056
057 attributes.put("uuid", getUuid());
058 attributes.put("entryId", getEntryId());
059 attributes.put("companyId", getCompanyId());
060 attributes.put("userId", getUserId());
061 attributes.put("userName", getUserName());
062 attributes.put("createDate", getCreateDate());
063 attributes.put("modifiedDate", getModifiedDate());
064 attributes.put("classNameId", getClassNameId());
065 attributes.put("classPK", getClassPK());
066 attributes.put("title", getTitle());
067 attributes.put("content", getContent());
068 attributes.put("url", getUrl());
069 attributes.put("type", getType());
070 attributes.put("displayDate", getDisplayDate());
071 attributes.put("expirationDate", getExpirationDate());
072 attributes.put("priority", getPriority());
073 attributes.put("alert", getAlert());
074
075 return attributes;
076 }
077
078 @Override
079 public void setModelAttributes(Map<String, Object> attributes) {
080 String uuid = (String)attributes.get("uuid");
081
082 if (uuid != null) {
083 setUuid(uuid);
084 }
085
086 Long entryId = (Long)attributes.get("entryId");
087
088 if (entryId != null) {
089 setEntryId(entryId);
090 }
091
092 Long companyId = (Long)attributes.get("companyId");
093
094 if (companyId != null) {
095 setCompanyId(companyId);
096 }
097
098 Long userId = (Long)attributes.get("userId");
099
100 if (userId != null) {
101 setUserId(userId);
102 }
103
104 String userName = (String)attributes.get("userName");
105
106 if (userName != null) {
107 setUserName(userName);
108 }
109
110 Date createDate = (Date)attributes.get("createDate");
111
112 if (createDate != null) {
113 setCreateDate(createDate);
114 }
115
116 Date modifiedDate = (Date)attributes.get("modifiedDate");
117
118 if (modifiedDate != null) {
119 setModifiedDate(modifiedDate);
120 }
121
122 Long classNameId = (Long)attributes.get("classNameId");
123
124 if (classNameId != null) {
125 setClassNameId(classNameId);
126 }
127
128 Long classPK = (Long)attributes.get("classPK");
129
130 if (classPK != null) {
131 setClassPK(classPK);
132 }
133
134 String title = (String)attributes.get("title");
135
136 if (title != null) {
137 setTitle(title);
138 }
139
140 String content = (String)attributes.get("content");
141
142 if (content != null) {
143 setContent(content);
144 }
145
146 String url = (String)attributes.get("url");
147
148 if (url != null) {
149 setUrl(url);
150 }
151
152 String type = (String)attributes.get("type");
153
154 if (type != null) {
155 setType(type);
156 }
157
158 Date displayDate = (Date)attributes.get("displayDate");
159
160 if (displayDate != null) {
161 setDisplayDate(displayDate);
162 }
163
164 Date expirationDate = (Date)attributes.get("expirationDate");
165
166 if (expirationDate != null) {
167 setExpirationDate(expirationDate);
168 }
169
170 Integer priority = (Integer)attributes.get("priority");
171
172 if (priority != null) {
173 setPriority(priority);
174 }
175
176 Boolean alert = (Boolean)attributes.get("alert");
177
178 if (alert != null) {
179 setAlert(alert);
180 }
181 }
182
183
188 @Override
189 public long getPrimaryKey() {
190 return _announcementsEntry.getPrimaryKey();
191 }
192
193
198 @Override
199 public void setPrimaryKey(long primaryKey) {
200 _announcementsEntry.setPrimaryKey(primaryKey);
201 }
202
203
208 @Override
209 public java.lang.String getUuid() {
210 return _announcementsEntry.getUuid();
211 }
212
213
218 @Override
219 public void setUuid(java.lang.String uuid) {
220 _announcementsEntry.setUuid(uuid);
221 }
222
223
228 @Override
229 public long getEntryId() {
230 return _announcementsEntry.getEntryId();
231 }
232
233
238 @Override
239 public void setEntryId(long entryId) {
240 _announcementsEntry.setEntryId(entryId);
241 }
242
243
248 @Override
249 public long getCompanyId() {
250 return _announcementsEntry.getCompanyId();
251 }
252
253
258 @Override
259 public void setCompanyId(long companyId) {
260 _announcementsEntry.setCompanyId(companyId);
261 }
262
263
268 @Override
269 public long getUserId() {
270 return _announcementsEntry.getUserId();
271 }
272
273
278 @Override
279 public void setUserId(long userId) {
280 _announcementsEntry.setUserId(userId);
281 }
282
283
289 @Override
290 public java.lang.String getUserUuid()
291 throws com.liferay.portal.kernel.exception.SystemException {
292 return _announcementsEntry.getUserUuid();
293 }
294
295
300 @Override
301 public void setUserUuid(java.lang.String userUuid) {
302 _announcementsEntry.setUserUuid(userUuid);
303 }
304
305
310 @Override
311 public java.lang.String getUserName() {
312 return _announcementsEntry.getUserName();
313 }
314
315
320 @Override
321 public void setUserName(java.lang.String userName) {
322 _announcementsEntry.setUserName(userName);
323 }
324
325
330 @Override
331 public java.util.Date getCreateDate() {
332 return _announcementsEntry.getCreateDate();
333 }
334
335
340 @Override
341 public void setCreateDate(java.util.Date createDate) {
342 _announcementsEntry.setCreateDate(createDate);
343 }
344
345
350 @Override
351 public java.util.Date getModifiedDate() {
352 return _announcementsEntry.getModifiedDate();
353 }
354
355
360 @Override
361 public void setModifiedDate(java.util.Date modifiedDate) {
362 _announcementsEntry.setModifiedDate(modifiedDate);
363 }
364
365
370 @Override
371 public java.lang.String getClassName() {
372 return _announcementsEntry.getClassName();
373 }
374
375 @Override
376 public void setClassName(java.lang.String className) {
377 _announcementsEntry.setClassName(className);
378 }
379
380
385 @Override
386 public long getClassNameId() {
387 return _announcementsEntry.getClassNameId();
388 }
389
390
395 @Override
396 public void setClassNameId(long classNameId) {
397 _announcementsEntry.setClassNameId(classNameId);
398 }
399
400
405 @Override
406 public long getClassPK() {
407 return _announcementsEntry.getClassPK();
408 }
409
410
415 @Override
416 public void setClassPK(long classPK) {
417 _announcementsEntry.setClassPK(classPK);
418 }
419
420
425 @Override
426 public java.lang.String getTitle() {
427 return _announcementsEntry.getTitle();
428 }
429
430
435 @Override
436 public void setTitle(java.lang.String title) {
437 _announcementsEntry.setTitle(title);
438 }
439
440
445 @Override
446 public java.lang.String getContent() {
447 return _announcementsEntry.getContent();
448 }
449
450
455 @Override
456 public void setContent(java.lang.String content) {
457 _announcementsEntry.setContent(content);
458 }
459
460
465 @Override
466 public java.lang.String getUrl() {
467 return _announcementsEntry.getUrl();
468 }
469
470
475 @Override
476 public void setUrl(java.lang.String url) {
477 _announcementsEntry.setUrl(url);
478 }
479
480
485 @Override
486 public java.lang.String getType() {
487 return _announcementsEntry.getType();
488 }
489
490
495 @Override
496 public void setType(java.lang.String type) {
497 _announcementsEntry.setType(type);
498 }
499
500
505 @Override
506 public java.util.Date getDisplayDate() {
507 return _announcementsEntry.getDisplayDate();
508 }
509
510
515 @Override
516 public void setDisplayDate(java.util.Date displayDate) {
517 _announcementsEntry.setDisplayDate(displayDate);
518 }
519
520
525 @Override
526 public java.util.Date getExpirationDate() {
527 return _announcementsEntry.getExpirationDate();
528 }
529
530
535 @Override
536 public void setExpirationDate(java.util.Date expirationDate) {
537 _announcementsEntry.setExpirationDate(expirationDate);
538 }
539
540
545 @Override
546 public int getPriority() {
547 return _announcementsEntry.getPriority();
548 }
549
550
555 @Override
556 public void setPriority(int priority) {
557 _announcementsEntry.setPriority(priority);
558 }
559
560
565 @Override
566 public boolean getAlert() {
567 return _announcementsEntry.getAlert();
568 }
569
570
575 @Override
576 public boolean isAlert() {
577 return _announcementsEntry.isAlert();
578 }
579
580
585 @Override
586 public void setAlert(boolean alert) {
587 _announcementsEntry.setAlert(alert);
588 }
589
590 @Override
591 public boolean isNew() {
592 return _announcementsEntry.isNew();
593 }
594
595 @Override
596 public void setNew(boolean n) {
597 _announcementsEntry.setNew(n);
598 }
599
600 @Override
601 public boolean isCachedModel() {
602 return _announcementsEntry.isCachedModel();
603 }
604
605 @Override
606 public void setCachedModel(boolean cachedModel) {
607 _announcementsEntry.setCachedModel(cachedModel);
608 }
609
610 @Override
611 public boolean isEscapedModel() {
612 return _announcementsEntry.isEscapedModel();
613 }
614
615 @Override
616 public java.io.Serializable getPrimaryKeyObj() {
617 return _announcementsEntry.getPrimaryKeyObj();
618 }
619
620 @Override
621 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
622 _announcementsEntry.setPrimaryKeyObj(primaryKeyObj);
623 }
624
625 @Override
626 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
627 return _announcementsEntry.getExpandoBridge();
628 }
629
630 @Override
631 public void setExpandoBridgeAttributes(
632 com.liferay.portal.model.BaseModel<?> baseModel) {
633 _announcementsEntry.setExpandoBridgeAttributes(baseModel);
634 }
635
636 @Override
637 public void setExpandoBridgeAttributes(
638 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
639 _announcementsEntry.setExpandoBridgeAttributes(expandoBridge);
640 }
641
642 @Override
643 public void setExpandoBridgeAttributes(
644 com.liferay.portal.service.ServiceContext serviceContext) {
645 _announcementsEntry.setExpandoBridgeAttributes(serviceContext);
646 }
647
648 @Override
649 public java.lang.Object clone() {
650 return new AnnouncementsEntryWrapper((AnnouncementsEntry)_announcementsEntry.clone());
651 }
652
653 @Override
654 public int compareTo(
655 com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry) {
656 return _announcementsEntry.compareTo(announcementsEntry);
657 }
658
659 @Override
660 public int hashCode() {
661 return _announcementsEntry.hashCode();
662 }
663
664 @Override
665 public com.liferay.portal.model.CacheModel<com.liferay.portlet.announcements.model.AnnouncementsEntry> toCacheModel() {
666 return _announcementsEntry.toCacheModel();
667 }
668
669 @Override
670 public com.liferay.portlet.announcements.model.AnnouncementsEntry toEscapedModel() {
671 return new AnnouncementsEntryWrapper(_announcementsEntry.toEscapedModel());
672 }
673
674 @Override
675 public com.liferay.portlet.announcements.model.AnnouncementsEntry toUnescapedModel() {
676 return new AnnouncementsEntryWrapper(_announcementsEntry.toUnescapedModel());
677 }
678
679 @Override
680 public java.lang.String toString() {
681 return _announcementsEntry.toString();
682 }
683
684 @Override
685 public java.lang.String toXmlString() {
686 return _announcementsEntry.toXmlString();
687 }
688
689 @Override
690 public void persist()
691 throws com.liferay.portal.kernel.exception.SystemException {
692 _announcementsEntry.persist();
693 }
694
695 @Override
696 public long getGroupId()
697 throws com.liferay.portal.kernel.exception.PortalException,
698 com.liferay.portal.kernel.exception.SystemException {
699 return _announcementsEntry.getGroupId();
700 }
701
702 @Override
703 public boolean equals(Object obj) {
704 if (this == obj) {
705 return true;
706 }
707
708 if (!(obj instanceof AnnouncementsEntryWrapper)) {
709 return false;
710 }
711
712 AnnouncementsEntryWrapper announcementsEntryWrapper = (AnnouncementsEntryWrapper)obj;
713
714 if (Validator.equals(_announcementsEntry,
715 announcementsEntryWrapper._announcementsEntry)) {
716 return true;
717 }
718
719 return false;
720 }
721
722 @Override
723 public StagedModelType getStagedModelType() {
724 return _announcementsEntry.getStagedModelType();
725 }
726
727
730 public AnnouncementsEntry getWrappedAnnouncementsEntry() {
731 return _announcementsEntry;
732 }
733
734 @Override
735 public AnnouncementsEntry getWrappedModel() {
736 return _announcementsEntry;
737 }
738
739 @Override
740 public void resetOriginalValues() {
741 _announcementsEntry.resetOriginalValues();
742 }
743
744 private AnnouncementsEntry _announcementsEntry;
745 }