001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
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    /**
029     * <p>
030     * This class is a wrapper for {@link CalEvent}.
031     * </p>
032     *
033     * @author Brian Wing Shun Chan
034     * @see CalEvent
035     * @deprecated As of 7.0.0, with no direct replacement
036     * @generated
037     */
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            /**
238            * Returns the all day of this cal event.
239            *
240            * @return the all day of this cal event
241            */
242            @Override
243            public boolean getAllDay() {
244                    return _calEvent.getAllDay();
245            }
246    
247            /**
248            * Returns the company ID of this cal event.
249            *
250            * @return the company ID of this cal event
251            */
252            @Override
253            public long getCompanyId() {
254                    return _calEvent.getCompanyId();
255            }
256    
257            /**
258            * Returns the create date of this cal event.
259            *
260            * @return the create date of this cal event
261            */
262            @Override
263            public Date getCreateDate() {
264                    return _calEvent.getCreateDate();
265            }
266    
267            /**
268            * Returns the description of this cal event.
269            *
270            * @return the description of this cal event
271            */
272            @Override
273            public java.lang.String getDescription() {
274                    return _calEvent.getDescription();
275            }
276    
277            /**
278            * Returns the duration hour of this cal event.
279            *
280            * @return the duration hour of this cal event
281            */
282            @Override
283            public int getDurationHour() {
284                    return _calEvent.getDurationHour();
285            }
286    
287            /**
288            * Returns the duration minute of this cal event.
289            *
290            * @return the duration minute of this cal event
291            */
292            @Override
293            public int getDurationMinute() {
294                    return _calEvent.getDurationMinute();
295            }
296    
297            /**
298            * Returns the end date of this cal event.
299            *
300            * @return the end date of this cal event
301            */
302            @Override
303            public Date getEndDate() {
304                    return _calEvent.getEndDate();
305            }
306    
307            /**
308            * Returns the event ID of this cal event.
309            *
310            * @return the event ID of this cal event
311            */
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            /**
323            * Returns the first reminder of this cal event.
324            *
325            * @return the first reminder of this cal event
326            */
327            @Override
328            public int getFirstReminder() {
329                    return _calEvent.getFirstReminder();
330            }
331    
332            /**
333            * Returns the group ID of this cal event.
334            *
335            * @return the group ID of this cal event
336            */
337            @Override
338            public long getGroupId() {
339                    return _calEvent.getGroupId();
340            }
341    
342            /**
343            * Returns the location of this cal event.
344            *
345            * @return the location of this cal event
346            */
347            @Override
348            public java.lang.String getLocation() {
349                    return _calEvent.getLocation();
350            }
351    
352            /**
353            * Returns the modified date of this cal event.
354            *
355            * @return the modified date of this cal event
356            */
357            @Override
358            public Date getModifiedDate() {
359                    return _calEvent.getModifiedDate();
360            }
361    
362            /**
363            * Returns the primary key of this cal event.
364            *
365            * @return the primary key of this cal event
366            */
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            /**
378            * Returns the recurrence of this cal event.
379            *
380            * @return the recurrence of this cal event
381            */
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            /**
393            * Returns the remind by of this cal event.
394            *
395            * @return the remind by of this cal event
396            */
397            @Override
398            public int getRemindBy() {
399                    return _calEvent.getRemindBy();
400            }
401    
402            /**
403            * Returns the repeating of this cal event.
404            *
405            * @return the repeating of this cal event
406            */
407            @Override
408            public boolean getRepeating() {
409                    return _calEvent.getRepeating();
410            }
411    
412            /**
413            * Returns the second reminder of this cal event.
414            *
415            * @return the second reminder of this cal event
416            */
417            @Override
418            public int getSecondReminder() {
419                    return _calEvent.getSecondReminder();
420            }
421    
422            /**
423            * Returns the start date of this cal event.
424            *
425            * @return the start date of this cal event
426            */
427            @Override
428            public Date getStartDate() {
429                    return _calEvent.getStartDate();
430            }
431    
432            /**
433            * Returns the time zone sensitive of this cal event.
434            *
435            * @return the time zone sensitive of this cal event
436            */
437            @Override
438            public boolean getTimeZoneSensitive() {
439                    return _calEvent.getTimeZoneSensitive();
440            }
441    
442            /**
443            * Returns the title of this cal event.
444            *
445            * @return the title of this cal event
446            */
447            @Override
448            public java.lang.String getTitle() {
449                    return _calEvent.getTitle();
450            }
451    
452            /**
453            * Returns the type of this cal event.
454            *
455            * @return the type of this cal event
456            */
457            @Override
458            public java.lang.String getType() {
459                    return _calEvent.getType();
460            }
461    
462            /**
463            * Returns the user ID of this cal event.
464            *
465            * @return the user ID of this cal event
466            */
467            @Override
468            public long getUserId() {
469                    return _calEvent.getUserId();
470            }
471    
472            /**
473            * Returns the user name of this cal event.
474            *
475            * @return the user name of this cal event
476            */
477            @Override
478            public java.lang.String getUserName() {
479                    return _calEvent.getUserName();
480            }
481    
482            /**
483            * Returns the user uuid of this cal event.
484            *
485            * @return the user uuid of this cal event
486            */
487            @Override
488            public java.lang.String getUserUuid() {
489                    return _calEvent.getUserUuid();
490            }
491    
492            /**
493            * Returns the uuid of this cal event.
494            *
495            * @return the uuid of this cal event
496            */
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            /**
508            * Returns <code>true</code> if this cal event is all day.
509            *
510            * @return <code>true</code> if this cal event is all day; <code>false</code> otherwise
511            */
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            /**
533            * Returns <code>true</code> if this cal event is repeating.
534            *
535            * @return <code>true</code> if this cal event is repeating; <code>false</code> otherwise
536            */
537            @Override
538            public boolean isRepeating() {
539                    return _calEvent.isRepeating();
540            }
541    
542            /**
543            * Returns <code>true</code> if this cal event is time zone sensitive.
544            *
545            * @return <code>true</code> if this cal event is time zone sensitive; <code>false</code> otherwise
546            */
547            @Override
548            public boolean isTimeZoneSensitive() {
549                    return _calEvent.isTimeZoneSensitive();
550            }
551    
552            @Override
553            public void persist() {
554                    _calEvent.persist();
555            }
556    
557            /**
558            * Sets whether this cal event is all day.
559            *
560            * @param allDay the all day of this cal event
561            */
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            /**
573            * Sets the company ID of this cal event.
574            *
575            * @param companyId the company ID of this cal event
576            */
577            @Override
578            public void setCompanyId(long companyId) {
579                    _calEvent.setCompanyId(companyId);
580            }
581    
582            /**
583            * Sets the create date of this cal event.
584            *
585            * @param createDate the create date of this cal event
586            */
587            @Override
588            public void setCreateDate(Date createDate) {
589                    _calEvent.setCreateDate(createDate);
590            }
591    
592            /**
593            * Sets the description of this cal event.
594            *
595            * @param description the description of this cal event
596            */
597            @Override
598            public void setDescription(java.lang.String description) {
599                    _calEvent.setDescription(description);
600            }
601    
602            /**
603            * Sets the duration hour of this cal event.
604            *
605            * @param durationHour the duration hour of this cal event
606            */
607            @Override
608            public void setDurationHour(int durationHour) {
609                    _calEvent.setDurationHour(durationHour);
610            }
611    
612            /**
613            * Sets the duration minute of this cal event.
614            *
615            * @param durationMinute the duration minute of this cal event
616            */
617            @Override
618            public void setDurationMinute(int durationMinute) {
619                    _calEvent.setDurationMinute(durationMinute);
620            }
621    
622            /**
623            * Sets the end date of this cal event.
624            *
625            * @param endDate the end date of this cal event
626            */
627            @Override
628            public void setEndDate(Date endDate) {
629                    _calEvent.setEndDate(endDate);
630            }
631    
632            /**
633            * Sets the event ID of this cal event.
634            *
635            * @param eventId the event ID of this cal event
636            */
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            /**
661            * Sets the first reminder of this cal event.
662            *
663            * @param firstReminder the first reminder of this cal event
664            */
665            @Override
666            public void setFirstReminder(int firstReminder) {
667                    _calEvent.setFirstReminder(firstReminder);
668            }
669    
670            /**
671            * Sets the group ID of this cal event.
672            *
673            * @param groupId the group ID of this cal event
674            */
675            @Override
676            public void setGroupId(long groupId) {
677                    _calEvent.setGroupId(groupId);
678            }
679    
680            /**
681            * Sets the location of this cal event.
682            *
683            * @param location the location of this cal event
684            */
685            @Override
686            public void setLocation(java.lang.String location) {
687                    _calEvent.setLocation(location);
688            }
689    
690            /**
691            * Sets the modified date of this cal event.
692            *
693            * @param modifiedDate the modified date of this cal event
694            */
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            /**
706            * Sets the primary key of this cal event.
707            *
708            * @param primaryKey the primary key of this cal event
709            */
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            /**
721            * Sets the recurrence of this cal event.
722            *
723            * @param recurrence the recurrence of this cal event
724            */
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            /**
737            * Sets the remind by of this cal event.
738            *
739            * @param remindBy the remind by of this cal event
740            */
741            @Override
742            public void setRemindBy(int remindBy) {
743                    _calEvent.setRemindBy(remindBy);
744            }
745    
746            /**
747            * Sets whether this cal event is repeating.
748            *
749            * @param repeating the repeating of this cal event
750            */
751            @Override
752            public void setRepeating(boolean repeating) {
753                    _calEvent.setRepeating(repeating);
754            }
755    
756            /**
757            * Sets the second reminder of this cal event.
758            *
759            * @param secondReminder the second reminder of this cal event
760            */
761            @Override
762            public void setSecondReminder(int secondReminder) {
763                    _calEvent.setSecondReminder(secondReminder);
764            }
765    
766            /**
767            * Sets the start date of this cal event.
768            *
769            * @param startDate the start date of this cal event
770            */
771            @Override
772            public void setStartDate(Date startDate) {
773                    _calEvent.setStartDate(startDate);
774            }
775    
776            /**
777            * Sets whether this cal event is time zone sensitive.
778            *
779            * @param timeZoneSensitive the time zone sensitive of this cal event
780            */
781            @Override
782            public void setTimeZoneSensitive(boolean timeZoneSensitive) {
783                    _calEvent.setTimeZoneSensitive(timeZoneSensitive);
784            }
785    
786            /**
787            * Sets the title of this cal event.
788            *
789            * @param title the title of this cal event
790            */
791            @Override
792            public void setTitle(java.lang.String title) {
793                    _calEvent.setTitle(title);
794            }
795    
796            /**
797            * Sets the type of this cal event.
798            *
799            * @param type the type of this cal event
800            */
801            @Override
802            public void setType(java.lang.String type) {
803                    _calEvent.setType(type);
804            }
805    
806            /**
807            * Sets the user ID of this cal event.
808            *
809            * @param userId the user ID of this cal event
810            */
811            @Override
812            public void setUserId(long userId) {
813                    _calEvent.setUserId(userId);
814            }
815    
816            /**
817            * Sets the user name of this cal event.
818            *
819            * @param userName the user name of this cal event
820            */
821            @Override
822            public void setUserName(java.lang.String userName) {
823                    _calEvent.setUserName(userName);
824            }
825    
826            /**
827            * Sets the user uuid of this cal event.
828            *
829            * @param userUuid the user uuid of this cal event
830            */
831            @Override
832            public void setUserUuid(java.lang.String userUuid) {
833                    _calEvent.setUserUuid(userUuid);
834            }
835    
836            /**
837            * Sets the uuid of this cal event.
838            *
839            * @param uuid the uuid of this cal event
840            */
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    }