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    import com.liferay.portal.service.ServiceContext;
022    
023    import com.liferay.portlet.expando.model.ExpandoBridge;
024    import com.liferay.portlet.exportimport.lar.StagedModelType;
025    
026    import java.io.Serializable;
027    
028    import java.util.Date;
029    import java.util.HashMap;
030    import java.util.Map;
031    
032    /**
033     * <p>
034     * This class is a wrapper for {@link CalEvent}.
035     * </p>
036     *
037     * @author Brian Wing Shun Chan
038     * @see CalEvent
039     * @deprecated As of 7.0.0, with no direct replacement
040     * @generated
041     */
042    @Deprecated
043    @ProviderType
044    public class CalEventWrapper implements CalEvent, ModelWrapper<CalEvent> {
045            public CalEventWrapper(CalEvent calEvent) {
046                    _calEvent = calEvent;
047            }
048    
049            @Override
050            public Class<?> getModelClass() {
051                    return CalEvent.class;
052            }
053    
054            @Override
055            public String getModelClassName() {
056                    return CalEvent.class.getName();
057            }
058    
059            @Override
060            public Map<String, Object> getModelAttributes() {
061                    Map<String, Object> attributes = new HashMap<String, Object>();
062    
063                    attributes.put("uuid", getUuid());
064                    attributes.put("eventId", getEventId());
065                    attributes.put("groupId", getGroupId());
066                    attributes.put("companyId", getCompanyId());
067                    attributes.put("userId", getUserId());
068                    attributes.put("userName", getUserName());
069                    attributes.put("createDate", getCreateDate());
070                    attributes.put("modifiedDate", getModifiedDate());
071                    attributes.put("title", getTitle());
072                    attributes.put("description", getDescription());
073                    attributes.put("location", getLocation());
074                    attributes.put("startDate", getStartDate());
075                    attributes.put("endDate", getEndDate());
076                    attributes.put("durationHour", getDurationHour());
077                    attributes.put("durationMinute", getDurationMinute());
078                    attributes.put("allDay", getAllDay());
079                    attributes.put("timeZoneSensitive", getTimeZoneSensitive());
080                    attributes.put("type", getType());
081                    attributes.put("repeating", getRepeating());
082                    attributes.put("recurrence", getRecurrence());
083                    attributes.put("remindBy", getRemindBy());
084                    attributes.put("firstReminder", getFirstReminder());
085                    attributes.put("secondReminder", getSecondReminder());
086    
087                    return attributes;
088            }
089    
090            @Override
091            public void setModelAttributes(Map<String, Object> attributes) {
092                    String uuid = (String)attributes.get("uuid");
093    
094                    if (uuid != null) {
095                            setUuid(uuid);
096                    }
097    
098                    Long eventId = (Long)attributes.get("eventId");
099    
100                    if (eventId != null) {
101                            setEventId(eventId);
102                    }
103    
104                    Long groupId = (Long)attributes.get("groupId");
105    
106                    if (groupId != null) {
107                            setGroupId(groupId);
108                    }
109    
110                    Long companyId = (Long)attributes.get("companyId");
111    
112                    if (companyId != null) {
113                            setCompanyId(companyId);
114                    }
115    
116                    Long userId = (Long)attributes.get("userId");
117    
118                    if (userId != null) {
119                            setUserId(userId);
120                    }
121    
122                    String userName = (String)attributes.get("userName");
123    
124                    if (userName != null) {
125                            setUserName(userName);
126                    }
127    
128                    Date createDate = (Date)attributes.get("createDate");
129    
130                    if (createDate != null) {
131                            setCreateDate(createDate);
132                    }
133    
134                    Date modifiedDate = (Date)attributes.get("modifiedDate");
135    
136                    if (modifiedDate != null) {
137                            setModifiedDate(modifiedDate);
138                    }
139    
140                    String title = (String)attributes.get("title");
141    
142                    if (title != null) {
143                            setTitle(title);
144                    }
145    
146                    String description = (String)attributes.get("description");
147    
148                    if (description != null) {
149                            setDescription(description);
150                    }
151    
152                    String location = (String)attributes.get("location");
153    
154                    if (location != null) {
155                            setLocation(location);
156                    }
157    
158                    Date startDate = (Date)attributes.get("startDate");
159    
160                    if (startDate != null) {
161                            setStartDate(startDate);
162                    }
163    
164                    Date endDate = (Date)attributes.get("endDate");
165    
166                    if (endDate != null) {
167                            setEndDate(endDate);
168                    }
169    
170                    Integer durationHour = (Integer)attributes.get("durationHour");
171    
172                    if (durationHour != null) {
173                            setDurationHour(durationHour);
174                    }
175    
176                    Integer durationMinute = (Integer)attributes.get("durationMinute");
177    
178                    if (durationMinute != null) {
179                            setDurationMinute(durationMinute);
180                    }
181    
182                    Boolean allDay = (Boolean)attributes.get("allDay");
183    
184                    if (allDay != null) {
185                            setAllDay(allDay);
186                    }
187    
188                    Boolean timeZoneSensitive = (Boolean)attributes.get("timeZoneSensitive");
189    
190                    if (timeZoneSensitive != null) {
191                            setTimeZoneSensitive(timeZoneSensitive);
192                    }
193    
194                    String type = (String)attributes.get("type");
195    
196                    if (type != null) {
197                            setType(type);
198                    }
199    
200                    Boolean repeating = (Boolean)attributes.get("repeating");
201    
202                    if (repeating != null) {
203                            setRepeating(repeating);
204                    }
205    
206                    String recurrence = (String)attributes.get("recurrence");
207    
208                    if (recurrence != null) {
209                            setRecurrence(recurrence);
210                    }
211    
212                    Integer remindBy = (Integer)attributes.get("remindBy");
213    
214                    if (remindBy != null) {
215                            setRemindBy(remindBy);
216                    }
217    
218                    Integer firstReminder = (Integer)attributes.get("firstReminder");
219    
220                    if (firstReminder != null) {
221                            setFirstReminder(firstReminder);
222                    }
223    
224                    Integer secondReminder = (Integer)attributes.get("secondReminder");
225    
226                    if (secondReminder != null) {
227                            setSecondReminder(secondReminder);
228                    }
229            }
230    
231            @Override
232            public java.lang.Object clone() {
233                    return new CalEventWrapper((CalEvent)_calEvent.clone());
234            }
235    
236            @Override
237            public int compareTo(com.liferay.portlet.calendar.model.CalEvent calEvent) {
238                    return _calEvent.compareTo(calEvent);
239            }
240    
241            /**
242            * Returns the all day of this cal event.
243            *
244            * @return the all day of this cal event
245            */
246            @Override
247            public boolean getAllDay() {
248                    return _calEvent.getAllDay();
249            }
250    
251            /**
252            * Returns the company ID of this cal event.
253            *
254            * @return the company ID of this cal event
255            */
256            @Override
257            public long getCompanyId() {
258                    return _calEvent.getCompanyId();
259            }
260    
261            /**
262            * Returns the create date of this cal event.
263            *
264            * @return the create date of this cal event
265            */
266            @Override
267            public Date getCreateDate() {
268                    return _calEvent.getCreateDate();
269            }
270    
271            /**
272            * Returns the description of this cal event.
273            *
274            * @return the description of this cal event
275            */
276            @Override
277            public java.lang.String getDescription() {
278                    return _calEvent.getDescription();
279            }
280    
281            /**
282            * Returns the duration hour of this cal event.
283            *
284            * @return the duration hour of this cal event
285            */
286            @Override
287            public int getDurationHour() {
288                    return _calEvent.getDurationHour();
289            }
290    
291            /**
292            * Returns the duration minute of this cal event.
293            *
294            * @return the duration minute of this cal event
295            */
296            @Override
297            public int getDurationMinute() {
298                    return _calEvent.getDurationMinute();
299            }
300    
301            /**
302            * Returns the end date of this cal event.
303            *
304            * @return the end date of this cal event
305            */
306            @Override
307            public Date getEndDate() {
308                    return _calEvent.getEndDate();
309            }
310    
311            /**
312            * Returns the event ID of this cal event.
313            *
314            * @return the event ID of this cal event
315            */
316            @Override
317            public long getEventId() {
318                    return _calEvent.getEventId();
319            }
320    
321            @Override
322            public ExpandoBridge getExpandoBridge() {
323                    return _calEvent.getExpandoBridge();
324            }
325    
326            /**
327            * Returns the first reminder of this cal event.
328            *
329            * @return the first reminder of this cal event
330            */
331            @Override
332            public int getFirstReminder() {
333                    return _calEvent.getFirstReminder();
334            }
335    
336            /**
337            * Returns the group ID of this cal event.
338            *
339            * @return the group ID of this cal event
340            */
341            @Override
342            public long getGroupId() {
343                    return _calEvent.getGroupId();
344            }
345    
346            /**
347            * Returns the location of this cal event.
348            *
349            * @return the location of this cal event
350            */
351            @Override
352            public java.lang.String getLocation() {
353                    return _calEvent.getLocation();
354            }
355    
356            /**
357            * Returns the modified date of this cal event.
358            *
359            * @return the modified date of this cal event
360            */
361            @Override
362            public Date getModifiedDate() {
363                    return _calEvent.getModifiedDate();
364            }
365    
366            /**
367            * Returns the primary key of this cal event.
368            *
369            * @return the primary key of this cal event
370            */
371            @Override
372            public long getPrimaryKey() {
373                    return _calEvent.getPrimaryKey();
374            }
375    
376            @Override
377            public Serializable getPrimaryKeyObj() {
378                    return _calEvent.getPrimaryKeyObj();
379            }
380    
381            /**
382            * Returns the recurrence of this cal event.
383            *
384            * @return the recurrence of this cal event
385            */
386            @Override
387            public java.lang.String getRecurrence() {
388                    return _calEvent.getRecurrence();
389            }
390    
391            @Override
392            public com.liferay.portal.kernel.cal.TZSRecurrence getRecurrenceObj() {
393                    return _calEvent.getRecurrenceObj();
394            }
395    
396            /**
397            * Returns the remind by of this cal event.
398            *
399            * @return the remind by of this cal event
400            */
401            @Override
402            public int getRemindBy() {
403                    return _calEvent.getRemindBy();
404            }
405    
406            /**
407            * Returns the repeating of this cal event.
408            *
409            * @return the repeating of this cal event
410            */
411            @Override
412            public boolean getRepeating() {
413                    return _calEvent.getRepeating();
414            }
415    
416            /**
417            * Returns the second reminder of this cal event.
418            *
419            * @return the second reminder of this cal event
420            */
421            @Override
422            public int getSecondReminder() {
423                    return _calEvent.getSecondReminder();
424            }
425    
426            /**
427            * Returns the start date of this cal event.
428            *
429            * @return the start date of this cal event
430            */
431            @Override
432            public Date getStartDate() {
433                    return _calEvent.getStartDate();
434            }
435    
436            /**
437            * Returns the time zone sensitive of this cal event.
438            *
439            * @return the time zone sensitive of this cal event
440            */
441            @Override
442            public boolean getTimeZoneSensitive() {
443                    return _calEvent.getTimeZoneSensitive();
444            }
445    
446            /**
447            * Returns the title of this cal event.
448            *
449            * @return the title of this cal event
450            */
451            @Override
452            public java.lang.String getTitle() {
453                    return _calEvent.getTitle();
454            }
455    
456            /**
457            * Returns the type of this cal event.
458            *
459            * @return the type of this cal event
460            */
461            @Override
462            public java.lang.String getType() {
463                    return _calEvent.getType();
464            }
465    
466            /**
467            * Returns the user ID of this cal event.
468            *
469            * @return the user ID of this cal event
470            */
471            @Override
472            public long getUserId() {
473                    return _calEvent.getUserId();
474            }
475    
476            /**
477            * Returns the user name of this cal event.
478            *
479            * @return the user name of this cal event
480            */
481            @Override
482            public java.lang.String getUserName() {
483                    return _calEvent.getUserName();
484            }
485    
486            /**
487            * Returns the user uuid of this cal event.
488            *
489            * @return the user uuid of this cal event
490            */
491            @Override
492            public java.lang.String getUserUuid() {
493                    return _calEvent.getUserUuid();
494            }
495    
496            /**
497            * Returns the uuid of this cal event.
498            *
499            * @return the uuid of this cal event
500            */
501            @Override
502            public java.lang.String getUuid() {
503                    return _calEvent.getUuid();
504            }
505    
506            @Override
507            public int hashCode() {
508                    return _calEvent.hashCode();
509            }
510    
511            /**
512            * Returns <code>true</code> if this cal event is all day.
513            *
514            * @return <code>true</code> if this cal event is all day; <code>false</code> otherwise
515            */
516            @Override
517            public boolean isAllDay() {
518                    return _calEvent.isAllDay();
519            }
520    
521            @Override
522            public boolean isCachedModel() {
523                    return _calEvent.isCachedModel();
524            }
525    
526            @Override
527            public boolean isEscapedModel() {
528                    return _calEvent.isEscapedModel();
529            }
530    
531            @Override
532            public boolean isNew() {
533                    return _calEvent.isNew();
534            }
535    
536            /**
537            * Returns <code>true</code> if this cal event is repeating.
538            *
539            * @return <code>true</code> if this cal event is repeating; <code>false</code> otherwise
540            */
541            @Override
542            public boolean isRepeating() {
543                    return _calEvent.isRepeating();
544            }
545    
546            /**
547            * Returns <code>true</code> if this cal event is time zone sensitive.
548            *
549            * @return <code>true</code> if this cal event is time zone sensitive; <code>false</code> otherwise
550            */
551            @Override
552            public boolean isTimeZoneSensitive() {
553                    return _calEvent.isTimeZoneSensitive();
554            }
555    
556            @Override
557            public void persist() {
558                    _calEvent.persist();
559            }
560    
561            /**
562            * Sets whether this cal event is all day.
563            *
564            * @param allDay the all day of this cal event
565            */
566            @Override
567            public void setAllDay(boolean allDay) {
568                    _calEvent.setAllDay(allDay);
569            }
570    
571            @Override
572            public void setCachedModel(boolean cachedModel) {
573                    _calEvent.setCachedModel(cachedModel);
574            }
575    
576            /**
577            * Sets the company ID of this cal event.
578            *
579            * @param companyId the company ID of this cal event
580            */
581            @Override
582            public void setCompanyId(long companyId) {
583                    _calEvent.setCompanyId(companyId);
584            }
585    
586            /**
587            * Sets the create date of this cal event.
588            *
589            * @param createDate the create date of this cal event
590            */
591            @Override
592            public void setCreateDate(Date createDate) {
593                    _calEvent.setCreateDate(createDate);
594            }
595    
596            /**
597            * Sets the description of this cal event.
598            *
599            * @param description the description of this cal event
600            */
601            @Override
602            public void setDescription(java.lang.String description) {
603                    _calEvent.setDescription(description);
604            }
605    
606            /**
607            * Sets the duration hour of this cal event.
608            *
609            * @param durationHour the duration hour of this cal event
610            */
611            @Override
612            public void setDurationHour(int durationHour) {
613                    _calEvent.setDurationHour(durationHour);
614            }
615    
616            /**
617            * Sets the duration minute of this cal event.
618            *
619            * @param durationMinute the duration minute of this cal event
620            */
621            @Override
622            public void setDurationMinute(int durationMinute) {
623                    _calEvent.setDurationMinute(durationMinute);
624            }
625    
626            /**
627            * Sets the end date of this cal event.
628            *
629            * @param endDate the end date of this cal event
630            */
631            @Override
632            public void setEndDate(Date endDate) {
633                    _calEvent.setEndDate(endDate);
634            }
635    
636            /**
637            * Sets the event ID of this cal event.
638            *
639            * @param eventId the event ID of this cal event
640            */
641            @Override
642            public void setEventId(long eventId) {
643                    _calEvent.setEventId(eventId);
644            }
645    
646            @Override
647            public void setExpandoBridgeAttributes(
648                    com.liferay.portal.model.BaseModel<?> baseModel) {
649                    _calEvent.setExpandoBridgeAttributes(baseModel);
650            }
651    
652            @Override
653            public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
654                    _calEvent.setExpandoBridgeAttributes(expandoBridge);
655            }
656    
657            @Override
658            public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
659                    _calEvent.setExpandoBridgeAttributes(serviceContext);
660            }
661    
662            /**
663            * Sets the first reminder of this cal event.
664            *
665            * @param firstReminder the first reminder of this cal event
666            */
667            @Override
668            public void setFirstReminder(int firstReminder) {
669                    _calEvent.setFirstReminder(firstReminder);
670            }
671    
672            /**
673            * Sets the group ID of this cal event.
674            *
675            * @param groupId the group ID of this cal event
676            */
677            @Override
678            public void setGroupId(long groupId) {
679                    _calEvent.setGroupId(groupId);
680            }
681    
682            /**
683            * Sets the location of this cal event.
684            *
685            * @param location the location of this cal event
686            */
687            @Override
688            public void setLocation(java.lang.String location) {
689                    _calEvent.setLocation(location);
690            }
691    
692            /**
693            * Sets the modified date of this cal event.
694            *
695            * @param modifiedDate the modified date of this cal event
696            */
697            @Override
698            public void setModifiedDate(Date modifiedDate) {
699                    _calEvent.setModifiedDate(modifiedDate);
700            }
701    
702            @Override
703            public void setNew(boolean n) {
704                    _calEvent.setNew(n);
705            }
706    
707            /**
708            * Sets the primary key of this cal event.
709            *
710            * @param primaryKey the primary key of this cal event
711            */
712            @Override
713            public void setPrimaryKey(long primaryKey) {
714                    _calEvent.setPrimaryKey(primaryKey);
715            }
716    
717            @Override
718            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
719                    _calEvent.setPrimaryKeyObj(primaryKeyObj);
720            }
721    
722            /**
723            * Sets the recurrence of this cal event.
724            *
725            * @param recurrence the recurrence of this cal event
726            */
727            @Override
728            public void setRecurrence(java.lang.String recurrence) {
729                    _calEvent.setRecurrence(recurrence);
730            }
731    
732            @Override
733            public void setRecurrenceObj(
734                    com.liferay.portal.kernel.cal.TZSRecurrence recurrenceObj) {
735                    _calEvent.setRecurrenceObj(recurrenceObj);
736            }
737    
738            /**
739            * Sets the remind by of this cal event.
740            *
741            * @param remindBy the remind by of this cal event
742            */
743            @Override
744            public void setRemindBy(int remindBy) {
745                    _calEvent.setRemindBy(remindBy);
746            }
747    
748            /**
749            * Sets whether this cal event is repeating.
750            *
751            * @param repeating the repeating of this cal event
752            */
753            @Override
754            public void setRepeating(boolean repeating) {
755                    _calEvent.setRepeating(repeating);
756            }
757    
758            /**
759            * Sets the second reminder of this cal event.
760            *
761            * @param secondReminder the second reminder of this cal event
762            */
763            @Override
764            public void setSecondReminder(int secondReminder) {
765                    _calEvent.setSecondReminder(secondReminder);
766            }
767    
768            /**
769            * Sets the start date of this cal event.
770            *
771            * @param startDate the start date of this cal event
772            */
773            @Override
774            public void setStartDate(Date startDate) {
775                    _calEvent.setStartDate(startDate);
776            }
777    
778            /**
779            * Sets whether this cal event is time zone sensitive.
780            *
781            * @param timeZoneSensitive the time zone sensitive of this cal event
782            */
783            @Override
784            public void setTimeZoneSensitive(boolean timeZoneSensitive) {
785                    _calEvent.setTimeZoneSensitive(timeZoneSensitive);
786            }
787    
788            /**
789            * Sets the title of this cal event.
790            *
791            * @param title the title of this cal event
792            */
793            @Override
794            public void setTitle(java.lang.String title) {
795                    _calEvent.setTitle(title);
796            }
797    
798            /**
799            * Sets the type of this cal event.
800            *
801            * @param type the type of this cal event
802            */
803            @Override
804            public void setType(java.lang.String type) {
805                    _calEvent.setType(type);
806            }
807    
808            /**
809            * Sets the user ID of this cal event.
810            *
811            * @param userId the user ID of this cal event
812            */
813            @Override
814            public void setUserId(long userId) {
815                    _calEvent.setUserId(userId);
816            }
817    
818            /**
819            * Sets the user name of this cal event.
820            *
821            * @param userName the user name of this cal event
822            */
823            @Override
824            public void setUserName(java.lang.String userName) {
825                    _calEvent.setUserName(userName);
826            }
827    
828            /**
829            * Sets the user uuid of this cal event.
830            *
831            * @param userUuid the user uuid of this cal event
832            */
833            @Override
834            public void setUserUuid(java.lang.String userUuid) {
835                    _calEvent.setUserUuid(userUuid);
836            }
837    
838            /**
839            * Sets the uuid of this cal event.
840            *
841            * @param uuid the uuid of this cal event
842            */
843            @Override
844            public void setUuid(java.lang.String uuid) {
845                    _calEvent.setUuid(uuid);
846            }
847    
848            @Override
849            public com.liferay.portal.model.CacheModel<com.liferay.portlet.calendar.model.CalEvent> toCacheModel() {
850                    return _calEvent.toCacheModel();
851            }
852    
853            @Override
854            public com.liferay.portlet.calendar.model.CalEvent toEscapedModel() {
855                    return new CalEventWrapper(_calEvent.toEscapedModel());
856            }
857    
858            @Override
859            public java.lang.String toString() {
860                    return _calEvent.toString();
861            }
862    
863            @Override
864            public com.liferay.portlet.calendar.model.CalEvent toUnescapedModel() {
865                    return new CalEventWrapper(_calEvent.toUnescapedModel());
866            }
867    
868            @Override
869            public java.lang.String toXmlString() {
870                    return _calEvent.toXmlString();
871            }
872    
873            @Override
874            public boolean equals(Object obj) {
875                    if (this == obj) {
876                            return true;
877                    }
878    
879                    if (!(obj instanceof CalEventWrapper)) {
880                            return false;
881                    }
882    
883                    CalEventWrapper calEventWrapper = (CalEventWrapper)obj;
884    
885                    if (Validator.equals(_calEvent, calEventWrapper._calEvent)) {
886                            return true;
887                    }
888    
889                    return false;
890            }
891    
892            @Override
893            public StagedModelType getStagedModelType() {
894                    return _calEvent.getStagedModelType();
895            }
896    
897            @Override
898            public CalEvent getWrappedModel() {
899                    return _calEvent;
900            }
901    
902            @Override
903            public boolean isEntityCacheEnabled() {
904                    return _calEvent.isEntityCacheEnabled();
905            }
906    
907            @Override
908            public boolean isFinderCacheEnabled() {
909                    return _calEvent.isFinderCacheEnabled();
910            }
911    
912            @Override
913            public void resetOriginalValues() {
914                    _calEvent.resetOriginalValues();
915            }
916    
917            private final CalEvent _calEvent;
918    }