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