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