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