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.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.exception.SystemException;
024    import com.liferay.portal.service.BaseServiceImpl;
025    import com.liferay.portal.service.ResourceLocalService;
026    import com.liferay.portal.service.ResourceService;
027    import com.liferay.portal.service.UserLocalService;
028    import com.liferay.portal.service.UserService;
029    import com.liferay.portal.service.persistence.ResourceFinder;
030    import com.liferay.portal.service.persistence.ResourcePersistence;
031    import com.liferay.portal.service.persistence.UserFinder;
032    import com.liferay.portal.service.persistence.UserPersistence;
033    
034    import com.liferay.portlet.announcements.model.AnnouncementsDelivery;
035    import com.liferay.portlet.announcements.service.AnnouncementsDeliveryLocalService;
036    import com.liferay.portlet.announcements.service.AnnouncementsDeliveryService;
037    import com.liferay.portlet.announcements.service.AnnouncementsEntryLocalService;
038    import com.liferay.portlet.announcements.service.AnnouncementsEntryService;
039    import com.liferay.portlet.announcements.service.AnnouncementsFlagLocalService;
040    import com.liferay.portlet.announcements.service.AnnouncementsFlagService;
041    import com.liferay.portlet.announcements.service.persistence.AnnouncementsDeliveryPersistence;
042    import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryFinder;
043    import com.liferay.portlet.announcements.service.persistence.AnnouncementsEntryPersistence;
044    import com.liferay.portlet.announcements.service.persistence.AnnouncementsFlagPersistence;
045    
046    import javax.sql.DataSource;
047    
048    /**
049     * The base implementation of the announcements delivery remote service.
050     *
051     * <p>
052     * 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.AnnouncementsDeliveryServiceImpl}.
053     * </p>
054     *
055     * @author Brian Wing Shun Chan
056     * @see com.liferay.portlet.announcements.service.impl.AnnouncementsDeliveryServiceImpl
057     * @see com.liferay.portlet.announcements.service.AnnouncementsDeliveryServiceUtil
058     * @generated
059     */
060    public abstract class AnnouncementsDeliveryServiceBaseImpl
061            extends BaseServiceImpl implements AnnouncementsDeliveryService,
062                    IdentifiableBean {
063            /*
064             * NOTE FOR DEVELOPERS:
065             *
066             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.announcements.service.AnnouncementsDeliveryServiceUtil} to access the announcements delivery remote service.
067             */
068    
069            /**
070             * Returns the announcements delivery local service.
071             *
072             * @return the announcements delivery local service
073             */
074            public AnnouncementsDeliveryLocalService getAnnouncementsDeliveryLocalService() {
075                    return announcementsDeliveryLocalService;
076            }
077    
078            /**
079             * Sets the announcements delivery local service.
080             *
081             * @param announcementsDeliveryLocalService the announcements delivery local service
082             */
083            public void setAnnouncementsDeliveryLocalService(
084                    AnnouncementsDeliveryLocalService announcementsDeliveryLocalService) {
085                    this.announcementsDeliveryLocalService = announcementsDeliveryLocalService;
086            }
087    
088            /**
089             * Returns the announcements delivery remote service.
090             *
091             * @return the announcements delivery remote service
092             */
093            public AnnouncementsDeliveryService getAnnouncementsDeliveryService() {
094                    return announcementsDeliveryService;
095            }
096    
097            /**
098             * Sets the announcements delivery remote service.
099             *
100             * @param announcementsDeliveryService the announcements delivery remote service
101             */
102            public void setAnnouncementsDeliveryService(
103                    AnnouncementsDeliveryService announcementsDeliveryService) {
104                    this.announcementsDeliveryService = announcementsDeliveryService;
105            }
106    
107            /**
108             * Returns the announcements delivery persistence.
109             *
110             * @return the announcements delivery persistence
111             */
112            public AnnouncementsDeliveryPersistence getAnnouncementsDeliveryPersistence() {
113                    return announcementsDeliveryPersistence;
114            }
115    
116            /**
117             * Sets the announcements delivery persistence.
118             *
119             * @param announcementsDeliveryPersistence the announcements delivery persistence
120             */
121            public void setAnnouncementsDeliveryPersistence(
122                    AnnouncementsDeliveryPersistence announcementsDeliveryPersistence) {
123                    this.announcementsDeliveryPersistence = announcementsDeliveryPersistence;
124            }
125    
126            /**
127             * Returns the announcements entry local service.
128             *
129             * @return the announcements entry local service
130             */
131            public AnnouncementsEntryLocalService getAnnouncementsEntryLocalService() {
132                    return announcementsEntryLocalService;
133            }
134    
135            /**
136             * Sets the announcements entry local service.
137             *
138             * @param announcementsEntryLocalService the announcements entry local service
139             */
140            public void setAnnouncementsEntryLocalService(
141                    AnnouncementsEntryLocalService announcementsEntryLocalService) {
142                    this.announcementsEntryLocalService = announcementsEntryLocalService;
143            }
144    
145            /**
146             * Returns the announcements entry remote service.
147             *
148             * @return the announcements entry remote service
149             */
150            public AnnouncementsEntryService getAnnouncementsEntryService() {
151                    return announcementsEntryService;
152            }
153    
154            /**
155             * Sets the announcements entry remote service.
156             *
157             * @param announcementsEntryService the announcements entry remote service
158             */
159            public void setAnnouncementsEntryService(
160                    AnnouncementsEntryService announcementsEntryService) {
161                    this.announcementsEntryService = announcementsEntryService;
162            }
163    
164            /**
165             * Returns the announcements entry persistence.
166             *
167             * @return the announcements entry persistence
168             */
169            public AnnouncementsEntryPersistence getAnnouncementsEntryPersistence() {
170                    return announcementsEntryPersistence;
171            }
172    
173            /**
174             * Sets the announcements entry persistence.
175             *
176             * @param announcementsEntryPersistence the announcements entry persistence
177             */
178            public void setAnnouncementsEntryPersistence(
179                    AnnouncementsEntryPersistence announcementsEntryPersistence) {
180                    this.announcementsEntryPersistence = announcementsEntryPersistence;
181            }
182    
183            /**
184             * Returns the announcements entry finder.
185             *
186             * @return the announcements entry finder
187             */
188            public AnnouncementsEntryFinder getAnnouncementsEntryFinder() {
189                    return announcementsEntryFinder;
190            }
191    
192            /**
193             * Sets the announcements entry finder.
194             *
195             * @param announcementsEntryFinder the announcements entry finder
196             */
197            public void setAnnouncementsEntryFinder(
198                    AnnouncementsEntryFinder announcementsEntryFinder) {
199                    this.announcementsEntryFinder = announcementsEntryFinder;
200            }
201    
202            /**
203             * Returns the announcements flag local service.
204             *
205             * @return the announcements flag local service
206             */
207            public AnnouncementsFlagLocalService getAnnouncementsFlagLocalService() {
208                    return announcementsFlagLocalService;
209            }
210    
211            /**
212             * Sets the announcements flag local service.
213             *
214             * @param announcementsFlagLocalService the announcements flag local service
215             */
216            public void setAnnouncementsFlagLocalService(
217                    AnnouncementsFlagLocalService announcementsFlagLocalService) {
218                    this.announcementsFlagLocalService = announcementsFlagLocalService;
219            }
220    
221            /**
222             * Returns the announcements flag remote service.
223             *
224             * @return the announcements flag remote service
225             */
226            public AnnouncementsFlagService getAnnouncementsFlagService() {
227                    return announcementsFlagService;
228            }
229    
230            /**
231             * Sets the announcements flag remote service.
232             *
233             * @param announcementsFlagService the announcements flag remote service
234             */
235            public void setAnnouncementsFlagService(
236                    AnnouncementsFlagService announcementsFlagService) {
237                    this.announcementsFlagService = announcementsFlagService;
238            }
239    
240            /**
241             * Returns the announcements flag persistence.
242             *
243             * @return the announcements flag persistence
244             */
245            public AnnouncementsFlagPersistence getAnnouncementsFlagPersistence() {
246                    return announcementsFlagPersistence;
247            }
248    
249            /**
250             * Sets the announcements flag persistence.
251             *
252             * @param announcementsFlagPersistence the announcements flag persistence
253             */
254            public void setAnnouncementsFlagPersistence(
255                    AnnouncementsFlagPersistence announcementsFlagPersistence) {
256                    this.announcementsFlagPersistence = announcementsFlagPersistence;
257            }
258    
259            /**
260             * Returns the counter local service.
261             *
262             * @return the counter local service
263             */
264            public CounterLocalService getCounterLocalService() {
265                    return counterLocalService;
266            }
267    
268            /**
269             * Sets the counter local service.
270             *
271             * @param counterLocalService the counter local service
272             */
273            public void setCounterLocalService(CounterLocalService counterLocalService) {
274                    this.counterLocalService = counterLocalService;
275            }
276    
277            /**
278             * Returns the resource local service.
279             *
280             * @return the resource local service
281             */
282            public ResourceLocalService getResourceLocalService() {
283                    return resourceLocalService;
284            }
285    
286            /**
287             * Sets the resource local service.
288             *
289             * @param resourceLocalService the resource local service
290             */
291            public void setResourceLocalService(
292                    ResourceLocalService resourceLocalService) {
293                    this.resourceLocalService = resourceLocalService;
294            }
295    
296            /**
297             * Returns the resource remote service.
298             *
299             * @return the resource remote service
300             */
301            public ResourceService getResourceService() {
302                    return resourceService;
303            }
304    
305            /**
306             * Sets the resource remote service.
307             *
308             * @param resourceService the resource remote service
309             */
310            public void setResourceService(ResourceService resourceService) {
311                    this.resourceService = resourceService;
312            }
313    
314            /**
315             * Returns the resource persistence.
316             *
317             * @return the resource persistence
318             */
319            public ResourcePersistence getResourcePersistence() {
320                    return resourcePersistence;
321            }
322    
323            /**
324             * Sets the resource persistence.
325             *
326             * @param resourcePersistence the resource persistence
327             */
328            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
329                    this.resourcePersistence = resourcePersistence;
330            }
331    
332            /**
333             * Returns the resource finder.
334             *
335             * @return the resource finder
336             */
337            public ResourceFinder getResourceFinder() {
338                    return resourceFinder;
339            }
340    
341            /**
342             * Sets the resource finder.
343             *
344             * @param resourceFinder the resource finder
345             */
346            public void setResourceFinder(ResourceFinder resourceFinder) {
347                    this.resourceFinder = resourceFinder;
348            }
349    
350            /**
351             * Returns the user local service.
352             *
353             * @return the user local service
354             */
355            public UserLocalService getUserLocalService() {
356                    return userLocalService;
357            }
358    
359            /**
360             * Sets the user local service.
361             *
362             * @param userLocalService the user local service
363             */
364            public void setUserLocalService(UserLocalService userLocalService) {
365                    this.userLocalService = userLocalService;
366            }
367    
368            /**
369             * Returns the user remote service.
370             *
371             * @return the user remote service
372             */
373            public UserService getUserService() {
374                    return userService;
375            }
376    
377            /**
378             * Sets the user remote service.
379             *
380             * @param userService the user remote service
381             */
382            public void setUserService(UserService userService) {
383                    this.userService = userService;
384            }
385    
386            /**
387             * Returns the user persistence.
388             *
389             * @return the user persistence
390             */
391            public UserPersistence getUserPersistence() {
392                    return userPersistence;
393            }
394    
395            /**
396             * Sets the user persistence.
397             *
398             * @param userPersistence the user persistence
399             */
400            public void setUserPersistence(UserPersistence userPersistence) {
401                    this.userPersistence = userPersistence;
402            }
403    
404            /**
405             * Returns the user finder.
406             *
407             * @return the user finder
408             */
409            public UserFinder getUserFinder() {
410                    return userFinder;
411            }
412    
413            /**
414             * Sets the user finder.
415             *
416             * @param userFinder the user finder
417             */
418            public void setUserFinder(UserFinder userFinder) {
419                    this.userFinder = userFinder;
420            }
421    
422            public void afterPropertiesSet() {
423            }
424    
425            public void destroy() {
426            }
427    
428            /**
429             * Returns the Spring bean ID for this bean.
430             *
431             * @return the Spring bean ID for this bean
432             */
433            public String getBeanIdentifier() {
434                    return _beanIdentifier;
435            }
436    
437            /**
438             * Sets the Spring bean ID for this bean.
439             *
440             * @param beanIdentifier the Spring bean ID for this bean
441             */
442            public void setBeanIdentifier(String beanIdentifier) {
443                    _beanIdentifier = beanIdentifier;
444            }
445    
446            protected Class<?> getModelClass() {
447                    return AnnouncementsDelivery.class;
448            }
449    
450            protected String getModelClassName() {
451                    return AnnouncementsDelivery.class.getName();
452            }
453    
454            /**
455             * Performs an SQL query.
456             *
457             * @param sql the sql query
458             */
459            protected void runSQL(String sql) throws SystemException {
460                    try {
461                            DataSource dataSource = announcementsDeliveryPersistence.getDataSource();
462    
463                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
464                                            sql, new int[0]);
465    
466                            sqlUpdate.update();
467                    }
468                    catch (Exception e) {
469                            throw new SystemException(e);
470                    }
471            }
472    
473            @BeanReference(type = AnnouncementsDeliveryLocalService.class)
474            protected AnnouncementsDeliveryLocalService announcementsDeliveryLocalService;
475            @BeanReference(type = AnnouncementsDeliveryService.class)
476            protected AnnouncementsDeliveryService announcementsDeliveryService;
477            @BeanReference(type = AnnouncementsDeliveryPersistence.class)
478            protected AnnouncementsDeliveryPersistence announcementsDeliveryPersistence;
479            @BeanReference(type = AnnouncementsEntryLocalService.class)
480            protected AnnouncementsEntryLocalService announcementsEntryLocalService;
481            @BeanReference(type = AnnouncementsEntryService.class)
482            protected AnnouncementsEntryService announcementsEntryService;
483            @BeanReference(type = AnnouncementsEntryPersistence.class)
484            protected AnnouncementsEntryPersistence announcementsEntryPersistence;
485            @BeanReference(type = AnnouncementsEntryFinder.class)
486            protected AnnouncementsEntryFinder announcementsEntryFinder;
487            @BeanReference(type = AnnouncementsFlagLocalService.class)
488            protected AnnouncementsFlagLocalService announcementsFlagLocalService;
489            @BeanReference(type = AnnouncementsFlagService.class)
490            protected AnnouncementsFlagService announcementsFlagService;
491            @BeanReference(type = AnnouncementsFlagPersistence.class)
492            protected AnnouncementsFlagPersistence announcementsFlagPersistence;
493            @BeanReference(type = CounterLocalService.class)
494            protected CounterLocalService counterLocalService;
495            @BeanReference(type = ResourceLocalService.class)
496            protected ResourceLocalService resourceLocalService;
497            @BeanReference(type = ResourceService.class)
498            protected ResourceService resourceService;
499            @BeanReference(type = ResourcePersistence.class)
500            protected ResourcePersistence resourcePersistence;
501            @BeanReference(type = ResourceFinder.class)
502            protected ResourceFinder resourceFinder;
503            @BeanReference(type = UserLocalService.class)
504            protected UserLocalService userLocalService;
505            @BeanReference(type = UserService.class)
506            protected UserService userService;
507            @BeanReference(type = UserPersistence.class)
508            protected UserPersistence userPersistence;
509            @BeanReference(type = UserFinder.class)
510            protected UserFinder userFinder;
511            private String _beanIdentifier;
512    }