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