001
014
015 package com.liferay.portlet.calendar.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
032 public class CalEventWrapper implements CalEvent, ModelWrapper<CalEvent> {
033 public CalEventWrapper(CalEvent calEvent) {
034 _calEvent = calEvent;
035 }
036
037 public Class<?> getModelClass() {
038 return CalEvent.class;
039 }
040
041 public String getModelClassName() {
042 return CalEvent.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("uuid", getUuid());
049 attributes.put("eventId", getEventId());
050 attributes.put("groupId", getGroupId());
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("title", getTitle());
057 attributes.put("description", getDescription());
058 attributes.put("location", getLocation());
059 attributes.put("startDate", getStartDate());
060 attributes.put("endDate", getEndDate());
061 attributes.put("durationHour", getDurationHour());
062 attributes.put("durationMinute", getDurationMinute());
063 attributes.put("allDay", getAllDay());
064 attributes.put("timeZoneSensitive", getTimeZoneSensitive());
065 attributes.put("type", getType());
066 attributes.put("repeating", getRepeating());
067 attributes.put("recurrence", getRecurrence());
068 attributes.put("remindBy", getRemindBy());
069 attributes.put("firstReminder", getFirstReminder());
070 attributes.put("secondReminder", getSecondReminder());
071
072 return attributes;
073 }
074
075 public void setModelAttributes(Map<String, Object> attributes) {
076 String uuid = (String)attributes.get("uuid");
077
078 if (uuid != null) {
079 setUuid(uuid);
080 }
081
082 Long eventId = (Long)attributes.get("eventId");
083
084 if (eventId != null) {
085 setEventId(eventId);
086 }
087
088 Long groupId = (Long)attributes.get("groupId");
089
090 if (groupId != null) {
091 setGroupId(groupId);
092 }
093
094 Long companyId = (Long)attributes.get("companyId");
095
096 if (companyId != null) {
097 setCompanyId(companyId);
098 }
099
100 Long userId = (Long)attributes.get("userId");
101
102 if (userId != null) {
103 setUserId(userId);
104 }
105
106 String userName = (String)attributes.get("userName");
107
108 if (userName != null) {
109 setUserName(userName);
110 }
111
112 Date createDate = (Date)attributes.get("createDate");
113
114 if (createDate != null) {
115 setCreateDate(createDate);
116 }
117
118 Date modifiedDate = (Date)attributes.get("modifiedDate");
119
120 if (modifiedDate != null) {
121 setModifiedDate(modifiedDate);
122 }
123
124 String title = (String)attributes.get("title");
125
126 if (title != null) {
127 setTitle(title);
128 }
129
130 String description = (String)attributes.get("description");
131
132 if (description != null) {
133 setDescription(description);
134 }
135
136 String location = (String)attributes.get("location");
137
138 if (location != null) {
139 setLocation(location);
140 }
141
142 Date startDate = (Date)attributes.get("startDate");
143
144 if (startDate != null) {
145 setStartDate(startDate);
146 }
147
148 Date endDate = (Date)attributes.get("endDate");
149
150 if (endDate != null) {
151 setEndDate(endDate);
152 }
153
154 Integer durationHour = (Integer)attributes.get("durationHour");
155
156 if (durationHour != null) {
157 setDurationHour(durationHour);
158 }
159
160 Integer durationMinute = (Integer)attributes.get("durationMinute");
161
162 if (durationMinute != null) {
163 setDurationMinute(durationMinute);
164 }
165
166 Boolean allDay = (Boolean)attributes.get("allDay");
167
168 if (allDay != null) {
169 setAllDay(allDay);
170 }
171
172 Boolean timeZoneSensitive = (Boolean)attributes.get("timeZoneSensitive");
173
174 if (timeZoneSensitive != null) {
175 setTimeZoneSensitive(timeZoneSensitive);
176 }
177
178 String type = (String)attributes.get("type");
179
180 if (type != null) {
181 setType(type);
182 }
183
184 Boolean repeating = (Boolean)attributes.get("repeating");
185
186 if (repeating != null) {
187 setRepeating(repeating);
188 }
189
190 String recurrence = (String)attributes.get("recurrence");
191
192 if (recurrence != null) {
193 setRecurrence(recurrence);
194 }
195
196 Integer remindBy = (Integer)attributes.get("remindBy");
197
198 if (remindBy != null) {
199 setRemindBy(remindBy);
200 }
201
202 Integer firstReminder = (Integer)attributes.get("firstReminder");
203
204 if (firstReminder != null) {
205 setFirstReminder(firstReminder);
206 }
207
208 Integer secondReminder = (Integer)attributes.get("secondReminder");
209
210 if (secondReminder != null) {
211 setSecondReminder(secondReminder);
212 }
213 }
214
215
220 public long getPrimaryKey() {
221 return _calEvent.getPrimaryKey();
222 }
223
224
229 public void setPrimaryKey(long primaryKey) {
230 _calEvent.setPrimaryKey(primaryKey);
231 }
232
233
238 public java.lang.String getUuid() {
239 return _calEvent.getUuid();
240 }
241
242
247 public void setUuid(java.lang.String uuid) {
248 _calEvent.setUuid(uuid);
249 }
250
251
256 public long getEventId() {
257 return _calEvent.getEventId();
258 }
259
260
265 public void setEventId(long eventId) {
266 _calEvent.setEventId(eventId);
267 }
268
269
274 public long getGroupId() {
275 return _calEvent.getGroupId();
276 }
277
278
283 public void setGroupId(long groupId) {
284 _calEvent.setGroupId(groupId);
285 }
286
287
292 public long getCompanyId() {
293 return _calEvent.getCompanyId();
294 }
295
296
301 public void setCompanyId(long companyId) {
302 _calEvent.setCompanyId(companyId);
303 }
304
305
310 public long getUserId() {
311 return _calEvent.getUserId();
312 }
313
314
319 public void setUserId(long userId) {
320 _calEvent.setUserId(userId);
321 }
322
323
329 public java.lang.String getUserUuid()
330 throws com.liferay.portal.kernel.exception.SystemException {
331 return _calEvent.getUserUuid();
332 }
333
334
339 public void setUserUuid(java.lang.String userUuid) {
340 _calEvent.setUserUuid(userUuid);
341 }
342
343
348 public java.lang.String getUserName() {
349 return _calEvent.getUserName();
350 }
351
352
357 public void setUserName(java.lang.String userName) {
358 _calEvent.setUserName(userName);
359 }
360
361
366 public java.util.Date getCreateDate() {
367 return _calEvent.getCreateDate();
368 }
369
370
375 public void setCreateDate(java.util.Date createDate) {
376 _calEvent.setCreateDate(createDate);
377 }
378
379
384 public java.util.Date getModifiedDate() {
385 return _calEvent.getModifiedDate();
386 }
387
388
393 public void setModifiedDate(java.util.Date modifiedDate) {
394 _calEvent.setModifiedDate(modifiedDate);
395 }
396
397
402 public java.lang.String getTitle() {
403 return _calEvent.getTitle();
404 }
405
406
411 public void setTitle(java.lang.String title) {
412 _calEvent.setTitle(title);
413 }
414
415
420 public java.lang.String getDescription() {
421 return _calEvent.getDescription();
422 }
423
424
429 public void setDescription(java.lang.String description) {
430 _calEvent.setDescription(description);
431 }
432
433
438 public java.lang.String getLocation() {
439 return _calEvent.getLocation();
440 }
441
442
447 public void setLocation(java.lang.String location) {
448 _calEvent.setLocation(location);
449 }
450
451
456 public java.util.Date getStartDate() {
457 return _calEvent.getStartDate();
458 }
459
460
465 public void setStartDate(java.util.Date startDate) {
466 _calEvent.setStartDate(startDate);
467 }
468
469
474 public java.util.Date getEndDate() {
475 return _calEvent.getEndDate();
476 }
477
478
483 public void setEndDate(java.util.Date endDate) {
484 _calEvent.setEndDate(endDate);
485 }
486
487
492 public int getDurationHour() {
493 return _calEvent.getDurationHour();
494 }
495
496
501 public void setDurationHour(int durationHour) {
502 _calEvent.setDurationHour(durationHour);
503 }
504
505
510 public int getDurationMinute() {
511 return _calEvent.getDurationMinute();
512 }
513
514
519 public void setDurationMinute(int durationMinute) {
520 _calEvent.setDurationMinute(durationMinute);
521 }
522
523
528 public boolean getAllDay() {
529 return _calEvent.getAllDay();
530 }
531
532
537 public boolean isAllDay() {
538 return _calEvent.isAllDay();
539 }
540
541
546 public void setAllDay(boolean allDay) {
547 _calEvent.setAllDay(allDay);
548 }
549
550
555 public boolean getTimeZoneSensitive() {
556 return _calEvent.getTimeZoneSensitive();
557 }
558
559
564 public boolean isTimeZoneSensitive() {
565 return _calEvent.isTimeZoneSensitive();
566 }
567
568
573 public void setTimeZoneSensitive(boolean timeZoneSensitive) {
574 _calEvent.setTimeZoneSensitive(timeZoneSensitive);
575 }
576
577
582 public java.lang.String getType() {
583 return _calEvent.getType();
584 }
585
586
591 public void setType(java.lang.String type) {
592 _calEvent.setType(type);
593 }
594
595
600 public boolean getRepeating() {
601 return _calEvent.getRepeating();
602 }
603
604
609 public boolean isRepeating() {
610 return _calEvent.isRepeating();
611 }
612
613
618 public void setRepeating(boolean repeating) {
619 _calEvent.setRepeating(repeating);
620 }
621
622
627 public java.lang.String getRecurrence() {
628 return _calEvent.getRecurrence();
629 }
630
631
636 public void setRecurrence(java.lang.String recurrence) {
637 _calEvent.setRecurrence(recurrence);
638 }
639
640
645 public int getRemindBy() {
646 return _calEvent.getRemindBy();
647 }
648
649
654 public void setRemindBy(int remindBy) {
655 _calEvent.setRemindBy(remindBy);
656 }
657
658
663 public int getFirstReminder() {
664 return _calEvent.getFirstReminder();
665 }
666
667
672 public void setFirstReminder(int firstReminder) {
673 _calEvent.setFirstReminder(firstReminder);
674 }
675
676
681 public int getSecondReminder() {
682 return _calEvent.getSecondReminder();
683 }
684
685
690 public void setSecondReminder(int secondReminder) {
691 _calEvent.setSecondReminder(secondReminder);
692 }
693
694 public boolean isNew() {
695 return _calEvent.isNew();
696 }
697
698 public void setNew(boolean n) {
699 _calEvent.setNew(n);
700 }
701
702 public boolean isCachedModel() {
703 return _calEvent.isCachedModel();
704 }
705
706 public void setCachedModel(boolean cachedModel) {
707 _calEvent.setCachedModel(cachedModel);
708 }
709
710 public boolean isEscapedModel() {
711 return _calEvent.isEscapedModel();
712 }
713
714 public java.io.Serializable getPrimaryKeyObj() {
715 return _calEvent.getPrimaryKeyObj();
716 }
717
718 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
719 _calEvent.setPrimaryKeyObj(primaryKeyObj);
720 }
721
722 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
723 return _calEvent.getExpandoBridge();
724 }
725
726 public void setExpandoBridgeAttributes(
727 com.liferay.portal.service.ServiceContext serviceContext) {
728 _calEvent.setExpandoBridgeAttributes(serviceContext);
729 }
730
731 @Override
732 public java.lang.Object clone() {
733 return new CalEventWrapper((CalEvent)_calEvent.clone());
734 }
735
736 public int compareTo(com.liferay.portlet.calendar.model.CalEvent calEvent) {
737 return _calEvent.compareTo(calEvent);
738 }
739
740 @Override
741 public int hashCode() {
742 return _calEvent.hashCode();
743 }
744
745 public com.liferay.portal.model.CacheModel<com.liferay.portlet.calendar.model.CalEvent> toCacheModel() {
746 return _calEvent.toCacheModel();
747 }
748
749 public com.liferay.portlet.calendar.model.CalEvent toEscapedModel() {
750 return new CalEventWrapper(_calEvent.toEscapedModel());
751 }
752
753 public com.liferay.portlet.calendar.model.CalEvent toUnescapedModel() {
754 return new CalEventWrapper(_calEvent.toUnescapedModel());
755 }
756
757 @Override
758 public java.lang.String toString() {
759 return _calEvent.toString();
760 }
761
762 public java.lang.String toXmlString() {
763 return _calEvent.toXmlString();
764 }
765
766 public void persist()
767 throws com.liferay.portal.kernel.exception.SystemException {
768 _calEvent.persist();
769 }
770
771 public com.liferay.portal.kernel.cal.TZSRecurrence getRecurrenceObj() {
772 return _calEvent.getRecurrenceObj();
773 }
774
775 public void setRecurrenceObj(
776 com.liferay.portal.kernel.cal.TZSRecurrence recurrenceObj) {
777 _calEvent.setRecurrenceObj(recurrenceObj);
778 }
779
780
783 public CalEvent getWrappedCalEvent() {
784 return _calEvent;
785 }
786
787 public CalEvent getWrappedModel() {
788 return _calEvent;
789 }
790
791 public void resetOriginalValues() {
792 _calEvent.resetOriginalValues();
793 }
794
795 private CalEvent _calEvent;
796 }