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