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