001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.announcements.service.base;
016    
017    import com.liferay.counter.service.CounterLocalService;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024    import com.liferay.portal.kernel.exception.PortalException;
025    import com.liferay.portal.kernel.exception.SystemException;
026    import com.liferay.portal.kernel.log.Log;
027    import com.liferay.portal.kernel.log.LogFactoryUtil;
028    import com.liferay.portal.kernel.search.Indexer;
029    import com.liferay.portal.kernel.search.IndexerRegistryUtil;
030    import com.liferay.portal.kernel.search.SearchException;
031    import com.liferay.portal.kernel.util.OrderByComparator;
032    import com.liferay.portal.model.PersistedModel;
033    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
034    import com.liferay.portal.service.ResourceLocalService;
035    import com.liferay.portal.service.ResourceService;
036    import com.liferay.portal.service.UserLocalService;
037    import com.liferay.portal.service.UserService;
038    import com.liferay.portal.service.persistence.ResourceFinder;
039    import com.liferay.portal.service.persistence.ResourcePersistence;
040    import com.liferay.portal.service.persistence.UserFinder;
041    import com.liferay.portal.service.persistence.UserPersistence;
042    
043    import com.liferay.portlet.announcements.model.AnnouncementsDelivery;
044    import com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalService;
045    import com.liferay.portlet.announcements.service.AnnouncementsDeliveryService;
046    import com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService;
047    import com.liferay.portlet.announcements.service.AnnouncementsEntryService;
048    import com.liferay.portlet.announcements.service.AnnouncementsFlagLocalService;
049    import com.liferay.portlet.announcements.service.AnnouncementsFlagService;
050    import com.liferay.portlet.announcements.service.persistence.AnnouncementsDeliveryPersistence;
051    import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryFinder;
052    import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryPersistence;
053    import com.liferay.portlet.announcements.service.persistence.AnnouncementsFlagPersistence;
054    
055    import java.io.Serializable;
056    
057    import java.util.List;
058    
059    import javax.sql.DataSource;
060    
061    /**
062     * The base implementation of the announcements delivery local service.
063     *
064     * <p>
065     * 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.announcements.service.impl.AnnouncementsDeliveryLocalServiceImpl}.
066     * </p>
067     *
068     * @author Brian Wing Shun Chan
069     * @see com.liferay.portlet.announcements.service.impl.AnnouncementsDeliveryLocalServiceImpl
070     * @see com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalServiceUtil
071     * @generated
072     */
073    public abstract class AnnouncementsDeliveryLocalServiceBaseImpl
074            implements AnnouncementsDeliveryLocalService, IdentifiableBean {
075            /*
076             * NOTE FOR DEVELOPERS:
077             *
078             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalServiceUtil} to access the announcements delivery local service.
079             */
080    
081            /**
082             * Adds the announcements delivery to the database. Also notifies the appropriate model listeners.
083             *
084             * @param announcementsDelivery the announcements delivery
085             * @return the announcements delivery that was added
086             * @throws SystemException if a system exception occurred
087             */
088            public AnnouncementsDelivery addAnnouncementsDelivery(
089                    AnnouncementsDelivery announcementsDelivery) throws SystemException {
090                    announcementsDelivery.setNew(true);
091    
092                    announcementsDelivery = announcementsDeliveryPersistence.update(announcementsDelivery,
093                                    false);
094    
095                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
096    
097                    if (indexer != null) {
098                            try {
099                                    indexer.reindex(announcementsDelivery);
100                            }
101                            catch (SearchException se) {
102                                    if (_log.isWarnEnabled()) {
103                                            _log.warn(se, se);
104                                    }
105                            }
106                    }
107    
108                    return announcementsDelivery;
109            }
110    
111            /**
112             * Creates a new announcements delivery with the primary key. Does not add the announcements delivery to the database.
113             *
114             * @param deliveryId the primary key for the new announcements delivery
115             * @return the new announcements delivery
116             */
117            public AnnouncementsDelivery createAnnouncementsDelivery(long deliveryId) {
118                    return announcementsDeliveryPersistence.create(deliveryId);
119            }
120    
121            /**
122             * Deletes the announcements delivery with the primary key from the database. Also notifies the appropriate model listeners.
123             *
124             * @param deliveryId the primary key of the announcements delivery
125             * @throws PortalException if a announcements delivery with the primary key could not be found
126             * @throws SystemException if a system exception occurred
127             */
128            public void deleteAnnouncementsDelivery(long deliveryId)
129                    throws PortalException, SystemException {
130                    AnnouncementsDelivery announcementsDelivery = announcementsDeliveryPersistence.remove(deliveryId);
131    
132                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
133    
134                    if (indexer != null) {
135                            try {
136                                    indexer.delete(announcementsDelivery);
137                            }
138                            catch (SearchException se) {
139                                    if (_log.isWarnEnabled()) {
140                                            _log.warn(se, se);
141                                    }
142                            }
143                    }
144            }
145    
146            /**
147             * Deletes the announcements delivery from the database. Also notifies the appropriate model listeners.
148             *
149             * @param announcementsDelivery the announcements delivery
150             * @throws SystemException if a system exception occurred
151             */
152            public void deleteAnnouncementsDelivery(
153                    AnnouncementsDelivery announcementsDelivery) throws SystemException {
154                    announcementsDeliveryPersistence.remove(announcementsDelivery);
155    
156                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
157    
158                    if (indexer != null) {
159                            try {
160                                    indexer.delete(announcementsDelivery);
161                            }
162                            catch (SearchException se) {
163                                    if (_log.isWarnEnabled()) {
164                                            _log.warn(se, se);
165                                    }
166                            }
167                    }
168            }
169    
170            /**
171             * Performs a dynamic query on the database and returns the matching rows.
172             *
173             * @param dynamicQuery the dynamic query
174             * @return the matching rows
175             * @throws SystemException if a system exception occurred
176             */
177            @SuppressWarnings("rawtypes")
178            public List dynamicQuery(DynamicQuery dynamicQuery)
179                    throws SystemException {
180                    return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery);
181            }
182    
183            /**
184             * Performs a dynamic query on the database and returns a range of the matching rows.
185             *
186             * <p>
187             * 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.
188             * </p>
189             *
190             * @param dynamicQuery the dynamic query
191             * @param start the lower bound of the range of model instances
192             * @param end the upper bound of the range of model instances (not inclusive)
193             * @return the range of matching rows
194             * @throws SystemException if a system exception occurred
195             */
196            @SuppressWarnings("rawtypes")
197            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
198                    throws SystemException {
199                    return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery,
200                            start, end);
201            }
202    
203            /**
204             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
205             *
206             * <p>
207             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
208             * </p>
209             *
210             * @param dynamicQuery the dynamic query
211             * @param start the lower bound of the range of model instances
212             * @param end the upper bound of the range of model instances (not inclusive)
213             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
214             * @return the ordered range of matching rows
215             * @throws SystemException if a system exception occurred
216             */
217            @SuppressWarnings("rawtypes")
218            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
219                    OrderByComparator orderByComparator) throws SystemException {
220                    return announcementsDeliveryPersistence.findWithDynamicQuery(dynamicQuery,
221                            start, end, orderByComparator);
222            }
223    
224            /**
225             * Returns the number of rows that match the dynamic query.
226             *
227             * @param dynamicQuery the dynamic query
228             * @return the number of rows that match the dynamic query
229             * @throws SystemException if a system exception occurred
230             */
231            public long dynamicQueryCount(DynamicQuery dynamicQuery)
232                    throws SystemException {
233                    return announcementsDeliveryPersistence.countWithDynamicQuery(dynamicQuery);
234            }
235    
236            public AnnouncementsDelivery fetchAnnouncementsDelivery(long deliveryId)
237                    throws SystemException {
238                    return announcementsDeliveryPersistence.fetchByPrimaryKey(deliveryId);
239            }
240    
241            /**
242             * Returns the announcements delivery with the primary key.
243             *
244             * @param deliveryId the primary key of the announcements delivery
245             * @return the announcements delivery
246             * @throws PortalException if a announcements delivery with the primary key could not be found
247             * @throws SystemException if a system exception occurred
248             */
249            public AnnouncementsDelivery getAnnouncementsDelivery(long deliveryId)
250                    throws PortalException, SystemException {
251                    return announcementsDeliveryPersistence.findByPrimaryKey(deliveryId);
252            }
253    
254            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
255                    throws PortalException, SystemException {
256                    return announcementsDeliveryPersistence.findByPrimaryKey(primaryKeyObj);
257            }
258    
259            /**
260             * Returns a range of all the announcements deliveries.
261             *
262             * <p>
263             * 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.
264             * </p>
265             *
266             * @param start the lower bound of the range of announcements deliveries
267             * @param end the upper bound of the range of announcements deliveries (not inclusive)
268             * @return the range of announcements deliveries
269             * @throws SystemException if a system exception occurred
270             */
271            public List<AnnouncementsDelivery> getAnnouncementsDeliveries(int start,
272                    int end) throws SystemException {
273                    return announcementsDeliveryPersistence.findAll(start, end);
274            }
275    
276            /**
277             * Returns the number of announcements deliveries.
278             *
279             * @return the number of announcements deliveries
280             * @throws SystemException if a system exception occurred
281             */
282            public int getAnnouncementsDeliveriesCount() throws SystemException {
283                    return announcementsDeliveryPersistence.countAll();
284            }
285    
286            /**
287             * Updates the announcements delivery in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
288             *
289             * @param announcementsDelivery the announcements delivery
290             * @return the announcements delivery that was updated
291             * @throws SystemException if a system exception occurred
292             */
293            public AnnouncementsDelivery updateAnnouncementsDelivery(
294                    AnnouncementsDelivery announcementsDelivery) throws SystemException {
295                    return updateAnnouncementsDelivery(announcementsDelivery, true);
296            }
297    
298            /**
299             * Updates the announcements delivery in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
300             *
301             * @param announcementsDelivery the announcements delivery
302             * @param merge whether to merge the announcements delivery with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
303             * @return the announcements delivery that was updated
304             * @throws SystemException if a system exception occurred
305             */
306            public AnnouncementsDelivery updateAnnouncementsDelivery(
307                    AnnouncementsDelivery announcementsDelivery, boolean merge)
308                    throws SystemException {
309                    announcementsDelivery.setNew(false);
310    
311                    announcementsDelivery = announcementsDeliveryPersistence.update(announcementsDelivery,
312                                    merge);
313    
314                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
315    
316                    if (indexer != null) {
317                            try {
318                                    indexer.reindex(announcementsDelivery);
319                            }
320                            catch (SearchException se) {
321                                    if (_log.isWarnEnabled()) {
322                                            _log.warn(se, se);
323                                    }
324                            }
325                    }
326    
327                    return announcementsDelivery;
328            }
329    
330            /**
331             * Returns the announcements delivery local service.
332             *
333             * @return the announcements delivery local service
334             */
335            public AnnouncementsDeliveryLocalService getAnnouncementsDeliveryLocalService() {
336                    return announcementsDeliveryLocalService;
337            }
338    
339            /**
340             * Sets the announcements delivery local service.
341             *
342             * @param announcementsDeliveryLocalService the announcements delivery local service
343             */
344            public void setAnnouncementsDeliveryLocalService(
345                    AnnouncementsDeliveryLocalService announcementsDeliveryLocalService) {
346                    this.announcementsDeliveryLocalService = announcementsDeliveryLocalService;
347            }
348    
349            /**
350             * Returns the announcements delivery remote service.
351             *
352             * @return the announcements delivery remote service
353             */
354            public AnnouncementsDeliveryService getAnnouncementsDeliveryService() {
355                    return announcementsDeliveryService;
356            }
357    
358            /**
359             * Sets the announcements delivery remote service.
360             *
361             * @param announcementsDeliveryService the announcements delivery remote service
362             */
363            public void setAnnouncementsDeliveryService(
364                    AnnouncementsDeliveryService announcementsDeliveryService) {
365                    this.announcementsDeliveryService = announcementsDeliveryService;
366            }
367    
368            /**
369             * Returns the announcements delivery persistence.
370             *
371             * @return the announcements delivery persistence
372             */
373            public AnnouncementsDeliveryPersistence getAnnouncementsDeliveryPersistence() {
374                    return announcementsDeliveryPersistence;
375            }
376    
377            /**
378             * Sets the announcements delivery persistence.
379             *
380             * @param announcementsDeliveryPersistence the announcements delivery persistence
381             */
382            public void setAnnouncementsDeliveryPersistence(
383                    AnnouncementsDeliveryPersistence announcementsDeliveryPersistence) {
384                    this.announcementsDeliveryPersistence = announcementsDeliveryPersistence;
385            }
386    
387            /**
388             * Returns the announcements entry local service.
389             *
390             * @return the announcements entry local service
391             */
392            public AnnouncementsEntryLocalService getAnnouncementsEntryLocalService() {
393                    return announcementsEntryLocalService;
394            }
395    
396            /**
397             * Sets the announcements entry local service.
398             *
399             * @param announcementsEntryLocalService the announcements entry local service
400             */
401            public void setAnnouncementsEntryLocalService(
402                    AnnouncementsEntryLocalService announcementsEntryLocalService) {
403                    this.announcementsEntryLocalService = announcementsEntryLocalService;
404            }
405    
406            /**
407             * Returns the announcements entry remote service.
408             *
409             * @return the announcements entry remote service
410             */
411            public AnnouncementsEntryService getAnnouncementsEntryService() {
412                    return announcementsEntryService;
413            }
414    
415            /**
416             * Sets the announcements entry remote service.
417             *
418             * @param announcementsEntryService the announcements entry remote service
419             */
420            public void setAnnouncementsEntryService(
421                    AnnouncementsEntryService announcementsEntryService) {
422                    this.announcementsEntryService = announcementsEntryService;
423            }
424    
425            /**
426             * Returns the announcements entry persistence.
427             *
428             * @return the announcements entry persistence
429             */
430            public AnnouncementsEntryPersistence getAnnouncementsEntryPersistence() {
431                    return announcementsEntryPersistence;
432            }
433    
434            /**
435             * Sets the announcements entry persistence.
436             *
437             * @param announcementsEntryPersistence the announcements entry persistence
438             */
439            public void setAnnouncementsEntryPersistence(
440                    AnnouncementsEntryPersistence announcementsEntryPersistence) {
441                    this.announcementsEntryPersistence = announcementsEntryPersistence;
442            }
443    
444            /**
445             * Returns the announcements entry finder.
446             *
447             * @return the announcements entry finder
448             */
449            public AnnouncementsEntryFinder getAnnouncementsEntryFinder() {
450                    return announcementsEntryFinder;
451            }
452    
453            /**
454             * Sets the announcements entry finder.
455             *
456             * @param announcementsEntryFinder the announcements entry finder
457             */
458            public void setAnnouncementsEntryFinder(
459                    AnnouncementsEntryFinder announcementsEntryFinder) {
460                    this.announcementsEntryFinder = announcementsEntryFinder;
461            }
462    
463            /**
464             * Returns the announcements flag local service.
465             *
466             * @return the announcements flag local service
467             */
468            public AnnouncementsFlagLocalService getAnnouncementsFlagLocalService() {
469                    return announcementsFlagLocalService;
470            }
471    
472            /**
473             * Sets the announcements flag local service.
474             *
475             * @param announcementsFlagLocalService the announcements flag local service
476             */
477            public void setAnnouncementsFlagLocalService(
478                    AnnouncementsFlagLocalService announcementsFlagLocalService) {
479                    this.announcementsFlagLocalService = announcementsFlagLocalService;
480            }
481    
482            /**
483             * Returns the announcements flag remote service.
484             *
485             * @return the announcements flag remote service
486             */
487            public AnnouncementsFlagService getAnnouncementsFlagService() {
488                    return announcementsFlagService;
489            }
490    
491            /**
492             * Sets the announcements flag remote service.
493             *
494             * @param announcementsFlagService the announcements flag remote service
495             */
496            public void setAnnouncementsFlagService(
497                    AnnouncementsFlagService announcementsFlagService) {
498                    this.announcementsFlagService = announcementsFlagService;
499            }
500    
501            /**
502             * Returns the announcements flag persistence.
503             *
504             * @return the announcements flag persistence
505             */
506            public AnnouncementsFlagPersistence getAnnouncementsFlagPersistence() {
507                    return announcementsFlagPersistence;
508            }
509    
510            /**
511             * Sets the announcements flag persistence.
512             *
513             * @param announcementsFlagPersistence the announcements flag persistence
514             */
515            public void setAnnouncementsFlagPersistence(
516                    AnnouncementsFlagPersistence announcementsFlagPersistence) {
517                    this.announcementsFlagPersistence = announcementsFlagPersistence;
518            }
519    
520            /**
521             * Returns the counter local service.
522             *
523             * @return the counter local service
524             */
525            public CounterLocalService getCounterLocalService() {
526                    return counterLocalService;
527            }
528    
529            /**
530             * Sets the counter local service.
531             *
532             * @param counterLocalService the counter local service
533             */
534            public void setCounterLocalService(CounterLocalService counterLocalService) {
535                    this.counterLocalService = counterLocalService;
536            }
537    
538            /**
539             * Returns the resource local service.
540             *
541             * @return the resource local service
542             */
543            public ResourceLocalService getResourceLocalService() {
544                    return resourceLocalService;
545            }
546    
547            /**
548             * Sets the resource local service.
549             *
550             * @param resourceLocalService the resource local service
551             */
552            public void setResourceLocalService(
553                    ResourceLocalService resourceLocalService) {
554                    this.resourceLocalService = resourceLocalService;
555            }
556    
557            /**
558             * Returns the resource remote service.
559             *
560             * @return the resource remote service
561             */
562            public ResourceService getResourceService() {
563                    return resourceService;
564            }
565    
566            /**
567             * Sets the resource remote service.
568             *
569             * @param resourceService the resource remote service
570             */
571            public void setResourceService(ResourceService resourceService) {
572                    this.resourceService = resourceService;
573            }
574    
575            /**
576             * Returns the resource persistence.
577             *
578             * @return the resource persistence
579             */
580            public ResourcePersistence getResourcePersistence() {
581                    return resourcePersistence;
582            }
583    
584            /**
585             * Sets the resource persistence.
586             *
587             * @param resourcePersistence the resource persistence
588             */
589            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
590                    this.resourcePersistence = resourcePersistence;
591            }
592    
593            /**
594             * Returns the resource finder.
595             *
596             * @return the resource finder
597             */
598            public ResourceFinder getResourceFinder() {
599                    return resourceFinder;
600            }
601    
602            /**
603             * Sets the resource finder.
604             *
605             * @param resourceFinder the resource finder
606             */
607            public void setResourceFinder(ResourceFinder resourceFinder) {
608                    this.resourceFinder = resourceFinder;
609            }
610    
611            /**
612             * Returns the user local service.
613             *
614             * @return the user local service
615             */
616            public UserLocalService getUserLocalService() {
617                    return userLocalService;
618            }
619    
620            /**
621             * Sets the user local service.
622             *
623             * @param userLocalService the user local service
624             */
625            public void setUserLocalService(UserLocalService userLocalService) {
626                    this.userLocalService = userLocalService;
627            }
628    
629            /**
630             * Returns the user remote service.
631             *
632             * @return the user remote service
633             */
634            public UserService getUserService() {
635                    return userService;
636            }
637    
638            /**
639             * Sets the user remote service.
640             *
641             * @param userService the user remote service
642             */
643            public void setUserService(UserService userService) {
644                    this.userService = userService;
645            }
646    
647            /**
648             * Returns the user persistence.
649             *
650             * @return the user persistence
651             */
652            public UserPersistence getUserPersistence() {
653                    return userPersistence;
654            }
655    
656            /**
657             * Sets the user persistence.
658             *
659             * @param userPersistence the user persistence
660             */
661            public void setUserPersistence(UserPersistence userPersistence) {
662                    this.userPersistence = userPersistence;
663            }
664    
665            /**
666             * Returns the user finder.
667             *
668             * @return the user finder
669             */
670            public UserFinder getUserFinder() {
671                    return userFinder;
672            }
673    
674            /**
675             * Sets the user finder.
676             *
677             * @param userFinder the user finder
678             */
679            public void setUserFinder(UserFinder userFinder) {
680                    this.userFinder = userFinder;
681            }
682    
683            public void afterPropertiesSet() {
684                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.announcements.model.AnnouncementsDelivery",
685                            announcementsDeliveryLocalService);
686            }
687    
688            public void destroy() {
689                    persistedModelLocalServiceRegistry.unregister(
690                            "com.liferay.portlet.announcements.model.AnnouncementsDelivery");
691            }
692    
693            /**
694             * Returns the Spring bean ID for this bean.
695             *
696             * @return the Spring bean ID for this bean
697             */
698            public String getBeanIdentifier() {
699                    return _beanIdentifier;
700            }
701    
702            /**
703             * Sets the Spring bean ID for this bean.
704             *
705             * @param beanIdentifier the Spring bean ID for this bean
706             */
707            public void setBeanIdentifier(String beanIdentifier) {
708                    _beanIdentifier = beanIdentifier;
709            }
710    
711            protected ClassLoader getClassLoader() {
712                    Class<?> clazz = getClass();
713    
714                    return clazz.getClassLoader();
715            }
716    
717            protected Class<?> getModelClass() {
718                    return AnnouncementsDelivery.class;
719            }
720    
721            protected String getModelClassName() {
722                    return AnnouncementsDelivery.class.getName();
723            }
724    
725            /**
726             * Performs an SQL query.
727             *
728             * @param sql the sql query
729             */
730            protected void runSQL(String sql) throws SystemException {
731                    try {
732                            DataSource dataSource = announcementsDeliveryPersistence.getDataSource();
733    
734                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
735                                            sql, new int[0]);
736    
737                            sqlUpdate.update();
738                    }
739                    catch (Exception e) {
740                            throw new SystemException(e);
741                    }
742            }
743    
744            @BeanReference(type = AnnouncementsDeliveryLocalService.class)
745            protected AnnouncementsDeliveryLocalService announcementsDeliveryLocalService;
746            @BeanReference(type = AnnouncementsDeliveryService.class)
747            protected AnnouncementsDeliveryService announcementsDeliveryService;
748            @BeanReference(type = AnnouncementsDeliveryPersistence.class)
749            protected AnnouncementsDeliveryPersistence announcementsDeliveryPersistence;
750            @BeanReference(type = AnnouncementsEntryLocalService.class)
751            protected AnnouncementsEntryLocalService announcementsEntryLocalService;
752            @BeanReference(type = AnnouncementsEntryService.class)
753            protected AnnouncementsEntryService announcementsEntryService;
754            @BeanReference(type = AnnouncementsEntryPersistence.class)
755            protected AnnouncementsEntryPersistence announcementsEntryPersistence;
756            @BeanReference(type = AnnouncementsEntryFinder.class)
757            protected AnnouncementsEntryFinder announcementsEntryFinder;
758            @BeanReference(type = AnnouncementsFlagLocalService.class)
759            protected AnnouncementsFlagLocalService announcementsFlagLocalService;
760            @BeanReference(type = AnnouncementsFlagService.class)
761            protected AnnouncementsFlagService announcementsFlagService;
762            @BeanReference(type = AnnouncementsFlagPersistence.class)
763            protected AnnouncementsFlagPersistence announcementsFlagPersistence;
764            @BeanReference(type = CounterLocalService.class)
765            protected CounterLocalService counterLocalService;
766            @BeanReference(type = ResourceLocalService.class)
767            protected ResourceLocalService resourceLocalService;
768            @BeanReference(type = ResourceService.class)
769            protected ResourceService resourceService;
770            @BeanReference(type = ResourcePersistence.class)
771            protected ResourcePersistence resourcePersistence;
772            @BeanReference(type = ResourceFinder.class)
773            protected ResourceFinder resourceFinder;
774            @BeanReference(type = UserLocalService.class)
775            protected UserLocalService userLocalService;
776            @BeanReference(type = UserService.class)
777            protected UserService userService;
778            @BeanReference(type = UserPersistence.class)
779            protected UserPersistence userPersistence;
780            @BeanReference(type = UserFinder.class)
781            protected UserFinder userFinder;
782            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
783            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
784            private static Log _log = LogFactoryUtil.getLog(AnnouncementsDeliveryLocalServiceBaseImpl.class);
785            private String _beanIdentifier;
786    }