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