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