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