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