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