001    /**
002     * Copyright (c) 2000-2012 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.counter.service.CounterLocalService;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
025    import com.liferay.portal.kernel.exception.PortalException;
026    import com.liferay.portal.kernel.exception.SystemException;
027    import com.liferay.portal.kernel.search.Indexable;
028    import com.liferay.portal.kernel.search.IndexableType;
029    import com.liferay.portal.kernel.util.OrderByComparator;
030    import com.liferay.portal.model.PersistedModel;
031    import com.liferay.portal.service.BaseLocalServiceImpl;
032    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
033    import com.liferay.portal.service.ResourceLocalService;
034    import com.liferay.portal.service.UserLocalService;
035    import com.liferay.portal.service.UserService;
036    import com.liferay.portal.service.persistence.UserFinder;
037    import com.liferay.portal.service.persistence.UserPersistence;
038    
039    import com.liferay.portlet.asset.service.AssetEntryLocalService;
040    import com.liferay.portlet.asset.service.AssetEntryService;
041    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
042    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
043    import com.liferay.portlet.blogs.service.BlogsEntryLocalService;
044    import com.liferay.portlet.blogs.service.BlogsEntryService;
045    import com.liferay.portlet.blogs.service.BlogsStatsUserLocalService;
046    import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
047    import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
048    import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserFinder;
049    import com.liferay.portlet.blogs.service.persistence.BlogsStatsUserPersistence;
050    import com.liferay.portlet.ratings.model.RatingsEntry;
051    import com.liferay.portlet.ratings.service.RatingsEntryLocalService;
052    import com.liferay.portlet.ratings.service.RatingsEntryService;
053    import com.liferay.portlet.ratings.service.RatingsStatsLocalService;
054    import com.liferay.portlet.ratings.service.persistence.RatingsEntryFinder;
055    import com.liferay.portlet.ratings.service.persistence.RatingsEntryPersistence;
056    import com.liferay.portlet.ratings.service.persistence.RatingsStatsFinder;
057    import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
058    import com.liferay.portlet.social.service.SocialActivityLocalService;
059    import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
060    import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
061    
062    import java.io.Serializable;
063    
064    import java.util.List;
065    
066    import javax.sql.DataSource;
067    
068    /**
069     * The base implementation of the ratings entry local service.
070     *
071     * <p>
072     * 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.RatingsEntryLocalServiceImpl}.
073     * </p>
074     *
075     * @author Brian Wing Shun Chan
076     * @see com.liferay.portlet.ratings.service.impl.RatingsEntryLocalServiceImpl
077     * @see com.liferay.portlet.ratings.service.RatingsEntryLocalServiceUtil
078     * @generated
079     */
080    public abstract class RatingsEntryLocalServiceBaseImpl
081            extends BaseLocalServiceImpl implements RatingsEntryLocalService,
082                    IdentifiableBean {
083            /*
084             * NOTE FOR DEVELOPERS:
085             *
086             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.ratings.service.RatingsEntryLocalServiceUtil} to access the ratings entry local service.
087             */
088    
089            /**
090             * Adds the ratings entry to the database. Also notifies the appropriate model listeners.
091             *
092             * @param ratingsEntry the ratings entry
093             * @return the ratings entry that was added
094             * @throws SystemException if a system exception occurred
095             */
096            @Indexable(type = IndexableType.REINDEX)
097            public RatingsEntry addRatingsEntry(RatingsEntry ratingsEntry)
098                    throws SystemException {
099                    ratingsEntry.setNew(true);
100    
101                    return ratingsEntryPersistence.update(ratingsEntry);
102            }
103    
104            /**
105             * Creates a new ratings entry with the primary key. Does not add the ratings entry to the database.
106             *
107             * @param entryId the primary key for the new ratings entry
108             * @return the new ratings entry
109             */
110            public RatingsEntry createRatingsEntry(long entryId) {
111                    return ratingsEntryPersistence.create(entryId);
112            }
113    
114            /**
115             * Deletes the ratings entry with the primary key from the database. Also notifies the appropriate model listeners.
116             *
117             * @param entryId the primary key of the ratings entry
118             * @return the ratings entry that was removed
119             * @throws PortalException if a ratings entry with the primary key could not be found
120             * @throws SystemException if a system exception occurred
121             */
122            @Indexable(type = IndexableType.DELETE)
123            public RatingsEntry deleteRatingsEntry(long entryId)
124                    throws PortalException, SystemException {
125                    return ratingsEntryPersistence.remove(entryId);
126            }
127    
128            /**
129             * Deletes the ratings entry from the database. Also notifies the appropriate model listeners.
130             *
131             * @param ratingsEntry the ratings entry
132             * @return the ratings entry that was removed
133             * @throws SystemException if a system exception occurred
134             */
135            @Indexable(type = IndexableType.DELETE)
136            public RatingsEntry deleteRatingsEntry(RatingsEntry ratingsEntry)
137                    throws SystemException {
138                    return ratingsEntryPersistence.remove(ratingsEntry);
139            }
140    
141            public DynamicQuery dynamicQuery() {
142                    Class<?> clazz = getClass();
143    
144                    return DynamicQueryFactoryUtil.forClass(RatingsEntry.class,
145                            clazz.getClassLoader());
146            }
147    
148            /**
149             * Performs a dynamic query on the database and returns the matching rows.
150             *
151             * @param dynamicQuery the dynamic query
152             * @return the matching rows
153             * @throws SystemException if a system exception occurred
154             */
155            @SuppressWarnings("rawtypes")
156            public List dynamicQuery(DynamicQuery dynamicQuery)
157                    throws SystemException {
158                    return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery);
159            }
160    
161            /**
162             * Performs a dynamic query on the database and returns a range of the matching rows.
163             *
164             * <p>
165             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.ratings.model.impl.RatingsEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
166             * </p>
167             *
168             * @param dynamicQuery the dynamic query
169             * @param start the lower bound of the range of model instances
170             * @param end the upper bound of the range of model instances (not inclusive)
171             * @return the range of matching rows
172             * @throws SystemException if a system exception occurred
173             */
174            @SuppressWarnings("rawtypes")
175            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
176                    throws SystemException {
177                    return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery,
178                            start, end);
179            }
180    
181            /**
182             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
183             *
184             * <p>
185             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.ratings.model.impl.RatingsEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
186             * </p>
187             *
188             * @param dynamicQuery the dynamic query
189             * @param start the lower bound of the range of model instances
190             * @param end the upper bound of the range of model instances (not inclusive)
191             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
192             * @return the ordered range of matching rows
193             * @throws SystemException if a system exception occurred
194             */
195            @SuppressWarnings("rawtypes")
196            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
197                    OrderByComparator orderByComparator) throws SystemException {
198                    return ratingsEntryPersistence.findWithDynamicQuery(dynamicQuery,
199                            start, end, orderByComparator);
200            }
201    
202            /**
203             * Returns the number of rows that match the dynamic query.
204             *
205             * @param dynamicQuery the dynamic query
206             * @return the number of rows that match the dynamic query
207             * @throws SystemException if a system exception occurred
208             */
209            public long dynamicQueryCount(DynamicQuery dynamicQuery)
210                    throws SystemException {
211                    return ratingsEntryPersistence.countWithDynamicQuery(dynamicQuery);
212            }
213    
214            public RatingsEntry fetchRatingsEntry(long entryId)
215                    throws SystemException {
216                    return ratingsEntryPersistence.fetchByPrimaryKey(entryId);
217            }
218    
219            /**
220             * Returns the ratings entry with the primary key.
221             *
222             * @param entryId the primary key of the ratings entry
223             * @return the ratings entry
224             * @throws PortalException if a ratings entry with the primary key could not be found
225             * @throws SystemException if a system exception occurred
226             */
227            public RatingsEntry getRatingsEntry(long entryId)
228                    throws PortalException, SystemException {
229                    return ratingsEntryPersistence.findByPrimaryKey(entryId);
230            }
231    
232            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
233                    throws PortalException, SystemException {
234                    return ratingsEntryPersistence.findByPrimaryKey(primaryKeyObj);
235            }
236    
237            /**
238             * Returns a range of all the ratings entries.
239             *
240             * <p>
241             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.ratings.model.impl.RatingsEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
242             * </p>
243             *
244             * @param start the lower bound of the range of ratings entries
245             * @param end the upper bound of the range of ratings entries (not inclusive)
246             * @return the range of ratings entries
247             * @throws SystemException if a system exception occurred
248             */
249            public List<RatingsEntry> getRatingsEntries(int start, int end)
250                    throws SystemException {
251                    return ratingsEntryPersistence.findAll(start, end);
252            }
253    
254            /**
255             * Returns the number of ratings entries.
256             *
257             * @return the number of ratings entries
258             * @throws SystemException if a system exception occurred
259             */
260            public int getRatingsEntriesCount() throws SystemException {
261                    return ratingsEntryPersistence.countAll();
262            }
263    
264            /**
265             * Updates the ratings entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
266             *
267             * @param ratingsEntry the ratings entry
268             * @return the ratings entry that was updated
269             * @throws SystemException if a system exception occurred
270             */
271            @Indexable(type = IndexableType.REINDEX)
272            public RatingsEntry updateRatingsEntry(RatingsEntry ratingsEntry)
273                    throws SystemException {
274                    return ratingsEntryPersistence.update(ratingsEntry);
275            }
276    
277            /**
278             * Returns the ratings entry local service.
279             *
280             * @return the ratings entry local service
281             */
282            public RatingsEntryLocalService getRatingsEntryLocalService() {
283                    return ratingsEntryLocalService;
284            }
285    
286            /**
287             * Sets the ratings entry local service.
288             *
289             * @param ratingsEntryLocalService the ratings entry local service
290             */
291            public void setRatingsEntryLocalService(
292                    RatingsEntryLocalService ratingsEntryLocalService) {
293                    this.ratingsEntryLocalService = ratingsEntryLocalService;
294            }
295    
296            /**
297             * Returns the ratings entry remote service.
298             *
299             * @return the ratings entry remote service
300             */
301            public RatingsEntryService getRatingsEntryService() {
302                    return ratingsEntryService;
303            }
304    
305            /**
306             * Sets the ratings entry remote service.
307             *
308             * @param ratingsEntryService the ratings entry remote service
309             */
310            public void setRatingsEntryService(RatingsEntryService ratingsEntryService) {
311                    this.ratingsEntryService = ratingsEntryService;
312            }
313    
314            /**
315             * Returns the ratings entry persistence.
316             *
317             * @return the ratings entry persistence
318             */
319            public RatingsEntryPersistence getRatingsEntryPersistence() {
320                    return ratingsEntryPersistence;
321            }
322    
323            /**
324             * Sets the ratings entry persistence.
325             *
326             * @param ratingsEntryPersistence the ratings entry persistence
327             */
328            public void setRatingsEntryPersistence(
329                    RatingsEntryPersistence ratingsEntryPersistence) {
330                    this.ratingsEntryPersistence = ratingsEntryPersistence;
331            }
332    
333            /**
334             * Returns the ratings entry finder.
335             *
336             * @return the ratings entry finder
337             */
338            public RatingsEntryFinder getRatingsEntryFinder() {
339                    return ratingsEntryFinder;
340            }
341    
342            /**
343             * Sets the ratings entry finder.
344             *
345             * @param ratingsEntryFinder the ratings entry finder
346             */
347            public void setRatingsEntryFinder(RatingsEntryFinder ratingsEntryFinder) {
348                    this.ratingsEntryFinder = ratingsEntryFinder;
349            }
350    
351            /**
352             * Returns the ratings stats local service.
353             *
354             * @return the ratings stats local service
355             */
356            public RatingsStatsLocalService getRatingsStatsLocalService() {
357                    return ratingsStatsLocalService;
358            }
359    
360            /**
361             * Sets the ratings stats local service.
362             *
363             * @param ratingsStatsLocalService the ratings stats local service
364             */
365            public void setRatingsStatsLocalService(
366                    RatingsStatsLocalService ratingsStatsLocalService) {
367                    this.ratingsStatsLocalService = ratingsStatsLocalService;
368            }
369    
370            /**
371             * Returns the ratings stats persistence.
372             *
373             * @return the ratings stats persistence
374             */
375            public RatingsStatsPersistence getRatingsStatsPersistence() {
376                    return ratingsStatsPersistence;
377            }
378    
379            /**
380             * Sets the ratings stats persistence.
381             *
382             * @param ratingsStatsPersistence the ratings stats persistence
383             */
384            public void setRatingsStatsPersistence(
385                    RatingsStatsPersistence ratingsStatsPersistence) {
386                    this.ratingsStatsPersistence = ratingsStatsPersistence;
387            }
388    
389            /**
390             * Returns the ratings stats finder.
391             *
392             * @return the ratings stats finder
393             */
394            public RatingsStatsFinder getRatingsStatsFinder() {
395                    return ratingsStatsFinder;
396            }
397    
398            /**
399             * Sets the ratings stats finder.
400             *
401             * @param ratingsStatsFinder the ratings stats finder
402             */
403            public void setRatingsStatsFinder(RatingsStatsFinder ratingsStatsFinder) {
404                    this.ratingsStatsFinder = ratingsStatsFinder;
405            }
406    
407            /**
408             * Returns the counter local service.
409             *
410             * @return the counter local service
411             */
412            public CounterLocalService getCounterLocalService() {
413                    return counterLocalService;
414            }
415    
416            /**
417             * Sets the counter local service.
418             *
419             * @param counterLocalService the counter local service
420             */
421            public void setCounterLocalService(CounterLocalService counterLocalService) {
422                    this.counterLocalService = counterLocalService;
423            }
424    
425            /**
426             * Returns the resource local service.
427             *
428             * @return the resource local service
429             */
430            public ResourceLocalService getResourceLocalService() {
431                    return resourceLocalService;
432            }
433    
434            /**
435             * Sets the resource local service.
436             *
437             * @param resourceLocalService the resource local service
438             */
439            public void setResourceLocalService(
440                    ResourceLocalService resourceLocalService) {
441                    this.resourceLocalService = resourceLocalService;
442            }
443    
444            /**
445             * Returns the user local service.
446             *
447             * @return the user local service
448             */
449            public UserLocalService getUserLocalService() {
450                    return userLocalService;
451            }
452    
453            /**
454             * Sets the user local service.
455             *
456             * @param userLocalService the user local service
457             */
458            public void setUserLocalService(UserLocalService userLocalService) {
459                    this.userLocalService = userLocalService;
460            }
461    
462            /**
463             * Returns the user remote service.
464             *
465             * @return the user remote service
466             */
467            public UserService getUserService() {
468                    return userService;
469            }
470    
471            /**
472             * Sets the user remote service.
473             *
474             * @param userService the user remote service
475             */
476            public void setUserService(UserService userService) {
477                    this.userService = userService;
478            }
479    
480            /**
481             * Returns the user persistence.
482             *
483             * @return the user persistence
484             */
485            public UserPersistence getUserPersistence() {
486                    return userPersistence;
487            }
488    
489            /**
490             * Sets the user persistence.
491             *
492             * @param userPersistence the user persistence
493             */
494            public void setUserPersistence(UserPersistence userPersistence) {
495                    this.userPersistence = userPersistence;
496            }
497    
498            /**
499             * Returns the user finder.
500             *
501             * @return the user finder
502             */
503            public UserFinder getUserFinder() {
504                    return userFinder;
505            }
506    
507            /**
508             * Sets the user finder.
509             *
510             * @param userFinder the user finder
511             */
512            public void setUserFinder(UserFinder userFinder) {
513                    this.userFinder = userFinder;
514            }
515    
516            /**
517             * Returns the asset entry local service.
518             *
519             * @return the asset entry local service
520             */
521            public AssetEntryLocalService getAssetEntryLocalService() {
522                    return assetEntryLocalService;
523            }
524    
525            /**
526             * Sets the asset entry local service.
527             *
528             * @param assetEntryLocalService the asset entry local service
529             */
530            public void setAssetEntryLocalService(
531                    AssetEntryLocalService assetEntryLocalService) {
532                    this.assetEntryLocalService = assetEntryLocalService;
533            }
534    
535            /**
536             * Returns the asset entry remote service.
537             *
538             * @return the asset entry remote service
539             */
540            public AssetEntryService getAssetEntryService() {
541                    return assetEntryService;
542            }
543    
544            /**
545             * Sets the asset entry remote service.
546             *
547             * @param assetEntryService the asset entry remote service
548             */
549            public void setAssetEntryService(AssetEntryService assetEntryService) {
550                    this.assetEntryService = assetEntryService;
551            }
552    
553            /**
554             * Returns the asset entry persistence.
555             *
556             * @return the asset entry persistence
557             */
558            public AssetEntryPersistence getAssetEntryPersistence() {
559                    return assetEntryPersistence;
560            }
561    
562            /**
563             * Sets the asset entry persistence.
564             *
565             * @param assetEntryPersistence the asset entry persistence
566             */
567            public void setAssetEntryPersistence(
568                    AssetEntryPersistence assetEntryPersistence) {
569                    this.assetEntryPersistence = assetEntryPersistence;
570            }
571    
572            /**
573             * Returns the asset entry finder.
574             *
575             * @return the asset entry finder
576             */
577            public AssetEntryFinder getAssetEntryFinder() {
578                    return assetEntryFinder;
579            }
580    
581            /**
582             * Sets the asset entry finder.
583             *
584             * @param assetEntryFinder the asset entry finder
585             */
586            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
587                    this.assetEntryFinder = assetEntryFinder;
588            }
589    
590            /**
591             * Returns the blogs entry local service.
592             *
593             * @return the blogs entry local service
594             */
595            public BlogsEntryLocalService getBlogsEntryLocalService() {
596                    return blogsEntryLocalService;
597            }
598    
599            /**
600             * Sets the blogs entry local service.
601             *
602             * @param blogsEntryLocalService the blogs entry local service
603             */
604            public void setBlogsEntryLocalService(
605                    BlogsEntryLocalService blogsEntryLocalService) {
606                    this.blogsEntryLocalService = blogsEntryLocalService;
607            }
608    
609            /**
610             * Returns the blogs entry remote service.
611             *
612             * @return the blogs entry remote service
613             */
614            public BlogsEntryService getBlogsEntryService() {
615                    return blogsEntryService;
616            }
617    
618            /**
619             * Sets the blogs entry remote service.
620             *
621             * @param blogsEntryService the blogs entry remote service
622             */
623            public void setBlogsEntryService(BlogsEntryService blogsEntryService) {
624                    this.blogsEntryService = blogsEntryService;
625            }
626    
627            /**
628             * Returns the blogs entry persistence.
629             *
630             * @return the blogs entry persistence
631             */
632            public BlogsEntryPersistence getBlogsEntryPersistence() {
633                    return blogsEntryPersistence;
634            }
635    
636            /**
637             * Sets the blogs entry persistence.
638             *
639             * @param blogsEntryPersistence the blogs entry persistence
640             */
641            public void setBlogsEntryPersistence(
642                    BlogsEntryPersistence blogsEntryPersistence) {
643                    this.blogsEntryPersistence = blogsEntryPersistence;
644            }
645    
646            /**
647             * Returns the blogs entry finder.
648             *
649             * @return the blogs entry finder
650             */
651            public BlogsEntryFinder getBlogsEntryFinder() {
652                    return blogsEntryFinder;
653            }
654    
655            /**
656             * Sets the blogs entry finder.
657             *
658             * @param blogsEntryFinder the blogs entry finder
659             */
660            public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
661                    this.blogsEntryFinder = blogsEntryFinder;
662            }
663    
664            /**
665             * Returns the blogs stats user local service.
666             *
667             * @return the blogs stats user local service
668             */
669            public BlogsStatsUserLocalService getBlogsStatsUserLocalService() {
670                    return blogsStatsUserLocalService;
671            }
672    
673            /**
674             * Sets the blogs stats user local service.
675             *
676             * @param blogsStatsUserLocalService the blogs stats user local service
677             */
678            public void setBlogsStatsUserLocalService(
679                    BlogsStatsUserLocalService blogsStatsUserLocalService) {
680                    this.blogsStatsUserLocalService = blogsStatsUserLocalService;
681            }
682    
683            /**
684             * Returns the blogs stats user persistence.
685             *
686             * @return the blogs stats user persistence
687             */
688            public BlogsStatsUserPersistence getBlogsStatsUserPersistence() {
689                    return blogsStatsUserPersistence;
690            }
691    
692            /**
693             * Sets the blogs stats user persistence.
694             *
695             * @param blogsStatsUserPersistence the blogs stats user persistence
696             */
697            public void setBlogsStatsUserPersistence(
698                    BlogsStatsUserPersistence blogsStatsUserPersistence) {
699                    this.blogsStatsUserPersistence = blogsStatsUserPersistence;
700            }
701    
702            /**
703             * Returns the blogs stats user finder.
704             *
705             * @return the blogs stats user finder
706             */
707            public BlogsStatsUserFinder getBlogsStatsUserFinder() {
708                    return blogsStatsUserFinder;
709            }
710    
711            /**
712             * Sets the blogs stats user finder.
713             *
714             * @param blogsStatsUserFinder the blogs stats user finder
715             */
716            public void setBlogsStatsUserFinder(
717                    BlogsStatsUserFinder blogsStatsUserFinder) {
718                    this.blogsStatsUserFinder = blogsStatsUserFinder;
719            }
720    
721            /**
722             * Returns the social activity local service.
723             *
724             * @return the social activity local service
725             */
726            public SocialActivityLocalService getSocialActivityLocalService() {
727                    return socialActivityLocalService;
728            }
729    
730            /**
731             * Sets the social activity local service.
732             *
733             * @param socialActivityLocalService the social activity local service
734             */
735            public void setSocialActivityLocalService(
736                    SocialActivityLocalService socialActivityLocalService) {
737                    this.socialActivityLocalService = socialActivityLocalService;
738            }
739    
740            /**
741             * Returns the social activity persistence.
742             *
743             * @return the social activity persistence
744             */
745            public SocialActivityPersistence getSocialActivityPersistence() {
746                    return socialActivityPersistence;
747            }
748    
749            /**
750             * Sets the social activity persistence.
751             *
752             * @param socialActivityPersistence the social activity persistence
753             */
754            public void setSocialActivityPersistence(
755                    SocialActivityPersistence socialActivityPersistence) {
756                    this.socialActivityPersistence = socialActivityPersistence;
757            }
758    
759            /**
760             * Returns the social activity finder.
761             *
762             * @return the social activity finder
763             */
764            public SocialActivityFinder getSocialActivityFinder() {
765                    return socialActivityFinder;
766            }
767    
768            /**
769             * Sets the social activity finder.
770             *
771             * @param socialActivityFinder the social activity finder
772             */
773            public void setSocialActivityFinder(
774                    SocialActivityFinder socialActivityFinder) {
775                    this.socialActivityFinder = socialActivityFinder;
776            }
777    
778            public void afterPropertiesSet() {
779                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.ratings.model.RatingsEntry",
780                            ratingsEntryLocalService);
781            }
782    
783            public void destroy() {
784                    persistedModelLocalServiceRegistry.unregister(
785                            "com.liferay.portlet.ratings.model.RatingsEntry");
786            }
787    
788            /**
789             * Returns the Spring bean ID for this bean.
790             *
791             * @return the Spring bean ID for this bean
792             */
793            public String getBeanIdentifier() {
794                    return _beanIdentifier;
795            }
796    
797            /**
798             * Sets the Spring bean ID for this bean.
799             *
800             * @param beanIdentifier the Spring bean ID for this bean
801             */
802            public void setBeanIdentifier(String beanIdentifier) {
803                    _beanIdentifier = beanIdentifier;
804            }
805    
806            protected Class<?> getModelClass() {
807                    return RatingsEntry.class;
808            }
809    
810            protected String getModelClassName() {
811                    return RatingsEntry.class.getName();
812            }
813    
814            /**
815             * Performs an SQL query.
816             *
817             * @param sql the sql query
818             */
819            protected void runSQL(String sql) throws SystemException {
820                    try {
821                            DataSource dataSource = ratingsEntryPersistence.getDataSource();
822    
823                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
824                                            sql, new int[0]);
825    
826                            sqlUpdate.update();
827                    }
828                    catch (Exception e) {
829                            throw new SystemException(e);
830                    }
831            }
832    
833            @BeanReference(type = RatingsEntryLocalService.class)
834            protected RatingsEntryLocalService ratingsEntryLocalService;
835            @BeanReference(type = RatingsEntryService.class)
836            protected RatingsEntryService ratingsEntryService;
837            @BeanReference(type = RatingsEntryPersistence.class)
838            protected RatingsEntryPersistence ratingsEntryPersistence;
839            @BeanReference(type = RatingsEntryFinder.class)
840            protected RatingsEntryFinder ratingsEntryFinder;
841            @BeanReference(type = RatingsStatsLocalService.class)
842            protected RatingsStatsLocalService ratingsStatsLocalService;
843            @BeanReference(type = RatingsStatsPersistence.class)
844            protected RatingsStatsPersistence ratingsStatsPersistence;
845            @BeanReference(type = RatingsStatsFinder.class)
846            protected RatingsStatsFinder ratingsStatsFinder;
847            @BeanReference(type = CounterLocalService.class)
848            protected CounterLocalService counterLocalService;
849            @BeanReference(type = ResourceLocalService.class)
850            protected ResourceLocalService resourceLocalService;
851            @BeanReference(type = UserLocalService.class)
852            protected UserLocalService userLocalService;
853            @BeanReference(type = UserService.class)
854            protected UserService userService;
855            @BeanReference(type = UserPersistence.class)
856            protected UserPersistence userPersistence;
857            @BeanReference(type = UserFinder.class)
858            protected UserFinder userFinder;
859            @BeanReference(type = AssetEntryLocalService.class)
860            protected AssetEntryLocalService assetEntryLocalService;
861            @BeanReference(type = AssetEntryService.class)
862            protected AssetEntryService assetEntryService;
863            @BeanReference(type = AssetEntryPersistence.class)
864            protected AssetEntryPersistence assetEntryPersistence;
865            @BeanReference(type = AssetEntryFinder.class)
866            protected AssetEntryFinder assetEntryFinder;
867            @BeanReference(type = BlogsEntryLocalService.class)
868            protected BlogsEntryLocalService blogsEntryLocalService;
869            @BeanReference(type = BlogsEntryService.class)
870            protected BlogsEntryService blogsEntryService;
871            @BeanReference(type = BlogsEntryPersistence.class)
872            protected BlogsEntryPersistence blogsEntryPersistence;
873            @BeanReference(type = BlogsEntryFinder.class)
874            protected BlogsEntryFinder blogsEntryFinder;
875            @BeanReference(type = BlogsStatsUserLocalService.class)
876            protected BlogsStatsUserLocalService blogsStatsUserLocalService;
877            @BeanReference(type = BlogsStatsUserPersistence.class)
878            protected BlogsStatsUserPersistence blogsStatsUserPersistence;
879            @BeanReference(type = BlogsStatsUserFinder.class)
880            protected BlogsStatsUserFinder blogsStatsUserFinder;
881            @BeanReference(type = SocialActivityLocalService.class)
882            protected SocialActivityLocalService socialActivityLocalService;
883            @BeanReference(type = SocialActivityPersistence.class)
884            protected SocialActivityPersistence socialActivityPersistence;
885            @BeanReference(type = SocialActivityFinder.class)
886            protected SocialActivityFinder socialActivityFinder;
887            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
888            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
889            private String _beanIdentifier;
890    }