001    /**
002     * Copyright (c) 2000-present 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.journal.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.db.DB;
020    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
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.persistence.ClassNamePersistence;
026    import com.liferay.portal.service.persistence.SystemEventPersistence;
027    import com.liferay.portal.service.persistence.UserFinder;
028    import com.liferay.portal.service.persistence.UserPersistence;
029    import com.liferay.portal.util.PortalUtil;
030    
031    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureFinder;
032    import com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistence;
033    import com.liferay.portlet.expando.service.persistence.ExpandoValuePersistence;
034    import com.liferay.portlet.journal.model.JournalFeed;
035    import com.liferay.portlet.journal.service.JournalFeedService;
036    import com.liferay.portlet.journal.service.persistence.JournalFeedFinder;
037    import com.liferay.portlet.journal.service.persistence.JournalFeedPersistence;
038    
039    import javax.sql.DataSource;
040    
041    /**
042     * Provides the base implementation for the journal feed remote service.
043     *
044     * <p>
045     * 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.journal.service.impl.JournalFeedServiceImpl}.
046     * </p>
047     *
048     * @author Brian Wing Shun Chan
049     * @see com.liferay.portlet.journal.service.impl.JournalFeedServiceImpl
050     * @see com.liferay.portlet.journal.service.JournalFeedServiceUtil
051     * @generated
052     */
053    public abstract class JournalFeedServiceBaseImpl extends BaseServiceImpl
054            implements JournalFeedService, IdentifiableBean {
055            /*
056             * NOTE FOR DEVELOPERS:
057             *
058             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.journal.service.JournalFeedServiceUtil} to access the journal feed remote service.
059             */
060    
061            /**
062             * Returns the journal feed local service.
063             *
064             * @return the journal feed local service
065             */
066            public com.liferay.portlet.journal.service.JournalFeedLocalService getJournalFeedLocalService() {
067                    return journalFeedLocalService;
068            }
069    
070            /**
071             * Sets the journal feed local service.
072             *
073             * @param journalFeedLocalService the journal feed local service
074             */
075            public void setJournalFeedLocalService(
076                    com.liferay.portlet.journal.service.JournalFeedLocalService journalFeedLocalService) {
077                    this.journalFeedLocalService = journalFeedLocalService;
078            }
079    
080            /**
081             * Returns the journal feed remote service.
082             *
083             * @return the journal feed remote service
084             */
085            public com.liferay.portlet.journal.service.JournalFeedService getJournalFeedService() {
086                    return journalFeedService;
087            }
088    
089            /**
090             * Sets the journal feed remote service.
091             *
092             * @param journalFeedService the journal feed remote service
093             */
094            public void setJournalFeedService(
095                    com.liferay.portlet.journal.service.JournalFeedService journalFeedService) {
096                    this.journalFeedService = journalFeedService;
097            }
098    
099            /**
100             * Returns the journal feed persistence.
101             *
102             * @return the journal feed persistence
103             */
104            public JournalFeedPersistence getJournalFeedPersistence() {
105                    return journalFeedPersistence;
106            }
107    
108            /**
109             * Sets the journal feed persistence.
110             *
111             * @param journalFeedPersistence the journal feed persistence
112             */
113            public void setJournalFeedPersistence(
114                    JournalFeedPersistence journalFeedPersistence) {
115                    this.journalFeedPersistence = journalFeedPersistence;
116            }
117    
118            /**
119             * Returns the journal feed finder.
120             *
121             * @return the journal feed finder
122             */
123            public JournalFeedFinder getJournalFeedFinder() {
124                    return journalFeedFinder;
125            }
126    
127            /**
128             * Sets the journal feed finder.
129             *
130             * @param journalFeedFinder the journal feed finder
131             */
132            public void setJournalFeedFinder(JournalFeedFinder journalFeedFinder) {
133                    this.journalFeedFinder = journalFeedFinder;
134            }
135    
136            /**
137             * Returns the counter local service.
138             *
139             * @return the counter local service
140             */
141            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
142                    return counterLocalService;
143            }
144    
145            /**
146             * Sets the counter local service.
147             *
148             * @param counterLocalService the counter local service
149             */
150            public void setCounterLocalService(
151                    com.liferay.counter.service.CounterLocalService counterLocalService) {
152                    this.counterLocalService = counterLocalService;
153            }
154    
155            /**
156             * Returns the class name local service.
157             *
158             * @return the class name local service
159             */
160            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
161                    return classNameLocalService;
162            }
163    
164            /**
165             * Sets the class name local service.
166             *
167             * @param classNameLocalService the class name local service
168             */
169            public void setClassNameLocalService(
170                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
171                    this.classNameLocalService = classNameLocalService;
172            }
173    
174            /**
175             * Returns the class name remote service.
176             *
177             * @return the class name remote service
178             */
179            public com.liferay.portal.service.ClassNameService getClassNameService() {
180                    return classNameService;
181            }
182    
183            /**
184             * Sets the class name remote service.
185             *
186             * @param classNameService the class name remote service
187             */
188            public void setClassNameService(
189                    com.liferay.portal.service.ClassNameService classNameService) {
190                    this.classNameService = classNameService;
191            }
192    
193            /**
194             * Returns the class name persistence.
195             *
196             * @return the class name persistence
197             */
198            public ClassNamePersistence getClassNamePersistence() {
199                    return classNamePersistence;
200            }
201    
202            /**
203             * Sets the class name persistence.
204             *
205             * @param classNamePersistence the class name persistence
206             */
207            public void setClassNamePersistence(
208                    ClassNamePersistence classNamePersistence) {
209                    this.classNamePersistence = classNamePersistence;
210            }
211    
212            /**
213             * Returns the resource local service.
214             *
215             * @return the resource local service
216             */
217            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
218                    return resourceLocalService;
219            }
220    
221            /**
222             * Sets the resource local service.
223             *
224             * @param resourceLocalService the resource local service
225             */
226            public void setResourceLocalService(
227                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
228                    this.resourceLocalService = resourceLocalService;
229            }
230    
231            /**
232             * Returns the system event local service.
233             *
234             * @return the system event local service
235             */
236            public com.liferay.portal.service.SystemEventLocalService getSystemEventLocalService() {
237                    return systemEventLocalService;
238            }
239    
240            /**
241             * Sets the system event local service.
242             *
243             * @param systemEventLocalService the system event local service
244             */
245            public void setSystemEventLocalService(
246                    com.liferay.portal.service.SystemEventLocalService systemEventLocalService) {
247                    this.systemEventLocalService = systemEventLocalService;
248            }
249    
250            /**
251             * Returns the system event persistence.
252             *
253             * @return the system event persistence
254             */
255            public SystemEventPersistence getSystemEventPersistence() {
256                    return systemEventPersistence;
257            }
258    
259            /**
260             * Sets the system event persistence.
261             *
262             * @param systemEventPersistence the system event persistence
263             */
264            public void setSystemEventPersistence(
265                    SystemEventPersistence systemEventPersistence) {
266                    this.systemEventPersistence = systemEventPersistence;
267            }
268    
269            /**
270             * Returns the user local service.
271             *
272             * @return the user local service
273             */
274            public com.liferay.portal.service.UserLocalService getUserLocalService() {
275                    return userLocalService;
276            }
277    
278            /**
279             * Sets the user local service.
280             *
281             * @param userLocalService the user local service
282             */
283            public void setUserLocalService(
284                    com.liferay.portal.service.UserLocalService userLocalService) {
285                    this.userLocalService = userLocalService;
286            }
287    
288            /**
289             * Returns the user remote service.
290             *
291             * @return the user remote service
292             */
293            public com.liferay.portal.service.UserService getUserService() {
294                    return userService;
295            }
296    
297            /**
298             * Sets the user remote service.
299             *
300             * @param userService the user remote service
301             */
302            public void setUserService(
303                    com.liferay.portal.service.UserService userService) {
304                    this.userService = userService;
305            }
306    
307            /**
308             * Returns the user persistence.
309             *
310             * @return the user persistence
311             */
312            public UserPersistence getUserPersistence() {
313                    return userPersistence;
314            }
315    
316            /**
317             * Sets the user persistence.
318             *
319             * @param userPersistence the user persistence
320             */
321            public void setUserPersistence(UserPersistence userPersistence) {
322                    this.userPersistence = userPersistence;
323            }
324    
325            /**
326             * Returns the user finder.
327             *
328             * @return the user finder
329             */
330            public UserFinder getUserFinder() {
331                    return userFinder;
332            }
333    
334            /**
335             * Sets the user finder.
336             *
337             * @param userFinder the user finder
338             */
339            public void setUserFinder(UserFinder userFinder) {
340                    this.userFinder = userFinder;
341            }
342    
343            /**
344             * Returns the d d m structure local service.
345             *
346             * @return the d d m structure local service
347             */
348            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService getDDMStructureLocalService() {
349                    return ddmStructureLocalService;
350            }
351    
352            /**
353             * Sets the d d m structure local service.
354             *
355             * @param ddmStructureLocalService the d d m structure local service
356             */
357            public void setDDMStructureLocalService(
358                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService) {
359                    this.ddmStructureLocalService = ddmStructureLocalService;
360            }
361    
362            /**
363             * Returns the d d m structure remote service.
364             *
365             * @return the d d m structure remote service
366             */
367            public com.liferay.portlet.dynamicdatamapping.service.DDMStructureService getDDMStructureService() {
368                    return ddmStructureService;
369            }
370    
371            /**
372             * Sets the d d m structure remote service.
373             *
374             * @param ddmStructureService the d d m structure remote service
375             */
376            public void setDDMStructureService(
377                    com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService) {
378                    this.ddmStructureService = ddmStructureService;
379            }
380    
381            /**
382             * Returns the d d m structure persistence.
383             *
384             * @return the d d m structure persistence
385             */
386            public DDMStructurePersistence getDDMStructurePersistence() {
387                    return ddmStructurePersistence;
388            }
389    
390            /**
391             * Sets the d d m structure persistence.
392             *
393             * @param ddmStructurePersistence the d d m structure persistence
394             */
395            public void setDDMStructurePersistence(
396                    DDMStructurePersistence ddmStructurePersistence) {
397                    this.ddmStructurePersistence = ddmStructurePersistence;
398            }
399    
400            /**
401             * Returns the d d m structure finder.
402             *
403             * @return the d d m structure finder
404             */
405            public DDMStructureFinder getDDMStructureFinder() {
406                    return ddmStructureFinder;
407            }
408    
409            /**
410             * Sets the d d m structure finder.
411             *
412             * @param ddmStructureFinder the d d m structure finder
413             */
414            public void setDDMStructureFinder(DDMStructureFinder ddmStructureFinder) {
415                    this.ddmStructureFinder = ddmStructureFinder;
416            }
417    
418            /**
419             * Returns the expando value local service.
420             *
421             * @return the expando value local service
422             */
423            public com.liferay.portlet.expando.service.ExpandoValueLocalService getExpandoValueLocalService() {
424                    return expandoValueLocalService;
425            }
426    
427            /**
428             * Sets the expando value local service.
429             *
430             * @param expandoValueLocalService the expando value local service
431             */
432            public void setExpandoValueLocalService(
433                    com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService) {
434                    this.expandoValueLocalService = expandoValueLocalService;
435            }
436    
437            /**
438             * Returns the expando value remote service.
439             *
440             * @return the expando value remote service
441             */
442            public com.liferay.portlet.expando.service.ExpandoValueService getExpandoValueService() {
443                    return expandoValueService;
444            }
445    
446            /**
447             * Sets the expando value remote service.
448             *
449             * @param expandoValueService the expando value remote service
450             */
451            public void setExpandoValueService(
452                    com.liferay.portlet.expando.service.ExpandoValueService expandoValueService) {
453                    this.expandoValueService = expandoValueService;
454            }
455    
456            /**
457             * Returns the expando value persistence.
458             *
459             * @return the expando value persistence
460             */
461            public ExpandoValuePersistence getExpandoValuePersistence() {
462                    return expandoValuePersistence;
463            }
464    
465            /**
466             * Sets the expando value persistence.
467             *
468             * @param expandoValuePersistence the expando value persistence
469             */
470            public void setExpandoValuePersistence(
471                    ExpandoValuePersistence expandoValuePersistence) {
472                    this.expandoValuePersistence = expandoValuePersistence;
473            }
474    
475            public void afterPropertiesSet() {
476            }
477    
478            public void destroy() {
479            }
480    
481            /**
482             * Returns the Spring bean ID for this bean.
483             *
484             * @return the Spring bean ID for this bean
485             */
486            @Override
487            public String getBeanIdentifier() {
488                    return _beanIdentifier;
489            }
490    
491            /**
492             * Sets the Spring bean ID for this bean.
493             *
494             * @param beanIdentifier the Spring bean ID for this bean
495             */
496            @Override
497            public void setBeanIdentifier(String beanIdentifier) {
498                    _beanIdentifier = beanIdentifier;
499            }
500    
501            protected Class<?> getModelClass() {
502                    return JournalFeed.class;
503            }
504    
505            protected String getModelClassName() {
506                    return JournalFeed.class.getName();
507            }
508    
509            /**
510             * Performs a SQL query.
511             *
512             * @param sql the sql query
513             */
514            protected void runSQL(String sql) {
515                    try {
516                            DataSource dataSource = journalFeedPersistence.getDataSource();
517    
518                            DB db = DBFactoryUtil.getDB();
519    
520                            sql = db.buildSQL(sql);
521                            sql = PortalUtil.transformSQL(sql);
522    
523                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
524                                            sql, new int[0]);
525    
526                            sqlUpdate.update();
527                    }
528                    catch (Exception e) {
529                            throw new SystemException(e);
530                    }
531            }
532    
533            @BeanReference(type = com.liferay.portlet.journal.service.JournalFeedLocalService.class)
534            protected com.liferay.portlet.journal.service.JournalFeedLocalService journalFeedLocalService;
535            @BeanReference(type = com.liferay.portlet.journal.service.JournalFeedService.class)
536            protected com.liferay.portlet.journal.service.JournalFeedService journalFeedService;
537            @BeanReference(type = JournalFeedPersistence.class)
538            protected JournalFeedPersistence journalFeedPersistence;
539            @BeanReference(type = JournalFeedFinder.class)
540            protected JournalFeedFinder journalFeedFinder;
541            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
542            protected com.liferay.counter.service.CounterLocalService counterLocalService;
543            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
544            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
545            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
546            protected com.liferay.portal.service.ClassNameService classNameService;
547            @BeanReference(type = ClassNamePersistence.class)
548            protected ClassNamePersistence classNamePersistence;
549            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
550            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
551            @BeanReference(type = com.liferay.portal.service.SystemEventLocalService.class)
552            protected com.liferay.portal.service.SystemEventLocalService systemEventLocalService;
553            @BeanReference(type = SystemEventPersistence.class)
554            protected SystemEventPersistence systemEventPersistence;
555            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
556            protected com.liferay.portal.service.UserLocalService userLocalService;
557            @BeanReference(type = com.liferay.portal.service.UserService.class)
558            protected com.liferay.portal.service.UserService userService;
559            @BeanReference(type = UserPersistence.class)
560            protected UserPersistence userPersistence;
561            @BeanReference(type = UserFinder.class)
562            protected UserFinder userFinder;
563            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService.class)
564            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService ddmStructureLocalService;
565            @BeanReference(type = com.liferay.portlet.dynamicdatamapping.service.DDMStructureService.class)
566            protected com.liferay.portlet.dynamicdatamapping.service.DDMStructureService ddmStructureService;
567            @BeanReference(type = DDMStructurePersistence.class)
568            protected DDMStructurePersistence ddmStructurePersistence;
569            @BeanReference(type = DDMStructureFinder.class)
570            protected DDMStructureFinder ddmStructureFinder;
571            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueLocalService.class)
572            protected com.liferay.portlet.expando.service.ExpandoValueLocalService expandoValueLocalService;
573            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoValueService.class)
574            protected com.liferay.portlet.expando.service.ExpandoValueService expandoValueService;
575            @BeanReference(type = ExpandoValuePersistence.class)
576            protected ExpandoValuePersistence expandoValuePersistence;
577            private String _beanIdentifier;
578    }