001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.social.service.base;
016    
017    import com.liferay.counter.service.CounterLocalService;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024    import com.liferay.portal.kernel.exception.PortalException;
025    import com.liferay.portal.kernel.exception.SystemException;
026    import com.liferay.portal.kernel.log.Log;
027    import com.liferay.portal.kernel.log.LogFactoryUtil;
028    import com.liferay.portal.kernel.search.Indexer;
029    import com.liferay.portal.kernel.search.IndexerRegistryUtil;
030    import com.liferay.portal.kernel.search.SearchException;
031    import com.liferay.portal.kernel.util.OrderByComparator;
032    import com.liferay.portal.model.PersistedModel;
033    import com.liferay.portal.service.GroupLocalService;
034    import com.liferay.portal.service.GroupService;
035    import com.liferay.portal.service.LockLocalService;
036    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
037    import com.liferay.portal.service.ResourceLocalService;
038    import com.liferay.portal.service.ResourceService;
039    import com.liferay.portal.service.UserLocalService;
040    import com.liferay.portal.service.UserService;
041    import com.liferay.portal.service.persistence.GroupFinder;
042    import com.liferay.portal.service.persistence.GroupPersistence;
043    import com.liferay.portal.service.persistence.LockFinder;
044    import com.liferay.portal.service.persistence.LockPersistence;
045    import com.liferay.portal.service.persistence.ResourceFinder;
046    import com.liferay.portal.service.persistence.ResourcePersistence;
047    import com.liferay.portal.service.persistence.UserFinder;
048    import com.liferay.portal.service.persistence.UserPersistence;
049    
050    import com.liferay.portlet.asset.service.AssetEntryLocalService;
051    import com.liferay.portlet.asset.service.AssetEntryService;
052    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
053    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
054    import com.liferay.portlet.social.model.SocialActivityCounter;
055    import com.liferay.portlet.social.service.SocialActivityAchievementLocalService;
056    import com.liferay.portlet.social.service.SocialActivityCounterLocalService;
057    import com.liferay.portlet.social.service.SocialActivityInterpreterLocalService;
058    import com.liferay.portlet.social.service.SocialActivityLimitLocalService;
059    import com.liferay.portlet.social.service.SocialActivityLocalService;
060    import com.liferay.portlet.social.service.SocialActivitySettingLocalService;
061    import com.liferay.portlet.social.service.SocialActivitySettingService;
062    import com.liferay.portlet.social.service.SocialRelationLocalService;
063    import com.liferay.portlet.social.service.SocialRequestInterpreterLocalService;
064    import com.liferay.portlet.social.service.SocialRequestLocalService;
065    import com.liferay.portlet.social.service.persistence.SocialActivityAchievementPersistence;
066    import com.liferay.portlet.social.service.persistence.SocialActivityCounterFinder;
067    import com.liferay.portlet.social.service.persistence.SocialActivityCounterPersistence;
068    import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
069    import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence;
070    import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
071    import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence;
072    import com.liferay.portlet.social.service.persistence.SocialRelationPersistence;
073    import com.liferay.portlet.social.service.persistence.SocialRequestPersistence;
074    
075    import java.io.Serializable;
076    
077    import java.util.List;
078    
079    import javax.sql.DataSource;
080    
081    /**
082     * The base implementation of the social activity counter local service.
083     *
084     * <p>
085     * 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}.
086     * </p>
087     *
088     * @author Brian Wing Shun Chan
089     * @see com.liferay.portlet.social.service.impl.SocialActivityCounterLocalServiceImpl
090     * @see com.liferay.portlet.social.service.SocialActivityCounterLocalServiceUtil
091     * @generated
092     */
093    public abstract class SocialActivityCounterLocalServiceBaseImpl
094            implements SocialActivityCounterLocalService, IdentifiableBean {
095            /*
096             * NOTE FOR DEVELOPERS:
097             *
098             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.social.service.SocialActivityCounterLocalServiceUtil} to access the social activity counter local service.
099             */
100    
101            /**
102             * Adds the social activity counter to the database. Also notifies the appropriate model listeners.
103             *
104             * @param socialActivityCounter the social activity counter
105             * @return the social activity counter that was added
106             * @throws SystemException if a system exception occurred
107             */
108            public SocialActivityCounter addSocialActivityCounter(
109                    SocialActivityCounter socialActivityCounter) throws SystemException {
110                    socialActivityCounter.setNew(true);
111    
112                    socialActivityCounter = socialActivityCounterPersistence.update(socialActivityCounter,
113                                    false);
114    
115                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
116    
117                    if (indexer != null) {
118                            try {
119                                    indexer.reindex(socialActivityCounter);
120                            }
121                            catch (SearchException se) {
122                                    if (_log.isWarnEnabled()) {
123                                            _log.warn(se, se);
124                                    }
125                            }
126                    }
127    
128                    return socialActivityCounter;
129            }
130    
131            /**
132             * Creates a new social activity counter with the primary key. Does not add the social activity counter to the database.
133             *
134             * @param activityCounterId the primary key for the new social activity counter
135             * @return the new social activity counter
136             */
137            public SocialActivityCounter createSocialActivityCounter(
138                    long activityCounterId) {
139                    return socialActivityCounterPersistence.create(activityCounterId);
140            }
141    
142            /**
143             * Deletes the social activity counter with the primary key from the database. Also notifies the appropriate model listeners.
144             *
145             * @param activityCounterId the primary key of the social activity counter
146             * @throws PortalException if a social activity counter with the primary key could not be found
147             * @throws SystemException if a system exception occurred
148             */
149            public void deleteSocialActivityCounter(long activityCounterId)
150                    throws PortalException, SystemException {
151                    SocialActivityCounter socialActivityCounter = socialActivityCounterPersistence.remove(activityCounterId);
152    
153                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
154    
155                    if (indexer != null) {
156                            try {
157                                    indexer.delete(socialActivityCounter);
158                            }
159                            catch (SearchException se) {
160                                    if (_log.isWarnEnabled()) {
161                                            _log.warn(se, se);
162                                    }
163                            }
164                    }
165            }
166    
167            /**
168             * Deletes the social activity counter from the database. Also notifies the appropriate model listeners.
169             *
170             * @param socialActivityCounter the social activity counter
171             * @throws SystemException if a system exception occurred
172             */
173            public void deleteSocialActivityCounter(
174                    SocialActivityCounter socialActivityCounter) throws SystemException {
175                    socialActivityCounterPersistence.remove(socialActivityCounter);
176    
177                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
178    
179                    if (indexer != null) {
180                            try {
181                                    indexer.delete(socialActivityCounter);
182                            }
183                            catch (SearchException se) {
184                                    if (_log.isWarnEnabled()) {
185                                            _log.warn(se, se);
186                                    }
187                            }
188                    }
189            }
190    
191            /**
192             * Performs a dynamic query on the database and returns the matching rows.
193             *
194             * @param dynamicQuery the dynamic query
195             * @return the matching rows
196             * @throws SystemException if a system exception occurred
197             */
198            @SuppressWarnings("rawtypes")
199            public List dynamicQuery(DynamicQuery dynamicQuery)
200                    throws SystemException {
201                    return socialActivityCounterPersistence.findWithDynamicQuery(dynamicQuery);
202            }
203    
204            /**
205             * Performs a dynamic query on the database and returns a range of the matching rows.
206             *
207             * <p>
208             * 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.
209             * </p>
210             *
211             * @param dynamicQuery the dynamic query
212             * @param start the lower bound of the range of model instances
213             * @param end the upper bound of the range of model instances (not inclusive)
214             * @return the range of matching rows
215             * @throws SystemException if a system exception occurred
216             */
217            @SuppressWarnings("rawtypes")
218            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
219                    throws SystemException {
220                    return socialActivityCounterPersistence.findWithDynamicQuery(dynamicQuery,
221                            start, end);
222            }
223    
224            /**
225             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
226             *
227             * <p>
228             * 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.
229             * </p>
230             *
231             * @param dynamicQuery the dynamic query
232             * @param start the lower bound of the range of model instances
233             * @param end the upper bound of the range of model instances (not inclusive)
234             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
235             * @return the ordered range of matching rows
236             * @throws SystemException if a system exception occurred
237             */
238            @SuppressWarnings("rawtypes")
239            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
240                    OrderByComparator orderByComparator) throws SystemException {
241                    return socialActivityCounterPersistence.findWithDynamicQuery(dynamicQuery,
242                            start, end, orderByComparator);
243            }
244    
245            /**
246             * Returns the number of rows that match the dynamic query.
247             *
248             * @param dynamicQuery the dynamic query
249             * @return the number of rows that match the dynamic query
250             * @throws SystemException if a system exception occurred
251             */
252            public long dynamicQueryCount(DynamicQuery dynamicQuery)
253                    throws SystemException {
254                    return socialActivityCounterPersistence.countWithDynamicQuery(dynamicQuery);
255            }
256    
257            public SocialActivityCounter fetchSocialActivityCounter(
258                    long activityCounterId) throws SystemException {
259                    return socialActivityCounterPersistence.fetchByPrimaryKey(activityCounterId);
260            }
261    
262            /**
263             * Returns the social activity counter with the primary key.
264             *
265             * @param activityCounterId the primary key of the social activity counter
266             * @return the social activity counter
267             * @throws PortalException if a social activity counter with the primary key could not be found
268             * @throws SystemException if a system exception occurred
269             */
270            public SocialActivityCounter getSocialActivityCounter(
271                    long activityCounterId) throws PortalException, SystemException {
272                    return socialActivityCounterPersistence.findByPrimaryKey(activityCounterId);
273            }
274    
275            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
276                    throws PortalException, SystemException {
277                    return socialActivityCounterPersistence.findByPrimaryKey(primaryKeyObj);
278            }
279    
280            /**
281             * Returns a range of all the social activity counters.
282             *
283             * <p>
284             * 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.
285             * </p>
286             *
287             * @param start the lower bound of the range of social activity counters
288             * @param end the upper bound of the range of social activity counters (not inclusive)
289             * @return the range of social activity counters
290             * @throws SystemException if a system exception occurred
291             */
292            public List<SocialActivityCounter> getSocialActivityCounters(int start,
293                    int end) throws SystemException {
294                    return socialActivityCounterPersistence.findAll(start, end);
295            }
296    
297            /**
298             * Returns the number of social activity counters.
299             *
300             * @return the number of social activity counters
301             * @throws SystemException if a system exception occurred
302             */
303            public int getSocialActivityCountersCount() throws SystemException {
304                    return socialActivityCounterPersistence.countAll();
305            }
306    
307            /**
308             * Updates the social activity counter in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
309             *
310             * @param socialActivityCounter the social activity counter
311             * @return the social activity counter that was updated
312             * @throws SystemException if a system exception occurred
313             */
314            public SocialActivityCounter updateSocialActivityCounter(
315                    SocialActivityCounter socialActivityCounter) throws SystemException {
316                    return updateSocialActivityCounter(socialActivityCounter, true);
317            }
318    
319            /**
320             * Updates the social activity counter in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
321             *
322             * @param socialActivityCounter the social activity counter
323             * @param merge whether to merge the social activity counter with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
324             * @return the social activity counter that was updated
325             * @throws SystemException if a system exception occurred
326             */
327            public SocialActivityCounter updateSocialActivityCounter(
328                    SocialActivityCounter socialActivityCounter, boolean merge)
329                    throws SystemException {
330                    socialActivityCounter.setNew(false);
331    
332                    socialActivityCounter = socialActivityCounterPersistence.update(socialActivityCounter,
333                                    merge);
334    
335                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
336    
337                    if (indexer != null) {
338                            try {
339                                    indexer.reindex(socialActivityCounter);
340                            }
341                            catch (SearchException se) {
342                                    if (_log.isWarnEnabled()) {
343                                            _log.warn(se, se);
344                                    }
345                            }
346                    }
347    
348                    return socialActivityCounter;
349            }
350    
351            /**
352             * Returns the social activity local service.
353             *
354             * @return the social activity local service
355             */
356            public SocialActivityLocalService getSocialActivityLocalService() {
357                    return socialActivityLocalService;
358            }
359    
360            /**
361             * Sets the social activity local service.
362             *
363             * @param socialActivityLocalService the social activity local service
364             */
365            public void setSocialActivityLocalService(
366                    SocialActivityLocalService socialActivityLocalService) {
367                    this.socialActivityLocalService = socialActivityLocalService;
368            }
369    
370            /**
371             * Returns the social activity persistence.
372             *
373             * @return the social activity persistence
374             */
375            public SocialActivityPersistence getSocialActivityPersistence() {
376                    return socialActivityPersistence;
377            }
378    
379            /**
380             * Sets the social activity persistence.
381             *
382             * @param socialActivityPersistence the social activity persistence
383             */
384            public void setSocialActivityPersistence(
385                    SocialActivityPersistence socialActivityPersistence) {
386                    this.socialActivityPersistence = socialActivityPersistence;
387            }
388    
389            /**
390             * Returns the social activity finder.
391             *
392             * @return the social activity finder
393             */
394            public SocialActivityFinder getSocialActivityFinder() {
395                    return socialActivityFinder;
396            }
397    
398            /**
399             * Sets the social activity finder.
400             *
401             * @param socialActivityFinder the social activity finder
402             */
403            public void setSocialActivityFinder(
404                    SocialActivityFinder socialActivityFinder) {
405                    this.socialActivityFinder = socialActivityFinder;
406            }
407    
408            /**
409             * Returns the social activity achievement local service.
410             *
411             * @return the social activity achievement local service
412             */
413            public SocialActivityAchievementLocalService getSocialActivityAchievementLocalService() {
414                    return socialActivityAchievementLocalService;
415            }
416    
417            /**
418             * Sets the social activity achievement local service.
419             *
420             * @param socialActivityAchievementLocalService the social activity achievement local service
421             */
422            public void setSocialActivityAchievementLocalService(
423                    SocialActivityAchievementLocalService socialActivityAchievementLocalService) {
424                    this.socialActivityAchievementLocalService = socialActivityAchievementLocalService;
425            }
426    
427            /**
428             * Returns the social activity achievement persistence.
429             *
430             * @return the social activity achievement persistence
431             */
432            public SocialActivityAchievementPersistence getSocialActivityAchievementPersistence() {
433                    return socialActivityAchievementPersistence;
434            }
435    
436            /**
437             * Sets the social activity achievement persistence.
438             *
439             * @param socialActivityAchievementPersistence the social activity achievement persistence
440             */
441            public void setSocialActivityAchievementPersistence(
442                    SocialActivityAchievementPersistence socialActivityAchievementPersistence) {
443                    this.socialActivityAchievementPersistence = socialActivityAchievementPersistence;
444            }
445    
446            /**
447             * Returns the social activity counter local service.
448             *
449             * @return the social activity counter local service
450             */
451            public SocialActivityCounterLocalService getSocialActivityCounterLocalService() {
452                    return socialActivityCounterLocalService;
453            }
454    
455            /**
456             * Sets the social activity counter local service.
457             *
458             * @param socialActivityCounterLocalService the social activity counter local service
459             */
460            public void setSocialActivityCounterLocalService(
461                    SocialActivityCounterLocalService socialActivityCounterLocalService) {
462                    this.socialActivityCounterLocalService = socialActivityCounterLocalService;
463            }
464    
465            /**
466             * Returns the social activity counter persistence.
467             *
468             * @return the social activity counter persistence
469             */
470            public SocialActivityCounterPersistence getSocialActivityCounterPersistence() {
471                    return socialActivityCounterPersistence;
472            }
473    
474            /**
475             * Sets the social activity counter persistence.
476             *
477             * @param socialActivityCounterPersistence the social activity counter persistence
478             */
479            public void setSocialActivityCounterPersistence(
480                    SocialActivityCounterPersistence socialActivityCounterPersistence) {
481                    this.socialActivityCounterPersistence = socialActivityCounterPersistence;
482            }
483    
484            /**
485             * Returns the social activity counter finder.
486             *
487             * @return the social activity counter finder
488             */
489            public SocialActivityCounterFinder getSocialActivityCounterFinder() {
490                    return socialActivityCounterFinder;
491            }
492    
493            /**
494             * Sets the social activity counter finder.
495             *
496             * @param socialActivityCounterFinder the social activity counter finder
497             */
498            public void setSocialActivityCounterFinder(
499                    SocialActivityCounterFinder socialActivityCounterFinder) {
500                    this.socialActivityCounterFinder = socialActivityCounterFinder;
501            }
502    
503            /**
504             * Returns the social activity interpreter local service.
505             *
506             * @return the social activity interpreter local service
507             */
508            public SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
509                    return socialActivityInterpreterLocalService;
510            }
511    
512            /**
513             * Sets the social activity interpreter local service.
514             *
515             * @param socialActivityInterpreterLocalService the social activity interpreter local service
516             */
517            public void setSocialActivityInterpreterLocalService(
518                    SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
519                    this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
520            }
521    
522            /**
523             * Returns the social activity limit local service.
524             *
525             * @return the social activity limit local service
526             */
527            public SocialActivityLimitLocalService getSocialActivityLimitLocalService() {
528                    return socialActivityLimitLocalService;
529            }
530    
531            /**
532             * Sets the social activity limit local service.
533             *
534             * @param socialActivityLimitLocalService the social activity limit local service
535             */
536            public void setSocialActivityLimitLocalService(
537                    SocialActivityLimitLocalService socialActivityLimitLocalService) {
538                    this.socialActivityLimitLocalService = socialActivityLimitLocalService;
539            }
540    
541            /**
542             * Returns the social activity limit persistence.
543             *
544             * @return the social activity limit persistence
545             */
546            public SocialActivityLimitPersistence getSocialActivityLimitPersistence() {
547                    return socialActivityLimitPersistence;
548            }
549    
550            /**
551             * Sets the social activity limit persistence.
552             *
553             * @param socialActivityLimitPersistence the social activity limit persistence
554             */
555            public void setSocialActivityLimitPersistence(
556                    SocialActivityLimitPersistence socialActivityLimitPersistence) {
557                    this.socialActivityLimitPersistence = socialActivityLimitPersistence;
558            }
559    
560            /**
561             * Returns the social activity setting local service.
562             *
563             * @return the social activity setting local service
564             */
565            public SocialActivitySettingLocalService getSocialActivitySettingLocalService() {
566                    return socialActivitySettingLocalService;
567            }
568    
569            /**
570             * Sets the social activity setting local service.
571             *
572             * @param socialActivitySettingLocalService the social activity setting local service
573             */
574            public void setSocialActivitySettingLocalService(
575                    SocialActivitySettingLocalService socialActivitySettingLocalService) {
576                    this.socialActivitySettingLocalService = socialActivitySettingLocalService;
577            }
578    
579            /**
580             * Returns the social activity setting remote service.
581             *
582             * @return the social activity setting remote service
583             */
584            public SocialActivitySettingService getSocialActivitySettingService() {
585                    return socialActivitySettingService;
586            }
587    
588            /**
589             * Sets the social activity setting remote service.
590             *
591             * @param socialActivitySettingService the social activity setting remote service
592             */
593            public void setSocialActivitySettingService(
594                    SocialActivitySettingService socialActivitySettingService) {
595                    this.socialActivitySettingService = socialActivitySettingService;
596            }
597    
598            /**
599             * Returns the social activity setting persistence.
600             *
601             * @return the social activity setting persistence
602             */
603            public SocialActivitySettingPersistence getSocialActivitySettingPersistence() {
604                    return socialActivitySettingPersistence;
605            }
606    
607            /**
608             * Sets the social activity setting persistence.
609             *
610             * @param socialActivitySettingPersistence the social activity setting persistence
611             */
612            public void setSocialActivitySettingPersistence(
613                    SocialActivitySettingPersistence socialActivitySettingPersistence) {
614                    this.socialActivitySettingPersistence = socialActivitySettingPersistence;
615            }
616    
617            /**
618             * Returns the social relation local service.
619             *
620             * @return the social relation local service
621             */
622            public SocialRelationLocalService getSocialRelationLocalService() {
623                    return socialRelationLocalService;
624            }
625    
626            /**
627             * Sets the social relation local service.
628             *
629             * @param socialRelationLocalService the social relation local service
630             */
631            public void setSocialRelationLocalService(
632                    SocialRelationLocalService socialRelationLocalService) {
633                    this.socialRelationLocalService = socialRelationLocalService;
634            }
635    
636            /**
637             * Returns the social relation persistence.
638             *
639             * @return the social relation persistence
640             */
641            public SocialRelationPersistence getSocialRelationPersistence() {
642                    return socialRelationPersistence;
643            }
644    
645            /**
646             * Sets the social relation persistence.
647             *
648             * @param socialRelationPersistence the social relation persistence
649             */
650            public void setSocialRelationPersistence(
651                    SocialRelationPersistence socialRelationPersistence) {
652                    this.socialRelationPersistence = socialRelationPersistence;
653            }
654    
655            /**
656             * Returns the social request local service.
657             *
658             * @return the social request local service
659             */
660            public SocialRequestLocalService getSocialRequestLocalService() {
661                    return socialRequestLocalService;
662            }
663    
664            /**
665             * Sets the social request local service.
666             *
667             * @param socialRequestLocalService the social request local service
668             */
669            public void setSocialRequestLocalService(
670                    SocialRequestLocalService socialRequestLocalService) {
671                    this.socialRequestLocalService = socialRequestLocalService;
672            }
673    
674            /**
675             * Returns the social request persistence.
676             *
677             * @return the social request persistence
678             */
679            public SocialRequestPersistence getSocialRequestPersistence() {
680                    return socialRequestPersistence;
681            }
682    
683            /**
684             * Sets the social request persistence.
685             *
686             * @param socialRequestPersistence the social request persistence
687             */
688            public void setSocialRequestPersistence(
689                    SocialRequestPersistence socialRequestPersistence) {
690                    this.socialRequestPersistence = socialRequestPersistence;
691            }
692    
693            /**
694             * Returns the social request interpreter local service.
695             *
696             * @return the social request interpreter local service
697             */
698            public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
699                    return socialRequestInterpreterLocalService;
700            }
701    
702            /**
703             * Sets the social request interpreter local service.
704             *
705             * @param socialRequestInterpreterLocalService the social request interpreter local service
706             */
707            public void setSocialRequestInterpreterLocalService(
708                    SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
709                    this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
710            }
711    
712            /**
713             * Returns the counter local service.
714             *
715             * @return the counter local service
716             */
717            public CounterLocalService getCounterLocalService() {
718                    return counterLocalService;
719            }
720    
721            /**
722             * Sets the counter local service.
723             *
724             * @param counterLocalService the counter local service
725             */
726            public void setCounterLocalService(CounterLocalService counterLocalService) {
727                    this.counterLocalService = counterLocalService;
728            }
729    
730            /**
731             * Returns the group local service.
732             *
733             * @return the group local service
734             */
735            public GroupLocalService getGroupLocalService() {
736                    return groupLocalService;
737            }
738    
739            /**
740             * Sets the group local service.
741             *
742             * @param groupLocalService the group local service
743             */
744            public void setGroupLocalService(GroupLocalService groupLocalService) {
745                    this.groupLocalService = groupLocalService;
746            }
747    
748            /**
749             * Returns the group remote service.
750             *
751             * @return the group remote service
752             */
753            public GroupService getGroupService() {
754                    return groupService;
755            }
756    
757            /**
758             * Sets the group remote service.
759             *
760             * @param groupService the group remote service
761             */
762            public void setGroupService(GroupService groupService) {
763                    this.groupService = groupService;
764            }
765    
766            /**
767             * Returns the group persistence.
768             *
769             * @return the group persistence
770             */
771            public GroupPersistence getGroupPersistence() {
772                    return groupPersistence;
773            }
774    
775            /**
776             * Sets the group persistence.
777             *
778             * @param groupPersistence the group persistence
779             */
780            public void setGroupPersistence(GroupPersistence groupPersistence) {
781                    this.groupPersistence = groupPersistence;
782            }
783    
784            /**
785             * Returns the group finder.
786             *
787             * @return the group finder
788             */
789            public GroupFinder getGroupFinder() {
790                    return groupFinder;
791            }
792    
793            /**
794             * Sets the group finder.
795             *
796             * @param groupFinder the group finder
797             */
798            public void setGroupFinder(GroupFinder groupFinder) {
799                    this.groupFinder = groupFinder;
800            }
801    
802            /**
803             * Returns the lock local service.
804             *
805             * @return the lock local service
806             */
807            public LockLocalService getLockLocalService() {
808                    return lockLocalService;
809            }
810    
811            /**
812             * Sets the lock local service.
813             *
814             * @param lockLocalService the lock local service
815             */
816            public void setLockLocalService(LockLocalService lockLocalService) {
817                    this.lockLocalService = lockLocalService;
818            }
819    
820            /**
821             * Returns the lock persistence.
822             *
823             * @return the lock persistence
824             */
825            public LockPersistence getLockPersistence() {
826                    return lockPersistence;
827            }
828    
829            /**
830             * Sets the lock persistence.
831             *
832             * @param lockPersistence the lock persistence
833             */
834            public void setLockPersistence(LockPersistence lockPersistence) {
835                    this.lockPersistence = lockPersistence;
836            }
837    
838            /**
839             * Returns the lock finder.
840             *
841             * @return the lock finder
842             */
843            public LockFinder getLockFinder() {
844                    return lockFinder;
845            }
846    
847            /**
848             * Sets the lock finder.
849             *
850             * @param lockFinder the lock finder
851             */
852            public void setLockFinder(LockFinder lockFinder) {
853                    this.lockFinder = lockFinder;
854            }
855    
856            /**
857             * Returns the resource local service.
858             *
859             * @return the resource local service
860             */
861            public ResourceLocalService getResourceLocalService() {
862                    return resourceLocalService;
863            }
864    
865            /**
866             * Sets the resource local service.
867             *
868             * @param resourceLocalService the resource local service
869             */
870            public void setResourceLocalService(
871                    ResourceLocalService resourceLocalService) {
872                    this.resourceLocalService = resourceLocalService;
873            }
874    
875            /**
876             * Returns the resource remote service.
877             *
878             * @return the resource remote service
879             */
880            public ResourceService getResourceService() {
881                    return resourceService;
882            }
883    
884            /**
885             * Sets the resource remote service.
886             *
887             * @param resourceService the resource remote service
888             */
889            public void setResourceService(ResourceService resourceService) {
890                    this.resourceService = resourceService;
891            }
892    
893            /**
894             * Returns the resource persistence.
895             *
896             * @return the resource persistence
897             */
898            public ResourcePersistence getResourcePersistence() {
899                    return resourcePersistence;
900            }
901    
902            /**
903             * Sets the resource persistence.
904             *
905             * @param resourcePersistence the resource persistence
906             */
907            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
908                    this.resourcePersistence = resourcePersistence;
909            }
910    
911            /**
912             * Returns the resource finder.
913             *
914             * @return the resource finder
915             */
916            public ResourceFinder getResourceFinder() {
917                    return resourceFinder;
918            }
919    
920            /**
921             * Sets the resource finder.
922             *
923             * @param resourceFinder the resource finder
924             */
925            public void setResourceFinder(ResourceFinder resourceFinder) {
926                    this.resourceFinder = resourceFinder;
927            }
928    
929            /**
930             * Returns the user local service.
931             *
932             * @return the user local service
933             */
934            public UserLocalService getUserLocalService() {
935                    return userLocalService;
936            }
937    
938            /**
939             * Sets the user local service.
940             *
941             * @param userLocalService the user local service
942             */
943            public void setUserLocalService(UserLocalService userLocalService) {
944                    this.userLocalService = userLocalService;
945            }
946    
947            /**
948             * Returns the user remote service.
949             *
950             * @return the user remote service
951             */
952            public UserService getUserService() {
953                    return userService;
954            }
955    
956            /**
957             * Sets the user remote service.
958             *
959             * @param userService the user remote service
960             */
961            public void setUserService(UserService userService) {
962                    this.userService = userService;
963            }
964    
965            /**
966             * Returns the user persistence.
967             *
968             * @return the user persistence
969             */
970            public UserPersistence getUserPersistence() {
971                    return userPersistence;
972            }
973    
974            /**
975             * Sets the user persistence.
976             *
977             * @param userPersistence the user persistence
978             */
979            public void setUserPersistence(UserPersistence userPersistence) {
980                    this.userPersistence = userPersistence;
981            }
982    
983            /**
984             * Returns the user finder.
985             *
986             * @return the user finder
987             */
988            public UserFinder getUserFinder() {
989                    return userFinder;
990            }
991    
992            /**
993             * Sets the user finder.
994             *
995             * @param userFinder the user finder
996             */
997            public void setUserFinder(UserFinder userFinder) {
998                    this.userFinder = userFinder;
999            }
1000    
1001            /**
1002             * Returns the asset entry local service.
1003             *
1004             * @return the asset entry local service
1005             */
1006            public AssetEntryLocalService getAssetEntryLocalService() {
1007                    return assetEntryLocalService;
1008            }
1009    
1010            /**
1011             * Sets the asset entry local service.
1012             *
1013             * @param assetEntryLocalService the asset entry local service
1014             */
1015            public void setAssetEntryLocalService(
1016                    AssetEntryLocalService assetEntryLocalService) {
1017                    this.assetEntryLocalService = assetEntryLocalService;
1018            }
1019    
1020            /**
1021             * Returns the asset entry remote service.
1022             *
1023             * @return the asset entry remote service
1024             */
1025            public AssetEntryService getAssetEntryService() {
1026                    return assetEntryService;
1027            }
1028    
1029            /**
1030             * Sets the asset entry remote service.
1031             *
1032             * @param assetEntryService the asset entry remote service
1033             */
1034            public void setAssetEntryService(AssetEntryService assetEntryService) {
1035                    this.assetEntryService = assetEntryService;
1036            }
1037    
1038            /**
1039             * Returns the asset entry persistence.
1040             *
1041             * @return the asset entry persistence
1042             */
1043            public AssetEntryPersistence getAssetEntryPersistence() {
1044                    return assetEntryPersistence;
1045            }
1046    
1047            /**
1048             * Sets the asset entry persistence.
1049             *
1050             * @param assetEntryPersistence the asset entry persistence
1051             */
1052            public void setAssetEntryPersistence(
1053                    AssetEntryPersistence assetEntryPersistence) {
1054                    this.assetEntryPersistence = assetEntryPersistence;
1055            }
1056    
1057            /**
1058             * Returns the asset entry finder.
1059             *
1060             * @return the asset entry finder
1061             */
1062            public AssetEntryFinder getAssetEntryFinder() {
1063                    return assetEntryFinder;
1064            }
1065    
1066            /**
1067             * Sets the asset entry finder.
1068             *
1069             * @param assetEntryFinder the asset entry finder
1070             */
1071            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
1072                    this.assetEntryFinder = assetEntryFinder;
1073            }
1074    
1075            public void afterPropertiesSet() {
1076                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.social.model.SocialActivityCounter",
1077                            socialActivityCounterLocalService);
1078            }
1079    
1080            public void destroy() {
1081                    persistedModelLocalServiceRegistry.unregister(
1082                            "com.liferay.portlet.social.model.SocialActivityCounter");
1083            }
1084    
1085            /**
1086             * Returns the Spring bean ID for this bean.
1087             *
1088             * @return the Spring bean ID for this bean
1089             */
1090            public String getBeanIdentifier() {
1091                    return _beanIdentifier;
1092            }
1093    
1094            /**
1095             * Sets the Spring bean ID for this bean.
1096             *
1097             * @param beanIdentifier the Spring bean ID for this bean
1098             */
1099            public void setBeanIdentifier(String beanIdentifier) {
1100                    _beanIdentifier = beanIdentifier;
1101            }
1102    
1103            protected ClassLoader getClassLoader() {
1104                    Class<?> clazz = getClass();
1105    
1106                    return clazz.getClassLoader();
1107            }
1108    
1109            protected Class<?> getModelClass() {
1110                    return SocialActivityCounter.class;
1111            }
1112    
1113            protected String getModelClassName() {
1114                    return SocialActivityCounter.class.getName();
1115            }
1116    
1117            /**
1118             * Performs an SQL query.
1119             *
1120             * @param sql the sql query
1121             */
1122            protected void runSQL(String sql) throws SystemException {
1123                    try {
1124                            DataSource dataSource = socialActivityCounterPersistence.getDataSource();
1125    
1126                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1127                                            sql, new int[0]);
1128    
1129                            sqlUpdate.update();
1130                    }
1131                    catch (Exception e) {
1132                            throw new SystemException(e);
1133                    }
1134            }
1135    
1136            @BeanReference(type = SocialActivityLocalService.class)
1137            protected SocialActivityLocalService socialActivityLocalService;
1138            @BeanReference(type = SocialActivityPersistence.class)
1139            protected SocialActivityPersistence socialActivityPersistence;
1140            @BeanReference(type = SocialActivityFinder.class)
1141            protected SocialActivityFinder socialActivityFinder;
1142            @BeanReference(type = SocialActivityAchievementLocalService.class)
1143            protected SocialActivityAchievementLocalService socialActivityAchievementLocalService;
1144            @BeanReference(type = SocialActivityAchievementPersistence.class)
1145            protected SocialActivityAchievementPersistence socialActivityAchievementPersistence;
1146            @BeanReference(type = SocialActivityCounterLocalService.class)
1147            protected SocialActivityCounterLocalService socialActivityCounterLocalService;
1148            @BeanReference(type = SocialActivityCounterPersistence.class)
1149            protected SocialActivityCounterPersistence socialActivityCounterPersistence;
1150            @BeanReference(type = SocialActivityCounterFinder.class)
1151            protected SocialActivityCounterFinder socialActivityCounterFinder;
1152            @BeanReference(type = SocialActivityInterpreterLocalService.class)
1153            protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
1154            @BeanReference(type = SocialActivityLimitLocalService.class)
1155            protected SocialActivityLimitLocalService socialActivityLimitLocalService;
1156            @BeanReference(type = SocialActivityLimitPersistence.class)
1157            protected SocialActivityLimitPersistence socialActivityLimitPersistence;
1158            @BeanReference(type = SocialActivitySettingLocalService.class)
1159            protected SocialActivitySettingLocalService socialActivitySettingLocalService;
1160            @BeanReference(type = SocialActivitySettingService.class)
1161            protected SocialActivitySettingService socialActivitySettingService;
1162            @BeanReference(type = SocialActivitySettingPersistence.class)
1163            protected SocialActivitySettingPersistence socialActivitySettingPersistence;
1164            @BeanReference(type = SocialRelationLocalService.class)
1165            protected SocialRelationLocalService socialRelationLocalService;
1166            @BeanReference(type = SocialRelationPersistence.class)
1167            protected SocialRelationPersistence socialRelationPersistence;
1168            @BeanReference(type = SocialRequestLocalService.class)
1169            protected SocialRequestLocalService socialRequestLocalService;
1170            @BeanReference(type = SocialRequestPersistence.class)
1171            protected SocialRequestPersistence socialRequestPersistence;
1172            @BeanReference(type = SocialRequestInterpreterLocalService.class)
1173            protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
1174            @BeanReference(type = CounterLocalService.class)
1175            protected CounterLocalService counterLocalService;
1176            @BeanReference(type = GroupLocalService.class)
1177            protected GroupLocalService groupLocalService;
1178            @BeanReference(type = GroupService.class)
1179            protected GroupService groupService;
1180            @BeanReference(type = GroupPersistence.class)
1181            protected GroupPersistence groupPersistence;
1182            @BeanReference(type = GroupFinder.class)
1183            protected GroupFinder groupFinder;
1184            @BeanReference(type = LockLocalService.class)
1185            protected LockLocalService lockLocalService;
1186            @BeanReference(type = LockPersistence.class)
1187            protected LockPersistence lockPersistence;
1188            @BeanReference(type = LockFinder.class)
1189            protected LockFinder lockFinder;
1190            @BeanReference(type = ResourceLocalService.class)
1191            protected ResourceLocalService resourceLocalService;
1192            @BeanReference(type = ResourceService.class)
1193            protected ResourceService resourceService;
1194            @BeanReference(type = ResourcePersistence.class)
1195            protected ResourcePersistence resourcePersistence;
1196            @BeanReference(type = ResourceFinder.class)
1197            protected ResourceFinder resourceFinder;
1198            @BeanReference(type = UserLocalService.class)
1199            protected UserLocalService userLocalService;
1200            @BeanReference(type = UserService.class)
1201            protected UserService userService;
1202            @BeanReference(type = UserPersistence.class)
1203            protected UserPersistence userPersistence;
1204            @BeanReference(type = UserFinder.class)
1205            protected UserFinder userFinder;
1206            @BeanReference(type = AssetEntryLocalService.class)
1207            protected AssetEntryLocalService assetEntryLocalService;
1208            @BeanReference(type = AssetEntryService.class)
1209            protected AssetEntryService assetEntryService;
1210            @BeanReference(type = AssetEntryPersistence.class)
1211            protected AssetEntryPersistence assetEntryPersistence;
1212            @BeanReference(type = AssetEntryFinder.class)
1213            protected AssetEntryFinder assetEntryFinder;
1214            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1215            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1216            private static Log _log = LogFactoryUtil.getLog(SocialActivityCounterLocalServiceBaseImpl.class);
1217            private String _beanIdentifier;
1218    }