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