001
014
015 package com.liferay.portlet.calendar.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 CalEventWrapper implements CalEvent, ModelWrapper<CalEvent> {
038 public CalEventWrapper(CalEvent calEvent) {
039 _calEvent = calEvent;
040 }
041
042 @Override
043 public Class<?> getModelClass() {
044 return CalEvent.class;
045 }
046
047 @Override
048 public String getModelClassName() {
049 return CalEvent.class.getName();
050 }
051
052 @Override
053 public Map<String, Object> getModelAttributes() {
054 Map<String, Object> attributes = new HashMap<String, Object>();
055
056 attributes.put("uuid", getUuid());
057 attributes.put("eventId", getEventId());
058 attributes.put("groupId", getGroupId());
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("title", getTitle());
065 attributes.put("description", getDescription());
066 attributes.put("location", getLocation());
067 attributes.put("startDate", getStartDate());
068 attributes.put("endDate", getEndDate());
069 attributes.put("durationHour", getDurationHour());
070 attributes.put("durationMinute", getDurationMinute());
071 attributes.put("allDay", getAllDay());
072 attributes.put("timeZoneSensitive", getTimeZoneSensitive());
073 attributes.put("type", getType());
074 attributes.put("repeating", getRepeating());
075 attributes.put("recurrence", getRecurrence());
076 attributes.put("remindBy", getRemindBy());
077 attributes.put("firstReminder", getFirstReminder());
078 attributes.put("secondReminder", getSecondReminder());
079
080 return attributes;
081 }
082
083 @Override
084 public void setModelAttributes(Map<String, Object> attributes) {
085 String uuid = (String)attributes.get("uuid");
086
087 if (uuid != null) {
088 setUuid(uuid);
089 }
090
091 Long eventId = (Long)attributes.get("eventId");
092
093 if (eventId != null) {
094 setEventId(eventId);
095 }
096
097 Long groupId = (Long)attributes.get("groupId");
098
099 if (groupId != null) {
100 setGroupId(groupId);
101 }
102
103 Long companyId = (Long)attributes.get("companyId");
104
105 if (companyId != null) {
106 setCompanyId(companyId);
107 }
108
109 Long userId = (Long)attributes.get("userId");
110
111 if (userId != null) {
112 setUserId(userId);
113 }
114
115 String userName = (String)attributes.get("userName");
116
117 if (userName != null) {
118 setUserName(userName);
119 }
120
121 Date createDate = (Date)attributes.get("createDate");
122
123 if (createDate != null) {
124 setCreateDate(createDate);
125 }
126
127 Date modifiedDate = (Date)attributes.get("modifiedDate");
128
129 if (modifiedDate != null) {
130 setModifiedDate(modifiedDate);
131 }
132
133 String title = (String)attributes.get("title");
134
135 if (title != null) {
136 setTitle(title);
137 }
138
139 String description = (String)attributes.get("description");
140
141 if (description != null) {
142 setDescription(description);
143 }
144
145 String location = (String)attributes.get("location");
146
147 if (location != null) {
148 setLocation(location);
149 }
150
151 Date startDate = (Date)attributes.get("startDate");
152
153 if (startDate != null) {
154 setStartDate(startDate);
155 }
156
157 Date endDate = (Date)attributes.get("endDate");
158
159 if (endDate != null) {
160 setEndDate(endDate);
161 }
162
163 Integer durationHour = (Integer)attributes.get("durationHour");
164
165 if (durationHour != null) {
166 setDurationHour(durationHour);
167 }
168
169 Integer durationMinute = (Integer)attributes.get("durationMinute");
170
171 if (durationMinute != null) {
172 setDurationMinute(durationMinute);
173 }
174
175 Boolean allDay = (Boolean)attributes.get("allDay");
176
177 if (allDay != null) {
178 setAllDay(allDay);
179 }
180
181 Boolean timeZoneSensitive = (Boolean)attributes.get("timeZoneSensitive");
182
183 if (timeZoneSensitive != null) {
184 setTimeZoneSensitive(timeZoneSensitive);
185 }
186
187 String type = (String)attributes.get("type");
188
189 if (type != null) {
190 setType(type);
191 }
192
193 Boolean repeating = (Boolean)attributes.get("repeating");
194
195 if (repeating != null) {
196 setRepeating(repeating);
197 }
198
199 String recurrence = (String)attributes.get("recurrence");
200
201 if (recurrence != null) {
202 setRecurrence(recurrence);
203 }
204
205 Integer remindBy = (Integer)attributes.get("remindBy");
206
207 if (remindBy != null) {
208 setRemindBy(remindBy);
209 }
210
211 Integer firstReminder = (Integer)attributes.get("firstReminder");
212
213 if (firstReminder != null) {
214 setFirstReminder(firstReminder);
215 }
216
217 Integer secondReminder = (Integer)attributes.get("secondReminder");
218
219 if (secondReminder != null) {
220 setSecondReminder(secondReminder);
221 }
222 }
223
224
229 @Override
230 public long getPrimaryKey() {
231 return _calEvent.getPrimaryKey();
232 }
233
234
239 @Override
240 public void setPrimaryKey(long primaryKey) {
241 _calEvent.setPrimaryKey(primaryKey);
242 }
243
244
249 @Override
250 public java.lang.String getUuid() {
251 return _calEvent.getUuid();
252 }
253
254
259 @Override
260 public void setUuid(java.lang.String uuid) {
261 _calEvent.setUuid(uuid);
262 }
263
264
269 @Override
270 public long getEventId() {
271 return _calEvent.getEventId();
272 }
273
274
279 @Override
280 public void setEventId(long eventId) {
281 _calEvent.setEventId(eventId);
282 }
283
284
289 @Override
290 public long getGroupId() {
291 return _calEvent.getGroupId();
292 }
293
294
299 @Override
300 public void setGroupId(long groupId) {
301 _calEvent.setGroupId(groupId);
302 }
303
304
309 @Override
310 public long getCompanyId() {
311 return _calEvent.getCompanyId();
312 }
313
314
319 @Override
320 public void setCompanyId(long companyId) {
321 _calEvent.setCompanyId(companyId);
322 }
323
324
329 @Override
330 public long getUserId() {
331 return _calEvent.getUserId();
332 }
333
334
339 @Override
340 public void setUserId(long userId) {
341 _calEvent.setUserId(userId);
342 }
343
344
350 @Override
351 public java.lang.String getUserUuid()
352 throws com.liferay.portal.kernel.exception.SystemException {
353 return _calEvent.getUserUuid();
354 }
355
356
361 @Override
362 public void setUserUuid(java.lang.String userUuid) {
363 _calEvent.setUserUuid(userUuid);
364 }
365
366
371 @Override
372 public java.lang.String getUserName() {
373 return _calEvent.getUserName();
374 }
375
376
381 @Override
382 public void setUserName(java.lang.String userName) {
383 _calEvent.setUserName(userName);
384 }
385
386
391 @Override
392 public java.util.Date getCreateDate() {
393 return _calEvent.getCreateDate();
394 }
395
396
401 @Override
402 public void setCreateDate(java.util.Date createDate) {
403 _calEvent.setCreateDate(createDate);
404 }
405
406
411 @Override
412 public java.util.Date getModifiedDate() {
413 return _calEvent.getModifiedDate();
414 }
415
416
421 @Override
422 public void setModifiedDate(java.util.Date modifiedDate) {
423 _calEvent.setModifiedDate(modifiedDate);
424 }
425
426
431 @Override
432 public java.lang.String getTitle() {
433 return _calEvent.getTitle();
434 }
435
436
441 @Override
442 public void setTitle(java.lang.String title) {
443 _calEvent.setTitle(title);
444 }
445
446
451 @Override
452 public java.lang.String getDescription() {
453 return _calEvent.getDescription();
454 }
455
456
461 @Override
462 public void setDescription(java.lang.String description) {
463 _calEvent.setDescription(description);
464 }
465
466
471 @Override
472 public java.lang.String getLocation() {
473 return _calEvent.getLocation();
474 }
475
476
481 @Override
482 public void setLocation(java.lang.String location) {
483 _calEvent.setLocation(location);
484 }
485
486
491 @Override
492 public java.util.Date getStartDate() {
493 return _calEvent.getStartDate();
494 }
495
496
501 @Override
502 public void setStartDate(java.util.Date startDate) {
503 _calEvent.setStartDate(startDate);
504 }
505
506
511 @Override
512 public java.util.Date getEndDate() {
513 return _calEvent.getEndDate();
514 }
515
516
521 @Override
522 public void setEndDate(java.util.Date endDate) {
523 _calEvent.setEndDate(endDate);
524 }
525
526
531 @Override
532 public int getDurationHour() {
533 return _calEvent.getDurationHour();
534 }
535
536
541 @Override
542 public void setDurationHour(int durationHour) {
543 _calEvent.setDurationHour(durationHour);
544 }
545
546
551 @Override
552 public int getDurationMinute() {
553 return _calEvent.getDurationMinute();
554 }
555
556
561 @Override
562 public void setDurationMinute(int durationMinute) {
563 _calEvent.setDurationMinute(durationMinute);
564 }
565
566
571 @Override
572 public boolean getAllDay() {
573 return _calEvent.getAllDay();
574 }
575
576
581 @Override
582 public boolean isAllDay() {
583 return _calEvent.isAllDay();
584 }
585
586
591 @Override
592 public void setAllDay(boolean allDay) {
593 _calEvent.setAllDay(allDay);
594 }
595
596
601 @Override
602 public boolean getTimeZoneSensitive() {
603 return _calEvent.getTimeZoneSensitive();
604 }
605
606
611 @Override
612 public boolean isTimeZoneSensitive() {
613 return _calEvent.isTimeZoneSensitive();
614 }
615
616
621 @Override
622 public void setTimeZoneSensitive(boolean timeZoneSensitive) {
623 _calEvent.setTimeZoneSensitive(timeZoneSensitive);
624 }
625
626
631 @Override
632 public java.lang.String getType() {
633 return _calEvent.getType();
634 }
635
636
641 @Override
642 public void setType(java.lang.String type) {
643 _calEvent.setType(type);
644 }
645
646
651 @Override
652 public boolean getRepeating() {
653 return _calEvent.getRepeating();
654 }
655
656
661 @Override
662 public boolean isRepeating() {
663 return _calEvent.isRepeating();
664 }
665
666
671 @Override
672 public void setRepeating(boolean repeating) {
673 _calEvent.setRepeating(repeating);
674 }
675
676
681 @Override
682 public java.lang.String getRecurrence() {
683 return _calEvent.getRecurrence();
684 }
685
686
691 @Override
692 public void setRecurrence(java.lang.String recurrence) {
693 _calEvent.setRecurrence(recurrence);
694 }
695
696
701 @Override
702 public int getRemindBy() {
703 return _calEvent.getRemindBy();
704 }
705
706
711 @Override
712 public void setRemindBy(int remindBy) {
713 _calEvent.setRemindBy(remindBy);
714 }
715
716
721 @Override
722 public int getFirstReminder() {
723 return _calEvent.getFirstReminder();
724 }
725
726
731 @Override
732 public void setFirstReminder(int firstReminder) {
733 _calEvent.setFirstReminder(firstReminder);
734 }
735
736
741 @Override
742 public int getSecondReminder() {
743 return _calEvent.getSecondReminder();
744 }
745
746
751 @Override
752 public void setSecondReminder(int secondReminder) {
753 _calEvent.setSecondReminder(secondReminder);
754 }
755
756 @Override
757 public boolean isNew() {
758 return _calEvent.isNew();
759 }
760
761 @Override
762 public void setNew(boolean n) {
763 _calEvent.setNew(n);
764 }
765
766 @Override
767 public boolean isCachedModel() {
768 return _calEvent.isCachedModel();
769 }
770
771 @Override
772 public void setCachedModel(boolean cachedModel) {
773 _calEvent.setCachedModel(cachedModel);
774 }
775
776 @Override
777 public boolean isEscapedModel() {
778 return _calEvent.isEscapedModel();
779 }
780
781 @Override
782 public java.io.Serializable getPrimaryKeyObj() {
783 return _calEvent.getPrimaryKeyObj();
784 }
785
786 @Override
787 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
788 _calEvent.setPrimaryKeyObj(primaryKeyObj);
789 }
790
791 @Override
792 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
793 return _calEvent.getExpandoBridge();
794 }
795
796 @Override
797 public void setExpandoBridgeAttributes(
798 com.liferay.portal.model.BaseModel<?> baseModel) {
799 _calEvent.setExpandoBridgeAttributes(baseModel);
800 }
801
802 @Override
803 public void setExpandoBridgeAttributes(
804 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
805 _calEvent.setExpandoBridgeAttributes(expandoBridge);
806 }
807
808 @Override
809 public void setExpandoBridgeAttributes(
810 com.liferay.portal.service.ServiceContext serviceContext) {
811 _calEvent.setExpandoBridgeAttributes(serviceContext);
812 }
813
814 @Override
815 public java.lang.Object clone() {
816 return new CalEventWrapper((CalEvent)_calEvent.clone());
817 }
818
819 @Override
820 public int compareTo(com.liferay.portlet.calendar.model.CalEvent calEvent) {
821 return _calEvent.compareTo(calEvent);
822 }
823
824 @Override
825 public int hashCode() {
826 return _calEvent.hashCode();
827 }
828
829 @Override
830 public com.liferay.portal.model.CacheModel<com.liferay.portlet.calendar.model.CalEvent> toCacheModel() {
831 return _calEvent.toCacheModel();
832 }
833
834 @Override
835 public com.liferay.portlet.calendar.model.CalEvent toEscapedModel() {
836 return new CalEventWrapper(_calEvent.toEscapedModel());
837 }
838
839 @Override
840 public com.liferay.portlet.calendar.model.CalEvent toUnescapedModel() {
841 return new CalEventWrapper(_calEvent.toUnescapedModel());
842 }
843
844 @Override
845 public java.lang.String toString() {
846 return _calEvent.toString();
847 }
848
849 @Override
850 public java.lang.String toXmlString() {
851 return _calEvent.toXmlString();
852 }
853
854 @Override
855 public void persist()
856 throws com.liferay.portal.kernel.exception.SystemException {
857 _calEvent.persist();
858 }
859
860 @Override
861 public com.liferay.portal.kernel.cal.TZSRecurrence getRecurrenceObj() {
862 return _calEvent.getRecurrenceObj();
863 }
864
865 @Override
866 public void setRecurrenceObj(
867 com.liferay.portal.kernel.cal.TZSRecurrence recurrenceObj) {
868 _calEvent.setRecurrenceObj(recurrenceObj);
869 }
870
871 @Override
872 public boolean equals(Object obj) {
873 if (this == obj) {
874 return true;
875 }
876
877 if (!(obj instanceof CalEventWrapper)) {
878 return false;
879 }
880
881 CalEventWrapper calEventWrapper = (CalEventWrapper)obj;
882
883 if (Validator.equals(_calEvent, calEventWrapper._calEvent)) {
884 return true;
885 }
886
887 return false;
888 }
889
890 @Override
891 public StagedModelType getStagedModelType() {
892 return _calEvent.getStagedModelType();
893 }
894
895
898 public CalEvent getWrappedCalEvent() {
899 return _calEvent;
900 }
901
902 @Override
903 public CalEvent getWrappedModel() {
904 return _calEvent;
905 }
906
907 @Override
908 public void resetOriginalValues() {
909 _calEvent.resetOriginalValues();
910 }
911
912 private CalEvent _calEvent;
913 }