001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.social.service.base;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.db.DB;
022    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
028    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
029    import com.liferay.portal.kernel.dao.orm.Projection;
030    import com.liferay.portal.kernel.exception.PortalException;
031    import com.liferay.portal.kernel.exception.SystemException;
032    import com.liferay.portal.kernel.search.Indexable;
033    import com.liferay.portal.kernel.search.IndexableType;
034    import com.liferay.portal.kernel.util.OrderByComparator;
035    import com.liferay.portal.model.PersistedModel;
036    import com.liferay.portal.service.BaseLocalServiceImpl;
037    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
038    import com.liferay.portal.service.persistence.ClassNamePersistence;
039    import com.liferay.portal.service.persistence.GroupFinder;
040    import com.liferay.portal.service.persistence.GroupPersistence;
041    import com.liferay.portal.service.persistence.UserFinder;
042    import com.liferay.portal.service.persistence.UserPersistence;
043    import com.liferay.portal.util.PortalUtil;
044    
045    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
046    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
047    import com.liferay.portlet.social.model.SocialActivityCounter;
048    import com.liferay.portlet.social.service.SocialActivityCounterLocalService;
049    import com.liferay.portlet.social.service.persistence.SocialActivityCounterFinder;
050    import com.liferay.portlet.social.service.persistence.SocialActivityCounterPersistence;
051    import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence;
052    import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence;
053    
054    import java.io.Serializable;
055    
056    import java.util.List;
057    
058    import javax.sql.DataSource;
059    
060    /**
061     * Provides the base implementation for the social activity counter local service.
062     *
063     * <p>
064     * 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.social.service.impl.SocialActivityCounterLocalServiceImpl}.
065     * </p>
066     *
067     * @author Brian Wing Shun Chan
068     * @see com.liferay.portlet.social.service.impl.SocialActivityCounterLocalServiceImpl
069     * @see com.liferay.portlet.social.service.SocialActivityCounterLocalServiceUtil
070     * @generated
071     */
072    @ProviderType
073    public abstract class SocialActivityCounterLocalServiceBaseImpl
074            extends BaseLocalServiceImpl implements SocialActivityCounterLocalService,
075                    IdentifiableBean {
076            /*
077             * NOTE FOR DEVELOPERS:
078             *
079             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.social.service.SocialActivityCounterLocalServiceUtil} to access the social activity counter local service.
080             */
081    
082            /**
083             * Adds the social activity counter to the database. Also notifies the appropriate model listeners.
084             *
085             * @param socialActivityCounter the social activity counter
086             * @return the social activity counter that was added
087             */
088            @Indexable(type = IndexableType.REINDEX)
089            @Override
090            public SocialActivityCounter addSocialActivityCounter(
091                    SocialActivityCounter socialActivityCounter) {
092                    socialActivityCounter.setNew(true);
093    
094                    return socialActivityCounterPersistence.update(socialActivityCounter);
095            }
096    
097            /**
098             * Creates a new social activity counter with the primary key. Does not add the social activity counter to the database.
099             *
100             * @param activityCounterId the primary key for the new social activity counter
101             * @return the new social activity counter
102             */
103            @Override
104            public SocialActivityCounter createSocialActivityCounter(
105                    long activityCounterId) {
106                    return socialActivityCounterPersistence.create(activityCounterId);
107            }
108    
109            /**
110             * Deletes the social activity counter with the primary key from the database. Also notifies the appropriate model listeners.
111             *
112             * @param activityCounterId the primary key of the social activity counter
113             * @return the social activity counter that was removed
114             * @throws PortalException if a social activity counter with the primary key could not be found
115             */
116            @Indexable(type = IndexableType.DELETE)
117            @Override
118            public SocialActivityCounter deleteSocialActivityCounter(
119                    long activityCounterId) throws PortalException {
120                    return socialActivityCounterPersistence.remove(activityCounterId);
121            }
122    
123            /**
124             * Deletes the social activity counter from the database. Also notifies the appropriate model listeners.
125             *
126             * @param socialActivityCounter the social activity counter
127             * @return the social activity counter that was removed
128             */
129            @Indexable(type = IndexableType.DELETE)
130            @Override
131            public SocialActivityCounter deleteSocialActivityCounter(
132                    SocialActivityCounter socialActivityCounter) {
133                    return socialActivityCounterPersistence.remove(socialActivityCounter);
134            }
135    
136            @Override
137            public DynamicQuery dynamicQuery() {
138                    Class<?> clazz = getClass();
139    
140                    return DynamicQueryFactoryUtil.forClass(SocialActivityCounter.class,
141                            clazz.getClassLoader());
142            }
143    
144            /**
145             * Performs a dynamic query on the database and returns the matching rows.
146             *
147             * @param dynamicQuery the dynamic query
148             * @return the matching rows
149             */
150            @Override
151            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
152                    return socialActivityCounterPersistence.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.social.model.impl.SocialActivityCounterModelImpl}. 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             */
167            @Override
168            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
169                    int end) {
170                    return socialActivityCounterPersistence.findWithDynamicQuery(dynamicQuery,
171                            start, end);
172            }
173    
174            /**
175             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
176             *
177             * <p>
178             * 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.social.model.impl.SocialActivityCounterModelImpl}. 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.
179             * </p>
180             *
181             * @param dynamicQuery the dynamic query
182             * @param start the lower bound of the range of model instances
183             * @param end the upper bound of the range of model instances (not inclusive)
184             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
185             * @return the ordered range of matching rows
186             */
187            @Override
188            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
189                    int end, OrderByComparator<T> orderByComparator) {
190                    return socialActivityCounterPersistence.findWithDynamicQuery(dynamicQuery,
191                            start, end, orderByComparator);
192            }
193    
194            /**
195             * Returns the number of rows matching the dynamic query.
196             *
197             * @param dynamicQuery the dynamic query
198             * @return the number of rows matching the dynamic query
199             */
200            @Override
201            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
202                    return socialActivityCounterPersistence.countWithDynamicQuery(dynamicQuery);
203            }
204    
205            /**
206             * Returns the number of rows matching the dynamic query.
207             *
208             * @param dynamicQuery the dynamic query
209             * @param projection the projection to apply to the query
210             * @return the number of rows matching the dynamic query
211             */
212            @Override
213            public long dynamicQueryCount(DynamicQuery dynamicQuery,
214                    Projection projection) {
215                    return socialActivityCounterPersistence.countWithDynamicQuery(dynamicQuery,
216                            projection);
217            }
218    
219            @Override
220            public SocialActivityCounter fetchSocialActivityCounter(
221                    long activityCounterId) {
222                    return socialActivityCounterPersistence.fetchByPrimaryKey(activityCounterId);
223            }
224    
225            /**
226             * Returns the social activity counter with the primary key.
227             *
228             * @param activityCounterId the primary key of the social activity counter
229             * @return the social activity counter
230             * @throws PortalException if a social activity counter with the primary key could not be found
231             */
232            @Override
233            public SocialActivityCounter getSocialActivityCounter(
234                    long activityCounterId) throws PortalException {
235                    return socialActivityCounterPersistence.findByPrimaryKey(activityCounterId);
236            }
237    
238            @Override
239            public ActionableDynamicQuery getActionableDynamicQuery() {
240                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
241    
242                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.social.service.SocialActivityCounterLocalServiceUtil.getService());
243                    actionableDynamicQuery.setClass(SocialActivityCounter.class);
244                    actionableDynamicQuery.setClassLoader(getClassLoader());
245    
246                    actionableDynamicQuery.setPrimaryKeyPropertyName("activityCounterId");
247    
248                    return actionableDynamicQuery;
249            }
250    
251            protected void initActionableDynamicQuery(
252                    ActionableDynamicQuery actionableDynamicQuery) {
253                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.social.service.SocialActivityCounterLocalServiceUtil.getService());
254                    actionableDynamicQuery.setClass(SocialActivityCounter.class);
255                    actionableDynamicQuery.setClassLoader(getClassLoader());
256    
257                    actionableDynamicQuery.setPrimaryKeyPropertyName("activityCounterId");
258            }
259    
260            /**
261             * @throws PortalException
262             */
263            @Override
264            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
265                    throws PortalException {
266                    return socialActivityCounterLocalService.deleteSocialActivityCounter((SocialActivityCounter)persistedModel);
267            }
268    
269            @Override
270            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
271                    throws PortalException {
272                    return socialActivityCounterPersistence.findByPrimaryKey(primaryKeyObj);
273            }
274    
275            /**
276             * Returns a range of all the social activity counters.
277             *
278             * <p>
279             * 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.social.model.impl.SocialActivityCounterModelImpl}. 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.
280             * </p>
281             *
282             * @param start the lower bound of the range of social activity counters
283             * @param end the upper bound of the range of social activity counters (not inclusive)
284             * @return the range of social activity counters
285             */
286            @Override
287            public List<SocialActivityCounter> getSocialActivityCounters(int start,
288                    int end) {
289                    return socialActivityCounterPersistence.findAll(start, end);
290            }
291    
292            /**
293             * Returns the number of social activity counters.
294             *
295             * @return the number of social activity counters
296             */
297            @Override
298            public int getSocialActivityCountersCount() {
299                    return socialActivityCounterPersistence.countAll();
300            }
301    
302            /**
303             * Updates the social activity counter in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
304             *
305             * @param socialActivityCounter the social activity counter
306             * @return the social activity counter that was updated
307             */
308            @Indexable(type = IndexableType.REINDEX)
309            @Override
310            public SocialActivityCounter updateSocialActivityCounter(
311                    SocialActivityCounter socialActivityCounter) {
312                    return socialActivityCounterPersistence.update(socialActivityCounter);
313            }
314    
315            /**
316             * Returns the social activity counter local service.
317             *
318             * @return the social activity counter local service
319             */
320            public SocialActivityCounterLocalService getSocialActivityCounterLocalService() {
321                    return socialActivityCounterLocalService;
322            }
323    
324            /**
325             * Sets the social activity counter local service.
326             *
327             * @param socialActivityCounterLocalService the social activity counter local service
328             */
329            public void setSocialActivityCounterLocalService(
330                    SocialActivityCounterLocalService socialActivityCounterLocalService) {
331                    this.socialActivityCounterLocalService = socialActivityCounterLocalService;
332            }
333    
334            /**
335             * Returns the social activity counter persistence.
336             *
337             * @return the social activity counter persistence
338             */
339            public SocialActivityCounterPersistence getSocialActivityCounterPersistence() {
340                    return socialActivityCounterPersistence;
341            }
342    
343            /**
344             * Sets the social activity counter persistence.
345             *
346             * @param socialActivityCounterPersistence the social activity counter persistence
347             */
348            public void setSocialActivityCounterPersistence(
349                    SocialActivityCounterPersistence socialActivityCounterPersistence) {
350                    this.socialActivityCounterPersistence = socialActivityCounterPersistence;
351            }
352    
353            /**
354             * Returns the social activity counter finder.
355             *
356             * @return the social activity counter finder
357             */
358            public SocialActivityCounterFinder getSocialActivityCounterFinder() {
359                    return socialActivityCounterFinder;
360            }
361    
362            /**
363             * Sets the social activity counter finder.
364             *
365             * @param socialActivityCounterFinder the social activity counter finder
366             */
367            public void setSocialActivityCounterFinder(
368                    SocialActivityCounterFinder socialActivityCounterFinder) {
369                    this.socialActivityCounterFinder = socialActivityCounterFinder;
370            }
371    
372            /**
373             * Returns the counter local service.
374             *
375             * @return the counter local service
376             */
377            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
378                    return counterLocalService;
379            }
380    
381            /**
382             * Sets the counter local service.
383             *
384             * @param counterLocalService the counter local service
385             */
386            public void setCounterLocalService(
387                    com.liferay.counter.service.CounterLocalService counterLocalService) {
388                    this.counterLocalService = counterLocalService;
389            }
390    
391            /**
392             * Returns the class name local service.
393             *
394             * @return the class name local service
395             */
396            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
397                    return classNameLocalService;
398            }
399    
400            /**
401             * Sets the class name local service.
402             *
403             * @param classNameLocalService the class name local service
404             */
405            public void setClassNameLocalService(
406                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
407                    this.classNameLocalService = classNameLocalService;
408            }
409    
410            /**
411             * Returns the class name remote service.
412             *
413             * @return the class name remote service
414             */
415            public com.liferay.portal.service.ClassNameService getClassNameService() {
416                    return classNameService;
417            }
418    
419            /**
420             * Sets the class name remote service.
421             *
422             * @param classNameService the class name remote service
423             */
424            public void setClassNameService(
425                    com.liferay.portal.service.ClassNameService classNameService) {
426                    this.classNameService = classNameService;
427            }
428    
429            /**
430             * Returns the class name persistence.
431             *
432             * @return the class name persistence
433             */
434            public ClassNamePersistence getClassNamePersistence() {
435                    return classNamePersistence;
436            }
437    
438            /**
439             * Sets the class name persistence.
440             *
441             * @param classNamePersistence the class name persistence
442             */
443            public void setClassNamePersistence(
444                    ClassNamePersistence classNamePersistence) {
445                    this.classNamePersistence = classNamePersistence;
446            }
447    
448            /**
449             * Returns the group local service.
450             *
451             * @return the group local service
452             */
453            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
454                    return groupLocalService;
455            }
456    
457            /**
458             * Sets the group local service.
459             *
460             * @param groupLocalService the group local service
461             */
462            public void setGroupLocalService(
463                    com.liferay.portal.service.GroupLocalService groupLocalService) {
464                    this.groupLocalService = groupLocalService;
465            }
466    
467            /**
468             * Returns the group remote service.
469             *
470             * @return the group remote service
471             */
472            public com.liferay.portal.service.GroupService getGroupService() {
473                    return groupService;
474            }
475    
476            /**
477             * Sets the group remote service.
478             *
479             * @param groupService the group remote service
480             */
481            public void setGroupService(
482                    com.liferay.portal.service.GroupService groupService) {
483                    this.groupService = groupService;
484            }
485    
486            /**
487             * Returns the group persistence.
488             *
489             * @return the group persistence
490             */
491            public GroupPersistence getGroupPersistence() {
492                    return groupPersistence;
493            }
494    
495            /**
496             * Sets the group persistence.
497             *
498             * @param groupPersistence the group persistence
499             */
500            public void setGroupPersistence(GroupPersistence groupPersistence) {
501                    this.groupPersistence = groupPersistence;
502            }
503    
504            /**
505             * Returns the group finder.
506             *
507             * @return the group finder
508             */
509            public GroupFinder getGroupFinder() {
510                    return groupFinder;
511            }
512    
513            /**
514             * Sets the group finder.
515             *
516             * @param groupFinder the group finder
517             */
518            public void setGroupFinder(GroupFinder groupFinder) {
519                    this.groupFinder = groupFinder;
520            }
521    
522            /**
523             * Returns the user local service.
524             *
525             * @return the user local service
526             */
527            public com.liferay.portal.service.UserLocalService getUserLocalService() {
528                    return userLocalService;
529            }
530    
531            /**
532             * Sets the user local service.
533             *
534             * @param userLocalService the user local service
535             */
536            public void setUserLocalService(
537                    com.liferay.portal.service.UserLocalService userLocalService) {
538                    this.userLocalService = userLocalService;
539            }
540    
541            /**
542             * Returns the user remote service.
543             *
544             * @return the user remote service
545             */
546            public com.liferay.portal.service.UserService getUserService() {
547                    return userService;
548            }
549    
550            /**
551             * Sets the user remote service.
552             *
553             * @param userService the user remote service
554             */
555            public void setUserService(
556                    com.liferay.portal.service.UserService userService) {
557                    this.userService = userService;
558            }
559    
560            /**
561             * Returns the user persistence.
562             *
563             * @return the user persistence
564             */
565            public UserPersistence getUserPersistence() {
566                    return userPersistence;
567            }
568    
569            /**
570             * Sets the user persistence.
571             *
572             * @param userPersistence the user persistence
573             */
574            public void setUserPersistence(UserPersistence userPersistence) {
575                    this.userPersistence = userPersistence;
576            }
577    
578            /**
579             * Returns the user finder.
580             *
581             * @return the user finder
582             */
583            public UserFinder getUserFinder() {
584                    return userFinder;
585            }
586    
587            /**
588             * Sets the user finder.
589             *
590             * @param userFinder the user finder
591             */
592            public void setUserFinder(UserFinder userFinder) {
593                    this.userFinder = userFinder;
594            }
595    
596            /**
597             * Returns the asset entry local service.
598             *
599             * @return the asset entry local service
600             */
601            public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
602                    return assetEntryLocalService;
603            }
604    
605            /**
606             * Sets the asset entry local service.
607             *
608             * @param assetEntryLocalService the asset entry local service
609             */
610            public void setAssetEntryLocalService(
611                    com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
612                    this.assetEntryLocalService = assetEntryLocalService;
613            }
614    
615            /**
616             * Returns the asset entry remote service.
617             *
618             * @return the asset entry remote service
619             */
620            public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() {
621                    return assetEntryService;
622            }
623    
624            /**
625             * Sets the asset entry remote service.
626             *
627             * @param assetEntryService the asset entry remote service
628             */
629            public void setAssetEntryService(
630                    com.liferay.portlet.asset.service.AssetEntryService assetEntryService) {
631                    this.assetEntryService = assetEntryService;
632            }
633    
634            /**
635             * Returns the asset entry persistence.
636             *
637             * @return the asset entry persistence
638             */
639            public AssetEntryPersistence getAssetEntryPersistence() {
640                    return assetEntryPersistence;
641            }
642    
643            /**
644             * Sets the asset entry persistence.
645             *
646             * @param assetEntryPersistence the asset entry persistence
647             */
648            public void setAssetEntryPersistence(
649                    AssetEntryPersistence assetEntryPersistence) {
650                    this.assetEntryPersistence = assetEntryPersistence;
651            }
652    
653            /**
654             * Returns the asset entry finder.
655             *
656             * @return the asset entry finder
657             */
658            public AssetEntryFinder getAssetEntryFinder() {
659                    return assetEntryFinder;
660            }
661    
662            /**
663             * Sets the asset entry finder.
664             *
665             * @param assetEntryFinder the asset entry finder
666             */
667            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
668                    this.assetEntryFinder = assetEntryFinder;
669            }
670    
671            /**
672             * Returns the social activity limit local service.
673             *
674             * @return the social activity limit local service
675             */
676            public com.liferay.portlet.social.service.SocialActivityLimitLocalService getSocialActivityLimitLocalService() {
677                    return socialActivityLimitLocalService;
678            }
679    
680            /**
681             * Sets the social activity limit local service.
682             *
683             * @param socialActivityLimitLocalService the social activity limit local service
684             */
685            public void setSocialActivityLimitLocalService(
686                    com.liferay.portlet.social.service.SocialActivityLimitLocalService socialActivityLimitLocalService) {
687                    this.socialActivityLimitLocalService = socialActivityLimitLocalService;
688            }
689    
690            /**
691             * Returns the social activity limit persistence.
692             *
693             * @return the social activity limit persistence
694             */
695            public SocialActivityLimitPersistence getSocialActivityLimitPersistence() {
696                    return socialActivityLimitPersistence;
697            }
698    
699            /**
700             * Sets the social activity limit persistence.
701             *
702             * @param socialActivityLimitPersistence the social activity limit persistence
703             */
704            public void setSocialActivityLimitPersistence(
705                    SocialActivityLimitPersistence socialActivityLimitPersistence) {
706                    this.socialActivityLimitPersistence = socialActivityLimitPersistence;
707            }
708    
709            /**
710             * Returns the social activity setting local service.
711             *
712             * @return the social activity setting local service
713             */
714            public com.liferay.portlet.social.service.SocialActivitySettingLocalService getSocialActivitySettingLocalService() {
715                    return socialActivitySettingLocalService;
716            }
717    
718            /**
719             * Sets the social activity setting local service.
720             *
721             * @param socialActivitySettingLocalService the social activity setting local service
722             */
723            public void setSocialActivitySettingLocalService(
724                    com.liferay.portlet.social.service.SocialActivitySettingLocalService socialActivitySettingLocalService) {
725                    this.socialActivitySettingLocalService = socialActivitySettingLocalService;
726            }
727    
728            /**
729             * Returns the social activity setting remote service.
730             *
731             * @return the social activity setting remote service
732             */
733            public com.liferay.portlet.social.service.SocialActivitySettingService getSocialActivitySettingService() {
734                    return socialActivitySettingService;
735            }
736    
737            /**
738             * Sets the social activity setting remote service.
739             *
740             * @param socialActivitySettingService the social activity setting remote service
741             */
742            public void setSocialActivitySettingService(
743                    com.liferay.portlet.social.service.SocialActivitySettingService socialActivitySettingService) {
744                    this.socialActivitySettingService = socialActivitySettingService;
745            }
746    
747            /**
748             * Returns the social activity setting persistence.
749             *
750             * @return the social activity setting persistence
751             */
752            public SocialActivitySettingPersistence getSocialActivitySettingPersistence() {
753                    return socialActivitySettingPersistence;
754            }
755    
756            /**
757             * Sets the social activity setting persistence.
758             *
759             * @param socialActivitySettingPersistence the social activity setting persistence
760             */
761            public void setSocialActivitySettingPersistence(
762                    SocialActivitySettingPersistence socialActivitySettingPersistence) {
763                    this.socialActivitySettingPersistence = socialActivitySettingPersistence;
764            }
765    
766            public void afterPropertiesSet() {
767                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.social.model.SocialActivityCounter",
768                            socialActivityCounterLocalService);
769            }
770    
771            public void destroy() {
772                    persistedModelLocalServiceRegistry.unregister(
773                            "com.liferay.portlet.social.model.SocialActivityCounter");
774            }
775    
776            /**
777             * Returns the Spring bean ID for this bean.
778             *
779             * @return the Spring bean ID for this bean
780             */
781            @Override
782            public String getBeanIdentifier() {
783                    return _beanIdentifier;
784            }
785    
786            /**
787             * Sets the Spring bean ID for this bean.
788             *
789             * @param beanIdentifier the Spring bean ID for this bean
790             */
791            @Override
792            public void setBeanIdentifier(String beanIdentifier) {
793                    _beanIdentifier = beanIdentifier;
794            }
795    
796            protected Class<?> getModelClass() {
797                    return SocialActivityCounter.class;
798            }
799    
800            protected String getModelClassName() {
801                    return SocialActivityCounter.class.getName();
802            }
803    
804            /**
805             * Performs a SQL query.
806             *
807             * @param sql the sql query
808             */
809            protected void runSQL(String sql) {
810                    try {
811                            DataSource dataSource = socialActivityCounterPersistence.getDataSource();
812    
813                            DB db = DBFactoryUtil.getDB();
814    
815                            sql = db.buildSQL(sql);
816                            sql = PortalUtil.transformSQL(sql);
817    
818                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
819                                            sql, new int[0]);
820    
821                            sqlUpdate.update();
822                    }
823                    catch (Exception e) {
824                            throw new SystemException(e);
825                    }
826            }
827    
828            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityCounterLocalService.class)
829            protected SocialActivityCounterLocalService socialActivityCounterLocalService;
830            @BeanReference(type = SocialActivityCounterPersistence.class)
831            protected SocialActivityCounterPersistence socialActivityCounterPersistence;
832            @BeanReference(type = SocialActivityCounterFinder.class)
833            protected SocialActivityCounterFinder socialActivityCounterFinder;
834            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
835            protected com.liferay.counter.service.CounterLocalService counterLocalService;
836            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
837            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
838            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
839            protected com.liferay.portal.service.ClassNameService classNameService;
840            @BeanReference(type = ClassNamePersistence.class)
841            protected ClassNamePersistence classNamePersistence;
842            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
843            protected com.liferay.portal.service.GroupLocalService groupLocalService;
844            @BeanReference(type = com.liferay.portal.service.GroupService.class)
845            protected com.liferay.portal.service.GroupService groupService;
846            @BeanReference(type = GroupPersistence.class)
847            protected GroupPersistence groupPersistence;
848            @BeanReference(type = GroupFinder.class)
849            protected GroupFinder groupFinder;
850            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
851            protected com.liferay.portal.service.UserLocalService userLocalService;
852            @BeanReference(type = com.liferay.portal.service.UserService.class)
853            protected com.liferay.portal.service.UserService userService;
854            @BeanReference(type = UserPersistence.class)
855            protected UserPersistence userPersistence;
856            @BeanReference(type = UserFinder.class)
857            protected UserFinder userFinder;
858            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
859            protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
860            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class)
861            protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService;
862            @BeanReference(type = AssetEntryPersistence.class)
863            protected AssetEntryPersistence assetEntryPersistence;
864            @BeanReference(type = AssetEntryFinder.class)
865            protected AssetEntryFinder assetEntryFinder;
866            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLimitLocalService.class)
867            protected com.liferay.portlet.social.service.SocialActivityLimitLocalService socialActivityLimitLocalService;
868            @BeanReference(type = SocialActivityLimitPersistence.class)
869            protected SocialActivityLimitPersistence socialActivityLimitPersistence;
870            @BeanReference(type = com.liferay.portlet.social.service.SocialActivitySettingLocalService.class)
871            protected com.liferay.portlet.social.service.SocialActivitySettingLocalService socialActivitySettingLocalService;
872            @BeanReference(type = com.liferay.portlet.social.service.SocialActivitySettingService.class)
873            protected com.liferay.portlet.social.service.SocialActivitySettingService socialActivitySettingService;
874            @BeanReference(type = SocialActivitySettingPersistence.class)
875            protected SocialActivitySettingPersistence socialActivitySettingPersistence;
876            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
877            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
878            private String _beanIdentifier;
879    }