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