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