001
014
015 package com.liferay.portlet.calendar.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import com.liferay.portlet.exportimport.lar.StagedModelType;
023
024 import java.util.Date;
025 import java.util.HashMap;
026 import java.util.Map;
027
028
038 @Deprecated
039 @ProviderType
040 public class CalEventWrapper implements CalEvent, ModelWrapper<CalEvent> {
041 public CalEventWrapper(CalEvent calEvent) {
042 _calEvent = calEvent;
043 }
044
045 @Override
046 public Class<?> getModelClass() {
047 return CalEvent.class;
048 }
049
050 @Override
051 public String getModelClassName() {
052 return CalEvent.class.getName();
053 }
054
055 @Override
056 public Map<String, Object> getModelAttributes() {
057 Map<String, Object> attributes = new HashMap<String, Object>();
058
059 attributes.put("uuid", getUuid());
060 attributes.put("eventId", getEventId());
061 attributes.put("groupId", getGroupId());
062 attributes.put("companyId", getCompanyId());
063 attributes.put("userId", getUserId());
064 attributes.put("userName", getUserName());
065 attributes.put("createDate", getCreateDate());
066 attributes.put("modifiedDate", getModifiedDate());
067 attributes.put("title", getTitle());
068 attributes.put("description", getDescription());
069 attributes.put("location", getLocation());
070 attributes.put("startDate", getStartDate());
071 attributes.put("endDate", getEndDate());
072 attributes.put("durationHour", getDurationHour());
073 attributes.put("durationMinute", getDurationMinute());
074 attributes.put("allDay", getAllDay());
075 attributes.put("timeZoneSensitive", getTimeZoneSensitive());
076 attributes.put("type", getType());
077 attributes.put("repeating", getRepeating());
078 attributes.put("recurrence", getRecurrence());
079 attributes.put("remindBy", getRemindBy());
080 attributes.put("firstReminder", getFirstReminder());
081 attributes.put("secondReminder", getSecondReminder());
082
083 return attributes;
084 }
085
086 @Override
087 public void setModelAttributes(Map<String, Object> attributes) {
088 String uuid = (String)attributes.get("uuid");
089
090 if (uuid != null) {
091 setUuid(uuid);
092 }
093
094 Long eventId = (Long)attributes.get("eventId");
095
096 if (eventId != null) {
097 setEventId(eventId);
098 }
099
100 Long groupId = (Long)attributes.get("groupId");
101
102 if (groupId != null) {
103 setGroupId(groupId);
104 }
105
106 Long companyId = (Long)attributes.get("companyId");
107
108 if (companyId != null) {
109 setCompanyId(companyId);
110 }
111
112 Long userId = (Long)attributes.get("userId");
113
114 if (userId != null) {
115 setUserId(userId);
116 }
117
118 String userName = (String)attributes.get("userName");
119
120 if (userName != null) {
121 setUserName(userName);
122 }
123
124 Date createDate = (Date)attributes.get("createDate");
125
126 if (createDate != null) {
127 setCreateDate(createDate);
128 }
129
130 Date modifiedDate = (Date)attributes.get("modifiedDate");
131
132 if (modifiedDate != null) {
133 setModifiedDate(modifiedDate);
134 }
135
136 String title = (String)attributes.get("title");
137
138 if (title != null) {
139 setTitle(title);
140 }
141
142 String description = (String)attributes.get("description");
143
144 if (description != null) {
145 setDescription(description);
146 }
147
148 String location = (String)attributes.get("location");
149
150 if (location != null) {
151 setLocation(location);
152 }
153
154 Date startDate = (Date)attributes.get("startDate");
155
156 if (startDate != null) {
157 setStartDate(startDate);
158 }
159
160 Date endDate = (Date)attributes.get("endDate");
161
162 if (endDate != null) {
163 setEndDate(endDate);
164 }
165
166 Integer durationHour = (Integer)attributes.get("durationHour");
167
168 if (durationHour != null) {
169 setDurationHour(durationHour);
170 }
171
172 Integer durationMinute = (Integer)attributes.get("durationMinute");
173
174 if (durationMinute != null) {
175 setDurationMinute(durationMinute);
176 }
177
178 Boolean allDay = (Boolean)attributes.get("allDay");
179
180 if (allDay != null) {
181 setAllDay(allDay);
182 }
183
184 Boolean timeZoneSensitive = (Boolean)attributes.get("timeZoneSensitive");
185
186 if (timeZoneSensitive != null) {
187 setTimeZoneSensitive(timeZoneSensitive);
188 }
189
190 String type = (String)attributes.get("type");
191
192 if (type != null) {
193 setType(type);
194 }
195
196 Boolean repeating = (Boolean)attributes.get("repeating");
197
198 if (repeating != null) {
199 setRepeating(repeating);
200 }
201
202 String recurrence = (String)attributes.get("recurrence");
203
204 if (recurrence != null) {
205 setRecurrence(recurrence);
206 }
207
208 Integer remindBy = (Integer)attributes.get("remindBy");
209
210 if (remindBy != null) {
211 setRemindBy(remindBy);
212 }
213
214 Integer firstReminder = (Integer)attributes.get("firstReminder");
215
216 if (firstReminder != null) {
217 setFirstReminder(firstReminder);
218 }
219
220 Integer secondReminder = (Integer)attributes.get("secondReminder");
221
222 if (secondReminder != null) {
223 setSecondReminder(secondReminder);
224 }
225 }
226
227 @Override
228 public java.lang.Object clone() {
229 return new CalEventWrapper((CalEvent)_calEvent.clone());
230 }
231
232 @Override
233 public int compareTo(com.liferay.portlet.calendar.model.CalEvent calEvent) {
234 return _calEvent.compareTo(calEvent);
235 }
236
237
242 @Override
243 public boolean getAllDay() {
244 return _calEvent.getAllDay();
245 }
246
247
252 @Override
253 public long getCompanyId() {
254 return _calEvent.getCompanyId();
255 }
256
257
262 @Override
263 public Date getCreateDate() {
264 return _calEvent.getCreateDate();
265 }
266
267
272 @Override
273 public java.lang.String getDescription() {
274 return _calEvent.getDescription();
275 }
276
277
282 @Override
283 public int getDurationHour() {
284 return _calEvent.getDurationHour();
285 }
286
287
292 @Override
293 public int getDurationMinute() {
294 return _calEvent.getDurationMinute();
295 }
296
297
302 @Override
303 public Date getEndDate() {
304 return _calEvent.getEndDate();
305 }
306
307
312 @Override
313 public long getEventId() {
314 return _calEvent.getEventId();
315 }
316
317 @Override
318 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
319 return _calEvent.getExpandoBridge();
320 }
321
322
327 @Override
328 public int getFirstReminder() {
329 return _calEvent.getFirstReminder();
330 }
331
332
337 @Override
338 public long getGroupId() {
339 return _calEvent.getGroupId();
340 }
341
342
347 @Override
348 public java.lang.String getLocation() {
349 return _calEvent.getLocation();
350 }
351
352
357 @Override
358 public Date getModifiedDate() {
359 return _calEvent.getModifiedDate();
360 }
361
362
367 @Override
368 public long getPrimaryKey() {
369 return _calEvent.getPrimaryKey();
370 }
371
372 @Override
373 public java.io.Serializable getPrimaryKeyObj() {
374 return _calEvent.getPrimaryKeyObj();
375 }
376
377
382 @Override
383 public java.lang.String getRecurrence() {
384 return _calEvent.getRecurrence();
385 }
386
387 @Override
388 public com.liferay.portal.kernel.cal.TZSRecurrence getRecurrenceObj() {
389 return _calEvent.getRecurrenceObj();
390 }
391
392
397 @Override
398 public int getRemindBy() {
399 return _calEvent.getRemindBy();
400 }
401
402
407 @Override
408 public boolean getRepeating() {
409 return _calEvent.getRepeating();
410 }
411
412
417 @Override
418 public int getSecondReminder() {
419 return _calEvent.getSecondReminder();
420 }
421
422
427 @Override
428 public Date getStartDate() {
429 return _calEvent.getStartDate();
430 }
431
432
437 @Override
438 public boolean getTimeZoneSensitive() {
439 return _calEvent.getTimeZoneSensitive();
440 }
441
442
447 @Override
448 public java.lang.String getTitle() {
449 return _calEvent.getTitle();
450 }
451
452
457 @Override
458 public java.lang.String getType() {
459 return _calEvent.getType();
460 }
461
462
467 @Override
468 public long getUserId() {
469 return _calEvent.getUserId();
470 }
471
472
477 @Override
478 public java.lang.String getUserName() {
479 return _calEvent.getUserName();
480 }
481
482
487 @Override
488 public java.lang.String getUserUuid() {
489 return _calEvent.getUserUuid();
490 }
491
492
497 @Override
498 public java.lang.String getUuid() {
499 return _calEvent.getUuid();
500 }
501
502 @Override
503 public int hashCode() {
504 return _calEvent.hashCode();
505 }
506
507
512 @Override
513 public boolean isAllDay() {
514 return _calEvent.isAllDay();
515 }
516
517 @Override
518 public boolean isCachedModel() {
519 return _calEvent.isCachedModel();
520 }
521
522 @Override
523 public boolean isEscapedModel() {
524 return _calEvent.isEscapedModel();
525 }
526
527 @Override
528 public boolean isNew() {
529 return _calEvent.isNew();
530 }
531
532
537 @Override
538 public boolean isRepeating() {
539 return _calEvent.isRepeating();
540 }
541
542
547 @Override
548 public boolean isTimeZoneSensitive() {
549 return _calEvent.isTimeZoneSensitive();
550 }
551
552 @Override
553 public void persist() {
554 _calEvent.persist();
555 }
556
557
562 @Override
563 public void setAllDay(boolean allDay) {
564 _calEvent.setAllDay(allDay);
565 }
566
567 @Override
568 public void setCachedModel(boolean cachedModel) {
569 _calEvent.setCachedModel(cachedModel);
570 }
571
572
577 @Override
578 public void setCompanyId(long companyId) {
579 _calEvent.setCompanyId(companyId);
580 }
581
582
587 @Override
588 public void setCreateDate(Date createDate) {
589 _calEvent.setCreateDate(createDate);
590 }
591
592
597 @Override
598 public void setDescription(java.lang.String description) {
599 _calEvent.setDescription(description);
600 }
601
602
607 @Override
608 public void setDurationHour(int durationHour) {
609 _calEvent.setDurationHour(durationHour);
610 }
611
612
617 @Override
618 public void setDurationMinute(int durationMinute) {
619 _calEvent.setDurationMinute(durationMinute);
620 }
621
622
627 @Override
628 public void setEndDate(Date endDate) {
629 _calEvent.setEndDate(endDate);
630 }
631
632
637 @Override
638 public void setEventId(long eventId) {
639 _calEvent.setEventId(eventId);
640 }
641
642 @Override
643 public void setExpandoBridgeAttributes(
644 com.liferay.portal.model.BaseModel<?> baseModel) {
645 _calEvent.setExpandoBridgeAttributes(baseModel);
646 }
647
648 @Override
649 public void setExpandoBridgeAttributes(
650 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
651 _calEvent.setExpandoBridgeAttributes(expandoBridge);
652 }
653
654 @Override
655 public void setExpandoBridgeAttributes(
656 com.liferay.portal.service.ServiceContext serviceContext) {
657 _calEvent.setExpandoBridgeAttributes(serviceContext);
658 }
659
660
665 @Override
666 public void setFirstReminder(int firstReminder) {
667 _calEvent.setFirstReminder(firstReminder);
668 }
669
670
675 @Override
676 public void setGroupId(long groupId) {
677 _calEvent.setGroupId(groupId);
678 }
679
680
685 @Override
686 public void setLocation(java.lang.String location) {
687 _calEvent.setLocation(location);
688 }
689
690
695 @Override
696 public void setModifiedDate(Date modifiedDate) {
697 _calEvent.setModifiedDate(modifiedDate);
698 }
699
700 @Override
701 public void setNew(boolean n) {
702 _calEvent.setNew(n);
703 }
704
705
710 @Override
711 public void setPrimaryKey(long primaryKey) {
712 _calEvent.setPrimaryKey(primaryKey);
713 }
714
715 @Override
716 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
717 _calEvent.setPrimaryKeyObj(primaryKeyObj);
718 }
719
720
725 @Override
726 public void setRecurrence(java.lang.String recurrence) {
727 _calEvent.setRecurrence(recurrence);
728 }
729
730 @Override
731 public void setRecurrenceObj(
732 com.liferay.portal.kernel.cal.TZSRecurrence recurrenceObj) {
733 _calEvent.setRecurrenceObj(recurrenceObj);
734 }
735
736
741 @Override
742 public void setRemindBy(int remindBy) {
743 _calEvent.setRemindBy(remindBy);
744 }
745
746
751 @Override
752 public void setRepeating(boolean repeating) {
753 _calEvent.setRepeating(repeating);
754 }
755
756
761 @Override
762 public void setSecondReminder(int secondReminder) {
763 _calEvent.setSecondReminder(secondReminder);
764 }
765
766
771 @Override
772 public void setStartDate(Date startDate) {
773 _calEvent.setStartDate(startDate);
774 }
775
776
781 @Override
782 public void setTimeZoneSensitive(boolean timeZoneSensitive) {
783 _calEvent.setTimeZoneSensitive(timeZoneSensitive);
784 }
785
786
791 @Override
792 public void setTitle(java.lang.String title) {
793 _calEvent.setTitle(title);
794 }
795
796
801 @Override
802 public void setType(java.lang.String type) {
803 _calEvent.setType(type);
804 }
805
806
811 @Override
812 public void setUserId(long userId) {
813 _calEvent.setUserId(userId);
814 }
815
816
821 @Override
822 public void setUserName(java.lang.String userName) {
823 _calEvent.setUserName(userName);
824 }
825
826
831 @Override
832 public void setUserUuid(java.lang.String userUuid) {
833 _calEvent.setUserUuid(userUuid);
834 }
835
836
841 @Override
842 public void setUuid(java.lang.String uuid) {
843 _calEvent.setUuid(uuid);
844 }
845
846 @Override
847 public com.liferay.portal.model.CacheModel<com.liferay.portlet.calendar.model.CalEvent> toCacheModel() {
848 return _calEvent.toCacheModel();
849 }
850
851 @Override
852 public com.liferay.portlet.calendar.model.CalEvent toEscapedModel() {
853 return new CalEventWrapper(_calEvent.toEscapedModel());
854 }
855
856 @Override
857 public java.lang.String toString() {
858 return _calEvent.toString();
859 }
860
861 @Override
862 public com.liferay.portlet.calendar.model.CalEvent toUnescapedModel() {
863 return new CalEventWrapper(_calEvent.toUnescapedModel());
864 }
865
866 @Override
867 public java.lang.String toXmlString() {
868 return _calEvent.toXmlString();
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 @Override
896 public CalEvent getWrappedModel() {
897 return _calEvent;
898 }
899
900 @Override
901 public boolean isEntityCacheEnabled() {
902 return _calEvent.isEntityCacheEnabled();
903 }
904
905 @Override
906 public boolean isFinderCacheEnabled() {
907 return _calEvent.isFinderCacheEnabled();
908 }
909
910 @Override
911 public void resetOriginalValues() {
912 _calEvent.resetOriginalValues();
913 }
914
915 private final CalEvent _calEvent;
916 }