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