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.service.base;
016    
017    import com.liferay.counter.service.CounterLocalService;
018    
019    import com.liferay.mail.service.MailService;
020    
021    import com.liferay.portal.kernel.bean.BeanReference;
022    import com.liferay.portal.kernel.bean.IdentifiableBean;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
027    import com.liferay.portal.kernel.exception.PortalException;
028    import com.liferay.portal.kernel.exception.SystemException;
029    import com.liferay.portal.kernel.search.Indexable;
030    import com.liferay.portal.kernel.search.IndexableType;
031    import com.liferay.portal.kernel.util.OrderByComparator;
032    import com.liferay.portal.model.PersistedModel;
033    import com.liferay.portal.service.BaseLocalServiceImpl;
034    import com.liferay.portal.service.CompanyLocalService;
035    import com.liferay.portal.service.CompanyService;
036    import com.liferay.portal.service.GroupLocalService;
037    import com.liferay.portal.service.GroupService;
038    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
039    import com.liferay.portal.service.PortletPreferencesLocalService;
040    import com.liferay.portal.service.PortletPreferencesService;
041    import com.liferay.portal.service.ResourceLocalService;
042    import com.liferay.portal.service.ResourceService;
043    import com.liferay.portal.service.SubscriptionLocalService;
044    import com.liferay.portal.service.UserLocalService;
045    import com.liferay.portal.service.UserService;
046    import com.liferay.portal.service.persistence.CompanyPersistence;
047    import com.liferay.portal.service.persistence.GroupFinder;
048    import com.liferay.portal.service.persistence.GroupPersistence;
049    import com.liferay.portal.service.persistence.PortletPreferencesFinder;
050    import com.liferay.portal.service.persistence.PortletPreferencesPersistence;
051    import com.liferay.portal.service.persistence.ResourceFinder;
052    import com.liferay.portal.service.persistence.ResourcePersistence;
053    import com.liferay.portal.service.persistence.SubscriptionPersistence;
054    import com.liferay.portal.service.persistence.UserFinder;
055    import com.liferay.portal.service.persistence.UserPersistence;
056    
057    import com.liferay.portlet.asset.service.AssetEntryLocalService;
058    import com.liferay.portlet.asset.service.AssetEntryService;
059    import com.liferay.portlet.asset.service.AssetLinkLocalService;
060    import com.liferay.portlet.asset.service.AssetTagLocalService;
061    import com.liferay.portlet.asset.service.AssetTagService;
062    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
063    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
064    import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence;
065    import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
066    import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
067    import com.liferay.portlet.calendar.model.CalEvent;
068    import com.liferay.portlet.calendar.service.CalEventLocalService;
069    import com.liferay.portlet.calendar.service.CalEventService;
070    import com.liferay.portlet.calendar.service.persistence.CalEventFinder;
071    import com.liferay.portlet.calendar.service.persistence.CalEventPersistence;
072    import com.liferay.portlet.expando.service.ExpandoValueLocalService;
073    import com.liferay.portlet.expando.service.ExpandoValueService;
074    import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
075    import com.liferay.portlet.messageboards.service.MBMessageLocalService;
076    import com.liferay.portlet.messageboards.service.MBMessageService;
077    import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
078    import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
079    import com.liferay.portlet.social.service.SocialActivityLocalService;
080    import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
081    import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
082    
083    import java.io.Serializable;
084    
085    import java.util.List;
086    
087    import javax.sql.DataSource;
088    
089    /**
090     * The base implementation of the cal event local service.
091     *
092     * <p>
093     * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.portlet.calendar.service.impl.CalEventLocalServiceImpl}.
094     * </p>
095     *
096     * @author Brian Wing Shun Chan
097     * @see com.liferay.portlet.calendar.service.impl.CalEventLocalServiceImpl
098     * @see com.liferay.portlet.calendar.service.CalEventLocalServiceUtil
099     * @generated
100     */
101    public abstract class CalEventLocalServiceBaseImpl extends BaseLocalServiceImpl
102            implements CalEventLocalService, IdentifiableBean {
103            /*
104             * NOTE FOR DEVELOPERS:
105             *
106             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.calendar.service.CalEventLocalServiceUtil} to access the cal event local service.
107             */
108    
109            /**
110             * Adds the cal event to the database. Also notifies the appropriate model listeners.
111             *
112             * @param calEvent the cal event
113             * @return the cal event that was added
114             * @throws SystemException if a system exception occurred
115             */
116            @Indexable(type = IndexableType.REINDEX)
117            public CalEvent addCalEvent(CalEvent calEvent) throws SystemException {
118                    calEvent.setNew(true);
119    
120                    return calEventPersistence.update(calEvent, false);
121            }
122    
123            /**
124             * Creates a new cal event with the primary key. Does not add the cal event to the database.
125             *
126             * @param eventId the primary key for the new cal event
127             * @return the new cal event
128             */
129            public CalEvent createCalEvent(long eventId) {
130                    return calEventPersistence.create(eventId);
131            }
132    
133            /**
134             * Deletes the cal event with the primary key from the database. Also notifies the appropriate model listeners.
135             *
136             * @param eventId the primary key of the cal event
137             * @return the cal event that was removed
138             * @throws PortalException if a cal event with the primary key could not be found
139             * @throws SystemException if a system exception occurred
140             */
141            @Indexable(type = IndexableType.DELETE)
142            public CalEvent deleteCalEvent(long eventId)
143                    throws PortalException, SystemException {
144                    return calEventPersistence.remove(eventId);
145            }
146    
147            /**
148             * Deletes the cal event from the database. Also notifies the appropriate model listeners.
149             *
150             * @param calEvent the cal event
151             * @return the cal event that was removed
152             * @throws SystemException if a system exception occurred
153             */
154            @Indexable(type = IndexableType.DELETE)
155            public CalEvent deleteCalEvent(CalEvent calEvent) throws SystemException {
156                    return calEventPersistence.remove(calEvent);
157            }
158    
159            public DynamicQuery dynamicQuery() {
160                    Class<?> clazz = getClass();
161    
162                    return DynamicQueryFactoryUtil.forClass(CalEvent.class,
163                            clazz.getClassLoader());
164            }
165    
166            /**
167             * Performs a dynamic query on the database and returns the matching rows.
168             *
169             * @param dynamicQuery the dynamic query
170             * @return the matching rows
171             * @throws SystemException if a system exception occurred
172             */
173            @SuppressWarnings("rawtypes")
174            public List dynamicQuery(DynamicQuery dynamicQuery)
175                    throws SystemException {
176                    return calEventPersistence.findWithDynamicQuery(dynamicQuery);
177            }
178    
179            /**
180             * Performs a dynamic query on the database and returns a range of the matching rows.
181             *
182             * <p>
183             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
184             * </p>
185             *
186             * @param dynamicQuery the dynamic query
187             * @param start the lower bound of the range of model instances
188             * @param end the upper bound of the range of model instances (not inclusive)
189             * @return the range of matching rows
190             * @throws SystemException if a system exception occurred
191             */
192            @SuppressWarnings("rawtypes")
193            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
194                    throws SystemException {
195                    return calEventPersistence.findWithDynamicQuery(dynamicQuery, start, end);
196            }
197    
198            /**
199             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
200             *
201             * <p>
202             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
203             * </p>
204             *
205             * @param dynamicQuery the dynamic query
206             * @param start the lower bound of the range of model instances
207             * @param end the upper bound of the range of model instances (not inclusive)
208             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
209             * @return the ordered range of matching rows
210             * @throws SystemException if a system exception occurred
211             */
212            @SuppressWarnings("rawtypes")
213            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
214                    OrderByComparator orderByComparator) throws SystemException {
215                    return calEventPersistence.findWithDynamicQuery(dynamicQuery, start,
216                            end, orderByComparator);
217            }
218    
219            /**
220             * Returns the number of rows that match the dynamic query.
221             *
222             * @param dynamicQuery the dynamic query
223             * @return the number of rows that match the dynamic query
224             * @throws SystemException if a system exception occurred
225             */
226            public long dynamicQueryCount(DynamicQuery dynamicQuery)
227                    throws SystemException {
228                    return calEventPersistence.countWithDynamicQuery(dynamicQuery);
229            }
230    
231            public CalEvent fetchCalEvent(long eventId) throws SystemException {
232                    return calEventPersistence.fetchByPrimaryKey(eventId);
233            }
234    
235            /**
236             * Returns the cal event with the primary key.
237             *
238             * @param eventId the primary key of the cal event
239             * @return the cal event
240             * @throws PortalException if a cal event with the primary key could not be found
241             * @throws SystemException if a system exception occurred
242             */
243            public CalEvent getCalEvent(long eventId)
244                    throws PortalException, SystemException {
245                    return calEventPersistence.findByPrimaryKey(eventId);
246            }
247    
248            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
249                    throws PortalException, SystemException {
250                    return calEventPersistence.findByPrimaryKey(primaryKeyObj);
251            }
252    
253            /**
254             * Returns the cal event with the UUID in the group.
255             *
256             * @param uuid the UUID of cal event
257             * @param groupId the group id of the cal event
258             * @return the cal event
259             * @throws PortalException if a cal event with the UUID in the group could not be found
260             * @throws SystemException if a system exception occurred
261             */
262            public CalEvent getCalEventByUuidAndGroupId(String uuid, long groupId)
263                    throws PortalException, SystemException {
264                    return calEventPersistence.findByUUID_G(uuid, groupId);
265            }
266    
267            /**
268             * Returns a range of all the cal events.
269             *
270             * <p>
271             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
272             * </p>
273             *
274             * @param start the lower bound of the range of cal events
275             * @param end the upper bound of the range of cal events (not inclusive)
276             * @return the range of cal events
277             * @throws SystemException if a system exception occurred
278             */
279            public List<CalEvent> getCalEvents(int start, int end)
280                    throws SystemException {
281                    return calEventPersistence.findAll(start, end);
282            }
283    
284            /**
285             * Returns the number of cal events.
286             *
287             * @return the number of cal events
288             * @throws SystemException if a system exception occurred
289             */
290            public int getCalEventsCount() throws SystemException {
291                    return calEventPersistence.countAll();
292            }
293    
294            /**
295             * Updates the cal event in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
296             *
297             * @param calEvent the cal event
298             * @return the cal event that was updated
299             * @throws SystemException if a system exception occurred
300             */
301            @Indexable(type = IndexableType.REINDEX)
302            public CalEvent updateCalEvent(CalEvent calEvent) throws SystemException {
303                    return updateCalEvent(calEvent, true);
304            }
305    
306            /**
307             * Updates the cal event in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
308             *
309             * @param calEvent the cal event
310             * @param merge whether to merge the cal event with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
311             * @return the cal event that was updated
312             * @throws SystemException if a system exception occurred
313             */
314            @Indexable(type = IndexableType.REINDEX)
315            public CalEvent updateCalEvent(CalEvent calEvent, boolean merge)
316                    throws SystemException {
317                    calEvent.setNew(false);
318    
319                    return calEventPersistence.update(calEvent, merge);
320            }
321    
322            /**
323             * Returns the cal event local service.
324             *
325             * @return the cal event local service
326             */
327            public CalEventLocalService getCalEventLocalService() {
328                    return calEventLocalService;
329            }
330    
331            /**
332             * Sets the cal event local service.
333             *
334             * @param calEventLocalService the cal event local service
335             */
336            public void setCalEventLocalService(
337                    CalEventLocalService calEventLocalService) {
338                    this.calEventLocalService = calEventLocalService;
339            }
340    
341            /**
342             * Returns the cal event remote service.
343             *
344             * @return the cal event remote service
345             */
346            public CalEventService getCalEventService() {
347                    return calEventService;
348            }
349    
350            /**
351             * Sets the cal event remote service.
352             *
353             * @param calEventService the cal event remote service
354             */
355            public void setCalEventService(CalEventService calEventService) {
356                    this.calEventService = calEventService;
357            }
358    
359            /**
360             * Returns the cal event persistence.
361             *
362             * @return the cal event persistence
363             */
364            public CalEventPersistence getCalEventPersistence() {
365                    return calEventPersistence;
366            }
367    
368            /**
369             * Sets the cal event persistence.
370             *
371             * @param calEventPersistence the cal event persistence
372             */
373            public void setCalEventPersistence(CalEventPersistence calEventPersistence) {
374                    this.calEventPersistence = calEventPersistence;
375            }
376    
377            /**
378             * Returns the cal event finder.
379             *
380             * @return the cal event finder
381             */
382            public CalEventFinder getCalEventFinder() {
383                    return calEventFinder;
384            }
385    
386            /**
387             * Sets the cal event finder.
388             *
389             * @param calEventFinder the cal event finder
390             */
391            public void setCalEventFinder(CalEventFinder calEventFinder) {
392                    this.calEventFinder = calEventFinder;
393            }
394    
395            /**
396             * Returns the counter local service.
397             *
398             * @return the counter local service
399             */
400            public CounterLocalService getCounterLocalService() {
401                    return counterLocalService;
402            }
403    
404            /**
405             * Sets the counter local service.
406             *
407             * @param counterLocalService the counter local service
408             */
409            public void setCounterLocalService(CounterLocalService counterLocalService) {
410                    this.counterLocalService = counterLocalService;
411            }
412    
413            /**
414             * Returns the mail remote service.
415             *
416             * @return the mail remote service
417             */
418            public MailService getMailService() {
419                    return mailService;
420            }
421    
422            /**
423             * Sets the mail remote service.
424             *
425             * @param mailService the mail remote service
426             */
427            public void setMailService(MailService mailService) {
428                    this.mailService = mailService;
429            }
430    
431            /**
432             * Returns the company local service.
433             *
434             * @return the company local service
435             */
436            public CompanyLocalService getCompanyLocalService() {
437                    return companyLocalService;
438            }
439    
440            /**
441             * Sets the company local service.
442             *
443             * @param companyLocalService the company local service
444             */
445            public void setCompanyLocalService(CompanyLocalService companyLocalService) {
446                    this.companyLocalService = companyLocalService;
447            }
448    
449            /**
450             * Returns the company remote service.
451             *
452             * @return the company remote service
453             */
454            public CompanyService getCompanyService() {
455                    return companyService;
456            }
457    
458            /**
459             * Sets the company remote service.
460             *
461             * @param companyService the company remote service
462             */
463            public void setCompanyService(CompanyService companyService) {
464                    this.companyService = companyService;
465            }
466    
467            /**
468             * Returns the company persistence.
469             *
470             * @return the company persistence
471             */
472            public CompanyPersistence getCompanyPersistence() {
473                    return companyPersistence;
474            }
475    
476            /**
477             * Sets the company persistence.
478             *
479             * @param companyPersistence the company persistence
480             */
481            public void setCompanyPersistence(CompanyPersistence companyPersistence) {
482                    this.companyPersistence = companyPersistence;
483            }
484    
485            /**
486             * Returns the group local service.
487             *
488             * @return the group local service
489             */
490            public GroupLocalService getGroupLocalService() {
491                    return groupLocalService;
492            }
493    
494            /**
495             * Sets the group local service.
496             *
497             * @param groupLocalService the group local service
498             */
499            public void setGroupLocalService(GroupLocalService groupLocalService) {
500                    this.groupLocalService = groupLocalService;
501            }
502    
503            /**
504             * Returns the group remote service.
505             *
506             * @return the group remote service
507             */
508            public GroupService getGroupService() {
509                    return groupService;
510            }
511    
512            /**
513             * Sets the group remote service.
514             *
515             * @param groupService the group remote service
516             */
517            public void setGroupService(GroupService groupService) {
518                    this.groupService = groupService;
519            }
520    
521            /**
522             * Returns the group persistence.
523             *
524             * @return the group persistence
525             */
526            public GroupPersistence getGroupPersistence() {
527                    return groupPersistence;
528            }
529    
530            /**
531             * Sets the group persistence.
532             *
533             * @param groupPersistence the group persistence
534             */
535            public void setGroupPersistence(GroupPersistence groupPersistence) {
536                    this.groupPersistence = groupPersistence;
537            }
538    
539            /**
540             * Returns the group finder.
541             *
542             * @return the group finder
543             */
544            public GroupFinder getGroupFinder() {
545                    return groupFinder;
546            }
547    
548            /**
549             * Sets the group finder.
550             *
551             * @param groupFinder the group finder
552             */
553            public void setGroupFinder(GroupFinder groupFinder) {
554                    this.groupFinder = groupFinder;
555            }
556    
557            /**
558             * Returns the portlet preferences local service.
559             *
560             * @return the portlet preferences local service
561             */
562            public PortletPreferencesLocalService getPortletPreferencesLocalService() {
563                    return portletPreferencesLocalService;
564            }
565    
566            /**
567             * Sets the portlet preferences local service.
568             *
569             * @param portletPreferencesLocalService the portlet preferences local service
570             */
571            public void setPortletPreferencesLocalService(
572                    PortletPreferencesLocalService portletPreferencesLocalService) {
573                    this.portletPreferencesLocalService = portletPreferencesLocalService;
574            }
575    
576            /**
577             * Returns the portlet preferences remote service.
578             *
579             * @return the portlet preferences remote service
580             */
581            public PortletPreferencesService getPortletPreferencesService() {
582                    return portletPreferencesService;
583            }
584    
585            /**
586             * Sets the portlet preferences remote service.
587             *
588             * @param portletPreferencesService the portlet preferences remote service
589             */
590            public void setPortletPreferencesService(
591                    PortletPreferencesService portletPreferencesService) {
592                    this.portletPreferencesService = portletPreferencesService;
593            }
594    
595            /**
596             * Returns the portlet preferences persistence.
597             *
598             * @return the portlet preferences persistence
599             */
600            public PortletPreferencesPersistence getPortletPreferencesPersistence() {
601                    return portletPreferencesPersistence;
602            }
603    
604            /**
605             * Sets the portlet preferences persistence.
606             *
607             * @param portletPreferencesPersistence the portlet preferences persistence
608             */
609            public void setPortletPreferencesPersistence(
610                    PortletPreferencesPersistence portletPreferencesPersistence) {
611                    this.portletPreferencesPersistence = portletPreferencesPersistence;
612            }
613    
614            /**
615             * Returns the portlet preferences finder.
616             *
617             * @return the portlet preferences finder
618             */
619            public PortletPreferencesFinder getPortletPreferencesFinder() {
620                    return portletPreferencesFinder;
621            }
622    
623            /**
624             * Sets the portlet preferences finder.
625             *
626             * @param portletPreferencesFinder the portlet preferences finder
627             */
628            public void setPortletPreferencesFinder(
629                    PortletPreferencesFinder portletPreferencesFinder) {
630                    this.portletPreferencesFinder = portletPreferencesFinder;
631            }
632    
633            /**
634             * Returns the resource local service.
635             *
636             * @return the resource local service
637             */
638            public ResourceLocalService getResourceLocalService() {
639                    return resourceLocalService;
640            }
641    
642            /**
643             * Sets the resource local service.
644             *
645             * @param resourceLocalService the resource local service
646             */
647            public void setResourceLocalService(
648                    ResourceLocalService resourceLocalService) {
649                    this.resourceLocalService = resourceLocalService;
650            }
651    
652            /**
653             * Returns the resource remote service.
654             *
655             * @return the resource remote service
656             */
657            public ResourceService getResourceService() {
658                    return resourceService;
659            }
660    
661            /**
662             * Sets the resource remote service.
663             *
664             * @param resourceService the resource remote service
665             */
666            public void setResourceService(ResourceService resourceService) {
667                    this.resourceService = resourceService;
668            }
669    
670            /**
671             * Returns the resource persistence.
672             *
673             * @return the resource persistence
674             */
675            public ResourcePersistence getResourcePersistence() {
676                    return resourcePersistence;
677            }
678    
679            /**
680             * Sets the resource persistence.
681             *
682             * @param resourcePersistence the resource persistence
683             */
684            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
685                    this.resourcePersistence = resourcePersistence;
686            }
687    
688            /**
689             * Returns the resource finder.
690             *
691             * @return the resource finder
692             */
693            public ResourceFinder getResourceFinder() {
694                    return resourceFinder;
695            }
696    
697            /**
698             * Sets the resource finder.
699             *
700             * @param resourceFinder the resource finder
701             */
702            public void setResourceFinder(ResourceFinder resourceFinder) {
703                    this.resourceFinder = resourceFinder;
704            }
705    
706            /**
707             * Returns the subscription local service.
708             *
709             * @return the subscription local service
710             */
711            public SubscriptionLocalService getSubscriptionLocalService() {
712                    return subscriptionLocalService;
713            }
714    
715            /**
716             * Sets the subscription local service.
717             *
718             * @param subscriptionLocalService the subscription local service
719             */
720            public void setSubscriptionLocalService(
721                    SubscriptionLocalService subscriptionLocalService) {
722                    this.subscriptionLocalService = subscriptionLocalService;
723            }
724    
725            /**
726             * Returns the subscription persistence.
727             *
728             * @return the subscription persistence
729             */
730            public SubscriptionPersistence getSubscriptionPersistence() {
731                    return subscriptionPersistence;
732            }
733    
734            /**
735             * Sets the subscription persistence.
736             *
737             * @param subscriptionPersistence the subscription persistence
738             */
739            public void setSubscriptionPersistence(
740                    SubscriptionPersistence subscriptionPersistence) {
741                    this.subscriptionPersistence = subscriptionPersistence;
742            }
743    
744            /**
745             * Returns the user local service.
746             *
747             * @return the user local service
748             */
749            public UserLocalService getUserLocalService() {
750                    return userLocalService;
751            }
752    
753            /**
754             * Sets the user local service.
755             *
756             * @param userLocalService the user local service
757             */
758            public void setUserLocalService(UserLocalService userLocalService) {
759                    this.userLocalService = userLocalService;
760            }
761    
762            /**
763             * Returns the user remote service.
764             *
765             * @return the user remote service
766             */
767            public UserService getUserService() {
768                    return userService;
769            }
770    
771            /**
772             * Sets the user remote service.
773             *
774             * @param userService the user remote service
775             */
776            public void setUserService(UserService userService) {
777                    this.userService = userService;
778            }
779    
780            /**
781             * Returns the user persistence.
782             *
783             * @return the user persistence
784             */
785            public UserPersistence getUserPersistence() {
786                    return userPersistence;
787            }
788    
789            /**
790             * Sets the user persistence.
791             *
792             * @param userPersistence the user persistence
793             */
794            public void setUserPersistence(UserPersistence userPersistence) {
795                    this.userPersistence = userPersistence;
796            }
797    
798            /**
799             * Returns the user finder.
800             *
801             * @return the user finder
802             */
803            public UserFinder getUserFinder() {
804                    return userFinder;
805            }
806    
807            /**
808             * Sets the user finder.
809             *
810             * @param userFinder the user finder
811             */
812            public void setUserFinder(UserFinder userFinder) {
813                    this.userFinder = userFinder;
814            }
815    
816            /**
817             * Returns the asset entry local service.
818             *
819             * @return the asset entry local service
820             */
821            public AssetEntryLocalService getAssetEntryLocalService() {
822                    return assetEntryLocalService;
823            }
824    
825            /**
826             * Sets the asset entry local service.
827             *
828             * @param assetEntryLocalService the asset entry local service
829             */
830            public void setAssetEntryLocalService(
831                    AssetEntryLocalService assetEntryLocalService) {
832                    this.assetEntryLocalService = assetEntryLocalService;
833            }
834    
835            /**
836             * Returns the asset entry remote service.
837             *
838             * @return the asset entry remote service
839             */
840            public AssetEntryService getAssetEntryService() {
841                    return assetEntryService;
842            }
843    
844            /**
845             * Sets the asset entry remote service.
846             *
847             * @param assetEntryService the asset entry remote service
848             */
849            public void setAssetEntryService(AssetEntryService assetEntryService) {
850                    this.assetEntryService = assetEntryService;
851            }
852    
853            /**
854             * Returns the asset entry persistence.
855             *
856             * @return the asset entry persistence
857             */
858            public AssetEntryPersistence getAssetEntryPersistence() {
859                    return assetEntryPersistence;
860            }
861    
862            /**
863             * Sets the asset entry persistence.
864             *
865             * @param assetEntryPersistence the asset entry persistence
866             */
867            public void setAssetEntryPersistence(
868                    AssetEntryPersistence assetEntryPersistence) {
869                    this.assetEntryPersistence = assetEntryPersistence;
870            }
871    
872            /**
873             * Returns the asset entry finder.
874             *
875             * @return the asset entry finder
876             */
877            public AssetEntryFinder getAssetEntryFinder() {
878                    return assetEntryFinder;
879            }
880    
881            /**
882             * Sets the asset entry finder.
883             *
884             * @param assetEntryFinder the asset entry finder
885             */
886            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
887                    this.assetEntryFinder = assetEntryFinder;
888            }
889    
890            /**
891             * Returns the asset link local service.
892             *
893             * @return the asset link local service
894             */
895            public AssetLinkLocalService getAssetLinkLocalService() {
896                    return assetLinkLocalService;
897            }
898    
899            /**
900             * Sets the asset link local service.
901             *
902             * @param assetLinkLocalService the asset link local service
903             */
904            public void setAssetLinkLocalService(
905                    AssetLinkLocalService assetLinkLocalService) {
906                    this.assetLinkLocalService = assetLinkLocalService;
907            }
908    
909            /**
910             * Returns the asset link persistence.
911             *
912             * @return the asset link persistence
913             */
914            public AssetLinkPersistence getAssetLinkPersistence() {
915                    return assetLinkPersistence;
916            }
917    
918            /**
919             * Sets the asset link persistence.
920             *
921             * @param assetLinkPersistence the asset link persistence
922             */
923            public void setAssetLinkPersistence(
924                    AssetLinkPersistence assetLinkPersistence) {
925                    this.assetLinkPersistence = assetLinkPersistence;
926            }
927    
928            /**
929             * Returns the asset tag local service.
930             *
931             * @return the asset tag local service
932             */
933            public AssetTagLocalService getAssetTagLocalService() {
934                    return assetTagLocalService;
935            }
936    
937            /**
938             * Sets the asset tag local service.
939             *
940             * @param assetTagLocalService the asset tag local service
941             */
942            public void setAssetTagLocalService(
943                    AssetTagLocalService assetTagLocalService) {
944                    this.assetTagLocalService = assetTagLocalService;
945            }
946    
947            /**
948             * Returns the asset tag remote service.
949             *
950             * @return the asset tag remote service
951             */
952            public AssetTagService getAssetTagService() {
953                    return assetTagService;
954            }
955    
956            /**
957             * Sets the asset tag remote service.
958             *
959             * @param assetTagService the asset tag remote service
960             */
961            public void setAssetTagService(AssetTagService assetTagService) {
962                    this.assetTagService = assetTagService;
963            }
964    
965            /**
966             * Returns the asset tag persistence.
967             *
968             * @return the asset tag persistence
969             */
970            public AssetTagPersistence getAssetTagPersistence() {
971                    return assetTagPersistence;
972            }
973    
974            /**
975             * Sets the asset tag persistence.
976             *
977             * @param assetTagPersistence the asset tag persistence
978             */
979            public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
980                    this.assetTagPersistence = assetTagPersistence;
981            }
982    
983            /**
984             * Returns the asset tag finder.
985             *
986             * @return the asset tag finder
987             */
988            public AssetTagFinder getAssetTagFinder() {
989                    return assetTagFinder;
990            }
991    
992            /**
993             * Sets the asset tag finder.
994             *
995             * @param assetTagFinder the asset tag finder
996             */
997            public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
998                    this.assetTagFinder = assetTagFinder;
999            }
1000    
1001            /**
1002             * Returns the expando value local service.
1003             *
1004             * @return the expando value local service
1005             */
1006            public ExpandoValueLocalService getExpandoValueLocalService() {
1007                    return expandoValueLocalService;
1008            }
1009    
1010            /**
1011             * Sets the expando value local service.
1012             *
1013             * @param expandoValueLocalService the expando value local service
1014             */
1015            public void setExpandoValueLocalService(
1016                    ExpandoValueLocalService expandoValueLocalService) {
1017                    this.expandoValueLocalService = expandoValueLocalService;
1018            }
1019    
1020            /**
1021             * Returns the expando value remote service.
1022             *
1023             * @return the expando value remote service
1024             */
1025            public ExpandoValueService getExpandoValueService() {
1026                    return expandoValueService;
1027            }
1028    
1029            /**
1030             * Sets the expando value remote service.
1031             *
1032             * @param expandoValueService the expando value remote service
1033             */
1034            public void setExpandoValueService(ExpandoValueService expandoValueService) {
1035                    this.expandoValueService = expandoValueService;
1036            }
1037    
1038            /**
1039             * Returns the expando value persistence.
1040             *
1041             * @return the expando value persistence
1042             */
1043            public ExpandoValuePersistence getExpandoValuePersistence() {
1044                    return expandoValuePersistence;
1045            }
1046    
1047            /**
1048             * Sets the expando value persistence.
1049             *
1050             * @param expandoValuePersistence the expando value persistence
1051             */
1052            public void setExpandoValuePersistence(
1053                    ExpandoValuePersistence expandoValuePersistence) {
1054                    this.expandoValuePersistence = expandoValuePersistence;
1055            }
1056    
1057            /**
1058             * Returns the message-boards message local service.
1059             *
1060             * @return the message-boards message local service
1061             */
1062            public MBMessageLocalService getMBMessageLocalService() {
1063                    return mbMessageLocalService;
1064            }
1065    
1066            /**
1067             * Sets the message-boards message local service.
1068             *
1069             * @param mbMessageLocalService the message-boards message local service
1070             */
1071            public void setMBMessageLocalService(
1072                    MBMessageLocalService mbMessageLocalService) {
1073                    this.mbMessageLocalService = mbMessageLocalService;
1074            }
1075    
1076            /**
1077             * Returns the message-boards message remote service.
1078             *
1079             * @return the message-boards message remote service
1080             */
1081            public MBMessageService getMBMessageService() {
1082                    return mbMessageService;
1083            }
1084    
1085            /**
1086             * Sets the message-boards message remote service.
1087             *
1088             * @param mbMessageService the message-boards message remote service
1089             */
1090            public void setMBMessageService(MBMessageService mbMessageService) {
1091                    this.mbMessageService = mbMessageService;
1092            }
1093    
1094            /**
1095             * Returns the message-boards message persistence.
1096             *
1097             * @return the message-boards message persistence
1098             */
1099            public MBMessagePersistence getMBMessagePersistence() {
1100                    return mbMessagePersistence;
1101            }
1102    
1103            /**
1104             * Sets the message-boards message persistence.
1105             *
1106             * @param mbMessagePersistence the message-boards message persistence
1107             */
1108            public void setMBMessagePersistence(
1109                    MBMessagePersistence mbMessagePersistence) {
1110                    this.mbMessagePersistence = mbMessagePersistence;
1111            }
1112    
1113            /**
1114             * Returns the message-boards message finder.
1115             *
1116             * @return the message-boards message finder
1117             */
1118            public MBMessageFinder getMBMessageFinder() {
1119                    return mbMessageFinder;
1120            }
1121    
1122            /**
1123             * Sets the message-boards message finder.
1124             *
1125             * @param mbMessageFinder the message-boards message finder
1126             */
1127            public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
1128                    this.mbMessageFinder = mbMessageFinder;
1129            }
1130    
1131            /**
1132             * Returns the social activity local service.
1133             *
1134             * @return the social activity local service
1135             */
1136            public SocialActivityLocalService getSocialActivityLocalService() {
1137                    return socialActivityLocalService;
1138            }
1139    
1140            /**
1141             * Sets the social activity local service.
1142             *
1143             * @param socialActivityLocalService the social activity local service
1144             */
1145            public void setSocialActivityLocalService(
1146                    SocialActivityLocalService socialActivityLocalService) {
1147                    this.socialActivityLocalService = socialActivityLocalService;
1148            }
1149    
1150            /**
1151             * Returns the social activity persistence.
1152             *
1153             * @return the social activity persistence
1154             */
1155            public SocialActivityPersistence getSocialActivityPersistence() {
1156                    return socialActivityPersistence;
1157            }
1158    
1159            /**
1160             * Sets the social activity persistence.
1161             *
1162             * @param socialActivityPersistence the social activity persistence
1163             */
1164            public void setSocialActivityPersistence(
1165                    SocialActivityPersistence socialActivityPersistence) {
1166                    this.socialActivityPersistence = socialActivityPersistence;
1167            }
1168    
1169            /**
1170             * Returns the social activity finder.
1171             *
1172             * @return the social activity finder
1173             */
1174            public SocialActivityFinder getSocialActivityFinder() {
1175                    return socialActivityFinder;
1176            }
1177    
1178            /**
1179             * Sets the social activity finder.
1180             *
1181             * @param socialActivityFinder the social activity finder
1182             */
1183            public void setSocialActivityFinder(
1184                    SocialActivityFinder socialActivityFinder) {
1185                    this.socialActivityFinder = socialActivityFinder;
1186            }
1187    
1188            public void afterPropertiesSet() {
1189                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.calendar.model.CalEvent",
1190                            calEventLocalService);
1191            }
1192    
1193            public void destroy() {
1194                    persistedModelLocalServiceRegistry.unregister(
1195                            "com.liferay.portlet.calendar.model.CalEvent");
1196            }
1197    
1198            /**
1199             * Returns the Spring bean ID for this bean.
1200             *
1201             * @return the Spring bean ID for this bean
1202             */
1203            public String getBeanIdentifier() {
1204                    return _beanIdentifier;
1205            }
1206    
1207            /**
1208             * Sets the Spring bean ID for this bean.
1209             *
1210             * @param beanIdentifier the Spring bean ID for this bean
1211             */
1212            public void setBeanIdentifier(String beanIdentifier) {
1213                    _beanIdentifier = beanIdentifier;
1214            }
1215    
1216            protected Class<?> getModelClass() {
1217                    return CalEvent.class;
1218            }
1219    
1220            protected String getModelClassName() {
1221                    return CalEvent.class.getName();
1222            }
1223    
1224            /**
1225             * Performs an SQL query.
1226             *
1227             * @param sql the sql query
1228             */
1229            protected void runSQL(String sql) throws SystemException {
1230                    try {
1231                            DataSource dataSource = calEventPersistence.getDataSource();
1232    
1233                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1234                                            sql, new int[0]);
1235    
1236                            sqlUpdate.update();
1237                    }
1238                    catch (Exception e) {
1239                            throw new SystemException(e);
1240                    }
1241            }
1242    
1243            @BeanReference(type = CalEventLocalService.class)
1244            protected CalEventLocalService calEventLocalService;
1245            @BeanReference(type = CalEventService.class)
1246            protected CalEventService calEventService;
1247            @BeanReference(type = CalEventPersistence.class)
1248            protected CalEventPersistence calEventPersistence;
1249            @BeanReference(type = CalEventFinder.class)
1250            protected CalEventFinder calEventFinder;
1251            @BeanReference(type = CounterLocalService.class)
1252            protected CounterLocalService counterLocalService;
1253            @BeanReference(type = MailService.class)
1254            protected MailService mailService;
1255            @BeanReference(type = CompanyLocalService.class)
1256            protected CompanyLocalService companyLocalService;
1257            @BeanReference(type = CompanyService.class)
1258            protected CompanyService companyService;
1259            @BeanReference(type = CompanyPersistence.class)
1260            protected CompanyPersistence companyPersistence;
1261            @BeanReference(type = GroupLocalService.class)
1262            protected GroupLocalService groupLocalService;
1263            @BeanReference(type = GroupService.class)
1264            protected GroupService groupService;
1265            @BeanReference(type = GroupPersistence.class)
1266            protected GroupPersistence groupPersistence;
1267            @BeanReference(type = GroupFinder.class)
1268            protected GroupFinder groupFinder;
1269            @BeanReference(type = PortletPreferencesLocalService.class)
1270            protected PortletPreferencesLocalService portletPreferencesLocalService;
1271            @BeanReference(type = PortletPreferencesService.class)
1272            protected PortletPreferencesService portletPreferencesService;
1273            @BeanReference(type = PortletPreferencesPersistence.class)
1274            protected PortletPreferencesPersistence portletPreferencesPersistence;
1275            @BeanReference(type = PortletPreferencesFinder.class)
1276            protected PortletPreferencesFinder portletPreferencesFinder;
1277            @BeanReference(type = ResourceLocalService.class)
1278            protected ResourceLocalService resourceLocalService;
1279            @BeanReference(type = ResourceService.class)
1280            protected ResourceService resourceService;
1281            @BeanReference(type = ResourcePersistence.class)
1282            protected ResourcePersistence resourcePersistence;
1283            @BeanReference(type = ResourceFinder.class)
1284            protected ResourceFinder resourceFinder;
1285            @BeanReference(type = SubscriptionLocalService.class)
1286            protected SubscriptionLocalService subscriptionLocalService;
1287            @BeanReference(type = SubscriptionPersistence.class)
1288            protected SubscriptionPersistence subscriptionPersistence;
1289            @BeanReference(type = UserLocalService.class)
1290            protected UserLocalService userLocalService;
1291            @BeanReference(type = UserService.class)
1292            protected UserService userService;
1293            @BeanReference(type = UserPersistence.class)
1294            protected UserPersistence userPersistence;
1295            @BeanReference(type = UserFinder.class)
1296            protected UserFinder userFinder;
1297            @BeanReference(type = AssetEntryLocalService.class)
1298            protected AssetEntryLocalService assetEntryLocalService;
1299            @BeanReference(type = AssetEntryService.class)
1300            protected AssetEntryService assetEntryService;
1301            @BeanReference(type = AssetEntryPersistence.class)
1302            protected AssetEntryPersistence assetEntryPersistence;
1303            @BeanReference(type = AssetEntryFinder.class)
1304            protected AssetEntryFinder assetEntryFinder;
1305            @BeanReference(type = AssetLinkLocalService.class)
1306            protected AssetLinkLocalService assetLinkLocalService;
1307            @BeanReference(type = AssetLinkPersistence.class)
1308            protected AssetLinkPersistence assetLinkPersistence;
1309            @BeanReference(type = AssetTagLocalService.class)
1310            protected AssetTagLocalService assetTagLocalService;
1311            @BeanReference(type = AssetTagService.class)
1312            protected AssetTagService assetTagService;
1313            @BeanReference(type = AssetTagPersistence.class)
1314            protected AssetTagPersistence assetTagPersistence;
1315            @BeanReference(type = AssetTagFinder.class)
1316            protected AssetTagFinder assetTagFinder;
1317            @BeanReference(type = ExpandoValueLocalService.class)
1318            protected ExpandoValueLocalService expandoValueLocalService;
1319            @BeanReference(type = ExpandoValueService.class)
1320            protected ExpandoValueService expandoValueService;
1321            @BeanReference(type = ExpandoValuePersistence.class)
1322            protected ExpandoValuePersistence expandoValuePersistence;
1323            @BeanReference(type = MBMessageLocalService.class)
1324            protected MBMessageLocalService mbMessageLocalService;
1325            @BeanReference(type = MBMessageService.class)
1326            protected MBMessageService mbMessageService;
1327            @BeanReference(type = MBMessagePersistence.class)
1328            protected MBMessagePersistence mbMessagePersistence;
1329            @BeanReference(type = MBMessageFinder.class)
1330            protected MBMessageFinder mbMessageFinder;
1331            @BeanReference(type = SocialActivityLocalService.class)
1332            protected SocialActivityLocalService socialActivityLocalService;
1333            @BeanReference(type = SocialActivityPersistence.class)
1334            protected SocialActivityPersistence socialActivityPersistence;
1335            @BeanReference(type = SocialActivityFinder.class)
1336            protected SocialActivityFinder socialActivityFinder;
1337            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1338            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1339            private String _beanIdentifier;
1340    }