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.ratings.service.base;
016    
017    import com.liferay.asset.kernel.service.persistence.AssetEntryFinder;
018    import com.liferay.asset.kernel.service.persistence.AssetEntryPersistence;
019    
020    import com.liferay.blogs.kernel.service.persistence.BlogsEntryFinder;
021    import com.liferay.blogs.kernel.service.persistence.BlogsEntryPersistence;
022    import com.liferay.blogs.kernel.service.persistence.BlogsStatsUserFinder;
023    import com.liferay.blogs.kernel.service.persistence.BlogsStatsUserPersistence;
024    
025    import com.liferay.portal.kernel.bean.BeanReference;
026    import com.liferay.portal.kernel.dao.db.DB;
027    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
028    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
029    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
030    import com.liferay.portal.kernel.exception.SystemException;
031    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
032    import com.liferay.portal.kernel.service.BaseServiceImpl;
033    import com.liferay.portal.kernel.service.persistence.ClassNamePersistence;
034    import com.liferay.portal.kernel.service.persistence.UserFinder;
035    import com.liferay.portal.kernel.service.persistence.UserPersistence;
036    import com.liferay.portal.kernel.util.PortalUtil;
037    
038    import com.liferay.ratings.kernel.model.RatingsEntry;
039    import com.liferay.ratings.kernel.service.RatingsEntryService;
040    import com.liferay.ratings.kernel.service.persistence.RatingsEntryFinder;
041    import com.liferay.ratings.kernel.service.persistence.RatingsEntryPersistence;
042    import com.liferay.ratings.kernel.service.persistence.RatingsStatsFinder;
043    import com.liferay.ratings.kernel.service.persistence.RatingsStatsPersistence;
044    
045    import javax.sql.DataSource;
046    
047    /**
048     * Provides the base implementation for the ratings entry remote service.
049     *
050     * <p>
051     * 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.ratings.service.impl.RatingsEntryServiceImpl}.
052     * </p>
053     *
054     * @author Brian Wing Shun Chan
055     * @see com.liferay.portlet.ratings.service.impl.RatingsEntryServiceImpl
056     * @see com.liferay.ratings.kernel.service.RatingsEntryServiceUtil
057     * @generated
058     */
059    public abstract class RatingsEntryServiceBaseImpl extends BaseServiceImpl
060            implements RatingsEntryService, IdentifiableOSGiService {
061            /*
062             * NOTE FOR DEVELOPERS:
063             *
064             * Never modify or reference this class directly. Always use {@link com.liferay.ratings.kernel.service.RatingsEntryServiceUtil} to access the ratings entry remote service.
065             */
066    
067            /**
068             * Returns the ratings entry local service.
069             *
070             * @return the ratings entry local service
071             */
072            public com.liferay.ratings.kernel.service.RatingsEntryLocalService getRatingsEntryLocalService() {
073                    return ratingsEntryLocalService;
074            }
075    
076            /**
077             * Sets the ratings entry local service.
078             *
079             * @param ratingsEntryLocalService the ratings entry local service
080             */
081            public void setRatingsEntryLocalService(
082                    com.liferay.ratings.kernel.service.RatingsEntryLocalService ratingsEntryLocalService) {
083                    this.ratingsEntryLocalService = ratingsEntryLocalService;
084            }
085    
086            /**
087             * Returns the ratings entry remote service.
088             *
089             * @return the ratings entry remote service
090             */
091            public RatingsEntryService getRatingsEntryService() {
092                    return ratingsEntryService;
093            }
094    
095            /**
096             * Sets the ratings entry remote service.
097             *
098             * @param ratingsEntryService the ratings entry remote service
099             */
100            public void setRatingsEntryService(RatingsEntryService ratingsEntryService) {
101                    this.ratingsEntryService = ratingsEntryService;
102            }
103    
104            /**
105             * Returns the ratings entry persistence.
106             *
107             * @return the ratings entry persistence
108             */
109            public RatingsEntryPersistence getRatingsEntryPersistence() {
110                    return ratingsEntryPersistence;
111            }
112    
113            /**
114             * Sets the ratings entry persistence.
115             *
116             * @param ratingsEntryPersistence the ratings entry persistence
117             */
118            public void setRatingsEntryPersistence(
119                    RatingsEntryPersistence ratingsEntryPersistence) {
120                    this.ratingsEntryPersistence = ratingsEntryPersistence;
121            }
122    
123            /**
124             * Returns the ratings entry finder.
125             *
126             * @return the ratings entry finder
127             */
128            public RatingsEntryFinder getRatingsEntryFinder() {
129                    return ratingsEntryFinder;
130            }
131    
132            /**
133             * Sets the ratings entry finder.
134             *
135             * @param ratingsEntryFinder the ratings entry finder
136             */
137            public void setRatingsEntryFinder(RatingsEntryFinder ratingsEntryFinder) {
138                    this.ratingsEntryFinder = ratingsEntryFinder;
139            }
140    
141            /**
142             * Returns the ratings stats local service.
143             *
144             * @return the ratings stats local service
145             */
146            public com.liferay.ratings.kernel.service.RatingsStatsLocalService getRatingsStatsLocalService() {
147                    return ratingsStatsLocalService;
148            }
149    
150            /**
151             * Sets the ratings stats local service.
152             *
153             * @param ratingsStatsLocalService the ratings stats local service
154             */
155            public void setRatingsStatsLocalService(
156                    com.liferay.ratings.kernel.service.RatingsStatsLocalService ratingsStatsLocalService) {
157                    this.ratingsStatsLocalService = ratingsStatsLocalService;
158            }
159    
160            /**
161             * Returns the ratings stats persistence.
162             *
163             * @return the ratings stats persistence
164             */
165            public RatingsStatsPersistence getRatingsStatsPersistence() {
166                    return ratingsStatsPersistence;
167            }
168    
169            /**
170             * Sets the ratings stats persistence.
171             *
172             * @param ratingsStatsPersistence the ratings stats persistence
173             */
174            public void setRatingsStatsPersistence(
175                    RatingsStatsPersistence ratingsStatsPersistence) {
176                    this.ratingsStatsPersistence = ratingsStatsPersistence;
177            }
178    
179            /**
180             * Returns the ratings stats finder.
181             *
182             * @return the ratings stats finder
183             */
184            public RatingsStatsFinder getRatingsStatsFinder() {
185                    return ratingsStatsFinder;
186            }
187    
188            /**
189             * Sets the ratings stats finder.
190             *
191             * @param ratingsStatsFinder the ratings stats finder
192             */
193            public void setRatingsStatsFinder(RatingsStatsFinder ratingsStatsFinder) {
194                    this.ratingsStatsFinder = ratingsStatsFinder;
195            }
196    
197            /**
198             * Returns the counter local service.
199             *
200             * @return the counter local service
201             */
202            public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() {
203                    return counterLocalService;
204            }
205    
206            /**
207             * Sets the counter local service.
208             *
209             * @param counterLocalService the counter local service
210             */
211            public void setCounterLocalService(
212                    com.liferay.counter.kernel.service.CounterLocalService counterLocalService) {
213                    this.counterLocalService = counterLocalService;
214            }
215    
216            /**
217             * Returns the class name local service.
218             *
219             * @return the class name local service
220             */
221            public com.liferay.portal.kernel.service.ClassNameLocalService getClassNameLocalService() {
222                    return classNameLocalService;
223            }
224    
225            /**
226             * Sets the class name local service.
227             *
228             * @param classNameLocalService the class name local service
229             */
230            public void setClassNameLocalService(
231                    com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService) {
232                    this.classNameLocalService = classNameLocalService;
233            }
234    
235            /**
236             * Returns the class name remote service.
237             *
238             * @return the class name remote service
239             */
240            public com.liferay.portal.kernel.service.ClassNameService getClassNameService() {
241                    return classNameService;
242            }
243    
244            /**
245             * Sets the class name remote service.
246             *
247             * @param classNameService the class name remote service
248             */
249            public void setClassNameService(
250                    com.liferay.portal.kernel.service.ClassNameService classNameService) {
251                    this.classNameService = classNameService;
252            }
253    
254            /**
255             * Returns the class name persistence.
256             *
257             * @return the class name persistence
258             */
259            public ClassNamePersistence getClassNamePersistence() {
260                    return classNamePersistence;
261            }
262    
263            /**
264             * Sets the class name persistence.
265             *
266             * @param classNamePersistence the class name persistence
267             */
268            public void setClassNamePersistence(
269                    ClassNamePersistence classNamePersistence) {
270                    this.classNamePersistence = classNamePersistence;
271            }
272    
273            /**
274             * Returns the resource local service.
275             *
276             * @return the resource local service
277             */
278            public com.liferay.portal.kernel.service.ResourceLocalService getResourceLocalService() {
279                    return resourceLocalService;
280            }
281    
282            /**
283             * Sets the resource local service.
284             *
285             * @param resourceLocalService the resource local service
286             */
287            public void setResourceLocalService(
288                    com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService) {
289                    this.resourceLocalService = resourceLocalService;
290            }
291    
292            /**
293             * Returns the user local service.
294             *
295             * @return the user local service
296             */
297            public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() {
298                    return userLocalService;
299            }
300    
301            /**
302             * Sets the user local service.
303             *
304             * @param userLocalService the user local service
305             */
306            public void setUserLocalService(
307                    com.liferay.portal.kernel.service.UserLocalService userLocalService) {
308                    this.userLocalService = userLocalService;
309            }
310    
311            /**
312             * Returns the user remote service.
313             *
314             * @return the user remote service
315             */
316            public com.liferay.portal.kernel.service.UserService getUserService() {
317                    return userService;
318            }
319    
320            /**
321             * Sets the user remote service.
322             *
323             * @param userService the user remote service
324             */
325            public void setUserService(
326                    com.liferay.portal.kernel.service.UserService userService) {
327                    this.userService = userService;
328            }
329    
330            /**
331             * Returns the user persistence.
332             *
333             * @return the user persistence
334             */
335            public UserPersistence getUserPersistence() {
336                    return userPersistence;
337            }
338    
339            /**
340             * Sets the user persistence.
341             *
342             * @param userPersistence the user persistence
343             */
344            public void setUserPersistence(UserPersistence userPersistence) {
345                    this.userPersistence = userPersistence;
346            }
347    
348            /**
349             * Returns the user finder.
350             *
351             * @return the user finder
352             */
353            public UserFinder getUserFinder() {
354                    return userFinder;
355            }
356    
357            /**
358             * Sets the user finder.
359             *
360             * @param userFinder the user finder
361             */
362            public void setUserFinder(UserFinder userFinder) {
363                    this.userFinder = userFinder;
364            }
365    
366            /**
367             * Returns the asset entry local service.
368             *
369             * @return the asset entry local service
370             */
371            public com.liferay.asset.kernel.service.AssetEntryLocalService getAssetEntryLocalService() {
372                    return assetEntryLocalService;
373            }
374    
375            /**
376             * Sets the asset entry local service.
377             *
378             * @param assetEntryLocalService the asset entry local service
379             */
380            public void setAssetEntryLocalService(
381                    com.liferay.asset.kernel.service.AssetEntryLocalService assetEntryLocalService) {
382                    this.assetEntryLocalService = assetEntryLocalService;
383            }
384    
385            /**
386             * Returns the asset entry remote service.
387             *
388             * @return the asset entry remote service
389             */
390            public com.liferay.asset.kernel.service.AssetEntryService getAssetEntryService() {
391                    return assetEntryService;
392            }
393    
394            /**
395             * Sets the asset entry remote service.
396             *
397             * @param assetEntryService the asset entry remote service
398             */
399            public void setAssetEntryService(
400                    com.liferay.asset.kernel.service.AssetEntryService assetEntryService) {
401                    this.assetEntryService = assetEntryService;
402            }
403    
404            /**
405             * Returns the asset entry persistence.
406             *
407             * @return the asset entry persistence
408             */
409            public AssetEntryPersistence getAssetEntryPersistence() {
410                    return assetEntryPersistence;
411            }
412    
413            /**
414             * Sets the asset entry persistence.
415             *
416             * @param assetEntryPersistence the asset entry persistence
417             */
418            public void setAssetEntryPersistence(
419                    AssetEntryPersistence assetEntryPersistence) {
420                    this.assetEntryPersistence = assetEntryPersistence;
421            }
422    
423            /**
424             * Returns the asset entry finder.
425             *
426             * @return the asset entry finder
427             */
428            public AssetEntryFinder getAssetEntryFinder() {
429                    return assetEntryFinder;
430            }
431    
432            /**
433             * Sets the asset entry finder.
434             *
435             * @param assetEntryFinder the asset entry finder
436             */
437            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
438                    this.assetEntryFinder = assetEntryFinder;
439            }
440    
441            /**
442             * Returns the blogs entry local service.
443             *
444             * @return the blogs entry local service
445             */
446            public com.liferay.blogs.kernel.service.BlogsEntryLocalService getBlogsEntryLocalService() {
447                    return blogsEntryLocalService;
448            }
449    
450            /**
451             * Sets the blogs entry local service.
452             *
453             * @param blogsEntryLocalService the blogs entry local service
454             */
455            public void setBlogsEntryLocalService(
456                    com.liferay.blogs.kernel.service.BlogsEntryLocalService blogsEntryLocalService) {
457                    this.blogsEntryLocalService = blogsEntryLocalService;
458            }
459    
460            /**
461             * Returns the blogs entry remote service.
462             *
463             * @return the blogs entry remote service
464             */
465            public com.liferay.blogs.kernel.service.BlogsEntryService getBlogsEntryService() {
466                    return blogsEntryService;
467            }
468    
469            /**
470             * Sets the blogs entry remote service.
471             *
472             * @param blogsEntryService the blogs entry remote service
473             */
474            public void setBlogsEntryService(
475                    com.liferay.blogs.kernel.service.BlogsEntryService blogsEntryService) {
476                    this.blogsEntryService = blogsEntryService;
477            }
478    
479            /**
480             * Returns the blogs entry persistence.
481             *
482             * @return the blogs entry persistence
483             */
484            public BlogsEntryPersistence getBlogsEntryPersistence() {
485                    return blogsEntryPersistence;
486            }
487    
488            /**
489             * Sets the blogs entry persistence.
490             *
491             * @param blogsEntryPersistence the blogs entry persistence
492             */
493            public void setBlogsEntryPersistence(
494                    BlogsEntryPersistence blogsEntryPersistence) {
495                    this.blogsEntryPersistence = blogsEntryPersistence;
496            }
497    
498            /**
499             * Returns the blogs entry finder.
500             *
501             * @return the blogs entry finder
502             */
503            public BlogsEntryFinder getBlogsEntryFinder() {
504                    return blogsEntryFinder;
505            }
506    
507            /**
508             * Sets the blogs entry finder.
509             *
510             * @param blogsEntryFinder the blogs entry finder
511             */
512            public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
513                    this.blogsEntryFinder = blogsEntryFinder;
514            }
515    
516            /**
517             * Returns the blogs stats user local service.
518             *
519             * @return the blogs stats user local service
520             */
521            public com.liferay.blogs.kernel.service.BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
522                    return blogsStatsUserLocalService;
523            }
524    
525            /**
526             * Sets the blogs stats user local service.
527             *
528             * @param blogsStatsUserLocalService the blogs stats user local service
529             */
530            public void setBlogsStatsUserLocalService(
531                    com.liferay.blogs.kernel.service.BlogsStatsUserLocalService blogsStatsUserLocalService) {
532                    this.blogsStatsUserLocalService = blogsStatsUserLocalService;
533            }
534    
535            /**
536             * Returns the blogs stats user persistence.
537             *
538             * @return the blogs stats user persistence
539             */
540            public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
541                    return blogsStatsUserPersistence;
542            }
543    
544            /**
545             * Sets the blogs stats user persistence.
546             *
547             * @param blogsStatsUserPersistence the blogs stats user persistence
548             */
549            public void setBlogsStatsUserPersistence(
550                    BlogsStatsUserPersistence blogsStatsUserPersistence) {
551                    this.blogsStatsUserPersistence = blogsStatsUserPersistence;
552            }
553    
554            /**
555             * Returns the blogs stats user finder.
556             *
557             * @return the blogs stats user finder
558             */
559            public BlogsStatsUserFinder getBlogsStatsUserFinder() {
560                    return blogsStatsUserFinder;
561            }
562    
563            /**
564             * Sets the blogs stats user finder.
565             *
566             * @param blogsStatsUserFinder the blogs stats user finder
567             */
568            public void setBlogsStatsUserFinder(
569                    BlogsStatsUserFinder blogsStatsUserFinder) {
570                    this.blogsStatsUserFinder = blogsStatsUserFinder;
571            }
572    
573            public void afterPropertiesSet() {
574            }
575    
576            public void destroy() {
577            }
578    
579            /**
580             * Returns the OSGi service identifier.
581             *
582             * @return the OSGi service identifier
583             */
584            @Override
585            public String getOSGiServiceIdentifier() {
586                    return RatingsEntryService.class.getName();
587            }
588    
589            protected Class<?> getModelClass() {
590                    return RatingsEntry.class;
591            }
592    
593            protected String getModelClassName() {
594                    return RatingsEntry.class.getName();
595            }
596    
597            /**
598             * Performs a SQL query.
599             *
600             * @param sql the sql query
601             */
602            protected void runSQL(String sql) {
603                    try {
604                            DataSource dataSource = ratingsEntryPersistence.getDataSource();
605    
606                            DB db = DBManagerUtil.getDB();
607    
608                            sql = db.buildSQL(sql);
609                            sql = PortalUtil.transformSQL(sql);
610    
611                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
612                                            sql);
613    
614                            sqlUpdate.update();
615                    }
616                    catch (Exception e) {
617                            throw new SystemException(e);
618                    }
619            }
620    
621            @BeanReference(type = com.liferay.ratings.kernel.service.RatingsEntryLocalService.class)
622            protected com.liferay.ratings.kernel.service.RatingsEntryLocalService ratingsEntryLocalService;
623            @BeanReference(type = RatingsEntryService.class)
624            protected RatingsEntryService ratingsEntryService;
625            @BeanReference(type = RatingsEntryPersistence.class)
626            protected RatingsEntryPersistence ratingsEntryPersistence;
627            @BeanReference(type = RatingsEntryFinder.class)
628            protected RatingsEntryFinder ratingsEntryFinder;
629            @BeanReference(type = com.liferay.ratings.kernel.service.RatingsStatsLocalService.class)
630            protected com.liferay.ratings.kernel.service.RatingsStatsLocalService ratingsStatsLocalService;
631            @BeanReference(type = RatingsStatsPersistence.class)
632            protected RatingsStatsPersistence ratingsStatsPersistence;
633            @BeanReference(type = RatingsStatsFinder.class)
634            protected RatingsStatsFinder ratingsStatsFinder;
635            @BeanReference(type = com.liferay.counter.kernel.service.CounterLocalService.class)
636            protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService;
637            @BeanReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class)
638            protected com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService;
639            @BeanReference(type = com.liferay.portal.kernel.service.ClassNameService.class)
640            protected com.liferay.portal.kernel.service.ClassNameService classNameService;
641            @BeanReference(type = ClassNamePersistence.class)
642            protected ClassNamePersistence classNamePersistence;
643            @BeanReference(type = com.liferay.portal.kernel.service.ResourceLocalService.class)
644            protected com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService;
645            @BeanReference(type = com.liferay.portal.kernel.service.UserLocalService.class)
646            protected com.liferay.portal.kernel.service.UserLocalService userLocalService;
647            @BeanReference(type = com.liferay.portal.kernel.service.UserService.class)
648            protected com.liferay.portal.kernel.service.UserService userService;
649            @BeanReference(type = UserPersistence.class)
650            protected UserPersistence userPersistence;
651            @BeanReference(type = UserFinder.class)
652            protected UserFinder userFinder;
653            @BeanReference(type = com.liferay.asset.kernel.service.AssetEntryLocalService.class)
654            protected com.liferay.asset.kernel.service.AssetEntryLocalService assetEntryLocalService;
655            @BeanReference(type = com.liferay.asset.kernel.service.AssetEntryService.class)
656            protected com.liferay.asset.kernel.service.AssetEntryService assetEntryService;
657            @BeanReference(type = AssetEntryPersistence.class)
658            protected AssetEntryPersistence assetEntryPersistence;
659            @BeanReference(type = AssetEntryFinder.class)
660            protected AssetEntryFinder assetEntryFinder;
661            @BeanReference(type = com.liferay.blogs.kernel.service.BlogsEntryLocalService.class)
662            protected com.liferay.blogs.kernel.service.BlogsEntryLocalService blogsEntryLocalService;
663            @BeanReference(type = com.liferay.blogs.kernel.service.BlogsEntryService.class)
664            protected com.liferay.blogs.kernel.service.BlogsEntryService blogsEntryService;
665            @BeanReference(type = BlogsEntryPersistence.class)
666            protected BlogsEntryPersistence blogsEntryPersistence;
667            @BeanReference(type = BlogsEntryFinder.class)
668            protected BlogsEntryFinder blogsEntryFinder;
669            @BeanReference(type = com.liferay.blogs.kernel.service.BlogsStatsUserLocalService.class)
670            protected com.liferay.blogs.kernel.service.BlogsStatsUserLocalService blogsStatsUserLocalService;
671            @BeanReference(type = BlogsStatsUserPersistence.class)
672            protected BlogsStatsUserPersistence blogsStatsUserPersistence;
673            @BeanReference(type = BlogsStatsUserFinder.class)
674            protected BlogsStatsUserFinder blogsStatsUserFinder;
675    }