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