001
014
015 package com.liferay.portlet.announcements.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class AnnouncementsEntryWrapper implements AnnouncementsEntry,
034 ModelWrapper<AnnouncementsEntry> {
035 public AnnouncementsEntryWrapper(AnnouncementsEntry announcementsEntry) {
036 _announcementsEntry = announcementsEntry;
037 }
038
039 public Class<?> getModelClass() {
040 return AnnouncementsEntry.class;
041 }
042
043 public String getModelClassName() {
044 return AnnouncementsEntry.class.getName();
045 }
046
047 public Map<String, Object> getModelAttributes() {
048 Map<String, Object> attributes = new HashMap<String, Object>();
049
050 attributes.put("uuid", getUuid());
051 attributes.put("entryId", getEntryId());
052 attributes.put("companyId", getCompanyId());
053 attributes.put("userId", getUserId());
054 attributes.put("userName", getUserName());
055 attributes.put("createDate", getCreateDate());
056 attributes.put("modifiedDate", getModifiedDate());
057 attributes.put("classNameId", getClassNameId());
058 attributes.put("classPK", getClassPK());
059 attributes.put("title", getTitle());
060 attributes.put("content", getContent());
061 attributes.put("url", getUrl());
062 attributes.put("type", getType());
063 attributes.put("displayDate", getDisplayDate());
064 attributes.put("expirationDate", getExpirationDate());
065 attributes.put("priority", getPriority());
066 attributes.put("alert", getAlert());
067
068 return attributes;
069 }
070
071 public void setModelAttributes(Map<String, Object> attributes) {
072 String uuid = (String)attributes.get("uuid");
073
074 if (uuid != null) {
075 setUuid(uuid);
076 }
077
078 Long entryId = (Long)attributes.get("entryId");
079
080 if (entryId != null) {
081 setEntryId(entryId);
082 }
083
084 Long companyId = (Long)attributes.get("companyId");
085
086 if (companyId != null) {
087 setCompanyId(companyId);
088 }
089
090 Long userId = (Long)attributes.get("userId");
091
092 if (userId != null) {
093 setUserId(userId);
094 }
095
096 String userName = (String)attributes.get("userName");
097
098 if (userName != null) {
099 setUserName(userName);
100 }
101
102 Date createDate = (Date)attributes.get("createDate");
103
104 if (createDate != null) {
105 setCreateDate(createDate);
106 }
107
108 Date modifiedDate = (Date)attributes.get("modifiedDate");
109
110 if (modifiedDate != null) {
111 setModifiedDate(modifiedDate);
112 }
113
114 Long classNameId = (Long)attributes.get("classNameId");
115
116 if (classNameId != null) {
117 setClassNameId(classNameId);
118 }
119
120 Long classPK = (Long)attributes.get("classPK");
121
122 if (classPK != null) {
123 setClassPK(classPK);
124 }
125
126 String title = (String)attributes.get("title");
127
128 if (title != null) {
129 setTitle(title);
130 }
131
132 String content = (String)attributes.get("content");
133
134 if (content != null) {
135 setContent(content);
136 }
137
138 String url = (String)attributes.get("url");
139
140 if (url != null) {
141 setUrl(url);
142 }
143
144 String type = (String)attributes.get("type");
145
146 if (type != null) {
147 setType(type);
148 }
149
150 Date displayDate = (Date)attributes.get("displayDate");
151
152 if (displayDate != null) {
153 setDisplayDate(displayDate);
154 }
155
156 Date expirationDate = (Date)attributes.get("expirationDate");
157
158 if (expirationDate != null) {
159 setExpirationDate(expirationDate);
160 }
161
162 Integer priority = (Integer)attributes.get("priority");
163
164 if (priority != null) {
165 setPriority(priority);
166 }
167
168 Boolean alert = (Boolean)attributes.get("alert");
169
170 if (alert != null) {
171 setAlert(alert);
172 }
173 }
174
175
180 public long getPrimaryKey() {
181 return _announcementsEntry.getPrimaryKey();
182 }
183
184
189 public void setPrimaryKey(long primaryKey) {
190 _announcementsEntry.setPrimaryKey(primaryKey);
191 }
192
193
198 public java.lang.String getUuid() {
199 return _announcementsEntry.getUuid();
200 }
201
202
207 public void setUuid(java.lang.String uuid) {
208 _announcementsEntry.setUuid(uuid);
209 }
210
211
216 public long getEntryId() {
217 return _announcementsEntry.getEntryId();
218 }
219
220
225 public void setEntryId(long entryId) {
226 _announcementsEntry.setEntryId(entryId);
227 }
228
229
234 public long getCompanyId() {
235 return _announcementsEntry.getCompanyId();
236 }
237
238
243 public void setCompanyId(long companyId) {
244 _announcementsEntry.setCompanyId(companyId);
245 }
246
247
252 public long getUserId() {
253 return _announcementsEntry.getUserId();
254 }
255
256
261 public void setUserId(long userId) {
262 _announcementsEntry.setUserId(userId);
263 }
264
265
271 public java.lang.String getUserUuid()
272 throws com.liferay.portal.kernel.exception.SystemException {
273 return _announcementsEntry.getUserUuid();
274 }
275
276
281 public void setUserUuid(java.lang.String userUuid) {
282 _announcementsEntry.setUserUuid(userUuid);
283 }
284
285
290 public java.lang.String getUserName() {
291 return _announcementsEntry.getUserName();
292 }
293
294
299 public void setUserName(java.lang.String userName) {
300 _announcementsEntry.setUserName(userName);
301 }
302
303
308 public java.util.Date getCreateDate() {
309 return _announcementsEntry.getCreateDate();
310 }
311
312
317 public void setCreateDate(java.util.Date createDate) {
318 _announcementsEntry.setCreateDate(createDate);
319 }
320
321
326 public java.util.Date getModifiedDate() {
327 return _announcementsEntry.getModifiedDate();
328 }
329
330
335 public void setModifiedDate(java.util.Date modifiedDate) {
336 _announcementsEntry.setModifiedDate(modifiedDate);
337 }
338
339
344 public java.lang.String getClassName() {
345 return _announcementsEntry.getClassName();
346 }
347
348 public void setClassName(java.lang.String className) {
349 _announcementsEntry.setClassName(className);
350 }
351
352
357 public long getClassNameId() {
358 return _announcementsEntry.getClassNameId();
359 }
360
361
366 public void setClassNameId(long classNameId) {
367 _announcementsEntry.setClassNameId(classNameId);
368 }
369
370
375 public long getClassPK() {
376 return _announcementsEntry.getClassPK();
377 }
378
379
384 public void setClassPK(long classPK) {
385 _announcementsEntry.setClassPK(classPK);
386 }
387
388
393 public java.lang.String getTitle() {
394 return _announcementsEntry.getTitle();
395 }
396
397
402 public void setTitle(java.lang.String title) {
403 _announcementsEntry.setTitle(title);
404 }
405
406
411 public java.lang.String getContent() {
412 return _announcementsEntry.getContent();
413 }
414
415
420 public void setContent(java.lang.String content) {
421 _announcementsEntry.setContent(content);
422 }
423
424
429 public java.lang.String getUrl() {
430 return _announcementsEntry.getUrl();
431 }
432
433
438 public void setUrl(java.lang.String url) {
439 _announcementsEntry.setUrl(url);
440 }
441
442
447 public java.lang.String getType() {
448 return _announcementsEntry.getType();
449 }
450
451
456 public void setType(java.lang.String type) {
457 _announcementsEntry.setType(type);
458 }
459
460
465 public java.util.Date getDisplayDate() {
466 return _announcementsEntry.getDisplayDate();
467 }
468
469
474 public void setDisplayDate(java.util.Date displayDate) {
475 _announcementsEntry.setDisplayDate(displayDate);
476 }
477
478
483 public java.util.Date getExpirationDate() {
484 return _announcementsEntry.getExpirationDate();
485 }
486
487
492 public void setExpirationDate(java.util.Date expirationDate) {
493 _announcementsEntry.setExpirationDate(expirationDate);
494 }
495
496
501 public int getPriority() {
502 return _announcementsEntry.getPriority();
503 }
504
505
510 public void setPriority(int priority) {
511 _announcementsEntry.setPriority(priority);
512 }
513
514
519 public boolean getAlert() {
520 return _announcementsEntry.getAlert();
521 }
522
523
528 public boolean isAlert() {
529 return _announcementsEntry.isAlert();
530 }
531
532
537 public void setAlert(boolean alert) {
538 _announcementsEntry.setAlert(alert);
539 }
540
541 public boolean isNew() {
542 return _announcementsEntry.isNew();
543 }
544
545 public void setNew(boolean n) {
546 _announcementsEntry.setNew(n);
547 }
548
549 public boolean isCachedModel() {
550 return _announcementsEntry.isCachedModel();
551 }
552
553 public void setCachedModel(boolean cachedModel) {
554 _announcementsEntry.setCachedModel(cachedModel);
555 }
556
557 public boolean isEscapedModel() {
558 return _announcementsEntry.isEscapedModel();
559 }
560
561 public java.io.Serializable getPrimaryKeyObj() {
562 return _announcementsEntry.getPrimaryKeyObj();
563 }
564
565 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
566 _announcementsEntry.setPrimaryKeyObj(primaryKeyObj);
567 }
568
569 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
570 return _announcementsEntry.getExpandoBridge();
571 }
572
573 public void setExpandoBridgeAttributes(
574 com.liferay.portal.service.ServiceContext serviceContext) {
575 _announcementsEntry.setExpandoBridgeAttributes(serviceContext);
576 }
577
578 @Override
579 public java.lang.Object clone() {
580 return new AnnouncementsEntryWrapper((AnnouncementsEntry)_announcementsEntry.clone());
581 }
582
583 public int compareTo(
584 com.liferay.portlet.announcements.model.AnnouncementsEntry announcementsEntry) {
585 return _announcementsEntry.compareTo(announcementsEntry);
586 }
587
588 @Override
589 public int hashCode() {
590 return _announcementsEntry.hashCode();
591 }
592
593 public com.liferay.portal.model.CacheModel<com.liferay.portlet.announcements.model.AnnouncementsEntry> toCacheModel() {
594 return _announcementsEntry.toCacheModel();
595 }
596
597 public com.liferay.portlet.announcements.model.AnnouncementsEntry toEscapedModel() {
598 return new AnnouncementsEntryWrapper(_announcementsEntry.toEscapedModel());
599 }
600
601 public com.liferay.portlet.announcements.model.AnnouncementsEntry toUnescapedModel() {
602 return new AnnouncementsEntryWrapper(_announcementsEntry.toUnescapedModel());
603 }
604
605 @Override
606 public java.lang.String toString() {
607 return _announcementsEntry.toString();
608 }
609
610 public java.lang.String toXmlString() {
611 return _announcementsEntry.toXmlString();
612 }
613
614 public void persist()
615 throws com.liferay.portal.kernel.exception.SystemException {
616 _announcementsEntry.persist();
617 }
618
619 public long getGroupId()
620 throws com.liferay.portal.kernel.exception.PortalException,
621 com.liferay.portal.kernel.exception.SystemException {
622 return _announcementsEntry.getGroupId();
623 }
624
625 @Override
626 public boolean equals(Object obj) {
627 if (this == obj) {
628 return true;
629 }
630
631 if (!(obj instanceof AnnouncementsEntryWrapper)) {
632 return false;
633 }
634
635 AnnouncementsEntryWrapper announcementsEntryWrapper = (AnnouncementsEntryWrapper)obj;
636
637 if (Validator.equals(_announcementsEntry,
638 announcementsEntryWrapper._announcementsEntry)) {
639 return true;
640 }
641
642 return false;
643 }
644
645
648 public AnnouncementsEntry getWrappedAnnouncementsEntry() {
649 return _announcementsEntry;
650 }
651
652 public AnnouncementsEntry getWrappedModel() {
653 return _announcementsEntry;
654 }
655
656 public void resetOriginalValues() {
657 _announcementsEntry.resetOriginalValues();
658 }
659
660 private AnnouncementsEntry _announcementsEntry;
661 }