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.LayoutLocalService;
036    import com.liferay.portal.service.LayoutService;
037    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
038    import com.liferay.portal.service.ResourceLocalService;
039    import com.liferay.portal.service.ResourceService;
040    import com.liferay.portal.service.UserLocalService;
041    import com.liferay.portal.service.UserService;
042    import com.liferay.portal.service.persistence.GroupFinder;
043    import com.liferay.portal.service.persistence.GroupPersistence;
044    import com.liferay.portal.service.persistence.LayoutFinder;
045    import com.liferay.portal.service.persistence.LayoutPersistence;
046    import com.liferay.portal.service.persistence.ResourceFinder;
047    import com.liferay.portal.service.persistence.ResourcePersistence;
048    import com.liferay.portal.service.persistence.UserFinder;
049    import com.liferay.portal.service.persistence.UserPersistence;
050    
051    import com.liferay.portlet.asset.service.AssetEntryLocalService;
052    import com.liferay.portlet.asset.service.AssetEntryService;
053    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
054    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
055    import com.liferay.portlet.social.model.SocialActivity;
056    import com.liferay.portlet.social.service.SocialActivityAchievementLocalService;
057    import com.liferay.portlet.social.service.SocialActivityCounterLocalService;
058    import com.liferay.portlet.social.service.SocialActivityInterpreterLocalService;
059    import com.liferay.portlet.social.service.SocialActivityLimitLocalService;
060    import com.liferay.portlet.social.service.SocialActivityLocalService;
061    import com.liferay.portlet.social.service.SocialActivitySettingLocalService;
062    import com.liferay.portlet.social.service.SocialActivitySettingService;
063    import com.liferay.portlet.social.service.SocialRelationLocalService;
064    import com.liferay.portlet.social.service.SocialRequestInterpreterLocalService;
065    import com.liferay.portlet.social.service.SocialRequestLocalService;
066    import com.liferay.portlet.social.service.persistence.SocialActivityAchievementPersistence;
067    import com.liferay.portlet.social.service.persistence.SocialActivityCounterFinder;
068    import com.liferay.portlet.social.service.persistence.SocialActivityCounterPersistence;
069    import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
070    import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence;
071    import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
072    import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence;
073    import com.liferay.portlet.social.service.persistence.SocialRelationPersistence;
074    import com.liferay.portlet.social.service.persistence.SocialRequestPersistence;
075    
076    import java.io.Serializable;
077    
078    import java.util.List;
079    
080    import javax.sql.DataSource;
081    
082    /**
083     * The base implementation of the social activity local service.
084     *
085     * <p>
086     * 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.SocialActivityLocalServiceImpl}.
087     * </p>
088     *
089     * @author Brian Wing Shun Chan
090     * @see com.liferay.portlet.social.service.impl.SocialActivityLocalServiceImpl
091     * @see com.liferay.portlet.social.service.SocialActivityLocalServiceUtil
092     * @generated
093     */
094    public abstract class SocialActivityLocalServiceBaseImpl
095            implements SocialActivityLocalService, IdentifiableBean {
096            /*
097             * NOTE FOR DEVELOPERS:
098             *
099             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.social.service.SocialActivityLocalServiceUtil} to access the social activity local service.
100             */
101    
102            /**
103             * Adds the social activity to the database. Also notifies the appropriate model listeners.
104             *
105             * @param socialActivity the social activity
106             * @return the social activity that was added
107             * @throws SystemException if a system exception occurred
108             */
109            public SocialActivity addSocialActivity(SocialActivity socialActivity)
110                    throws SystemException {
111                    socialActivity.setNew(true);
112    
113                    socialActivity = socialActivityPersistence.update(socialActivity, false);
114    
115                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
116    
117                    if (indexer != null) {
118                            try {
119                                    indexer.reindex(socialActivity);
120                            }
121                            catch (SearchException se) {
122                                    if (_log.isWarnEnabled()) {
123                                            _log.warn(se, se);
124                                    }
125                            }
126                    }
127    
128                    return socialActivity;
129            }
130    
131            /**
132             * Creates a new social activity with the primary key. Does not add the social activity to the database.
133             *
134             * @param activityId the primary key for the new social activity
135             * @return the new social activity
136             */
137            public SocialActivity createSocialActivity(long activityId) {
138                    return socialActivityPersistence.create(activityId);
139            }
140    
141            /**
142             * Deletes the social activity with the primary key from the database. Also notifies the appropriate model listeners.
143             *
144             * @param activityId the primary key of the social activity
145             * @throws PortalException if a social activity with the primary key could not be found
146             * @throws SystemException if a system exception occurred
147             */
148            public void deleteSocialActivity(long activityId)
149                    throws PortalException, SystemException {
150                    SocialActivity socialActivity = socialActivityPersistence.remove(activityId);
151    
152                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
153    
154                    if (indexer != null) {
155                            try {
156                                    indexer.delete(socialActivity);
157                            }
158                            catch (SearchException se) {
159                                    if (_log.isWarnEnabled()) {
160                                            _log.warn(se, se);
161                                    }
162                            }
163                    }
164            }
165    
166            /**
167             * Deletes the social activity from the database. Also notifies the appropriate model listeners.
168             *
169             * @param socialActivity the social activity
170             * @throws SystemException if a system exception occurred
171             */
172            public void deleteSocialActivity(SocialActivity socialActivity)
173                    throws SystemException {
174                    socialActivityPersistence.remove(socialActivity);
175    
176                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
177    
178                    if (indexer != null) {
179                            try {
180                                    indexer.delete(socialActivity);
181                            }
182                            catch (SearchException se) {
183                                    if (_log.isWarnEnabled()) {
184                                            _log.warn(se, se);
185                                    }
186                            }
187                    }
188            }
189    
190            /**
191             * Performs a dynamic query on the database and returns the matching rows.
192             *
193             * @param dynamicQuery the dynamic query
194             * @return the matching rows
195             * @throws SystemException if a system exception occurred
196             */
197            @SuppressWarnings("rawtypes")
198            public List dynamicQuery(DynamicQuery dynamicQuery)
199                    throws SystemException {
200                    return socialActivityPersistence.findWithDynamicQuery(dynamicQuery);
201            }
202    
203            /**
204             * Performs a dynamic query on the database and returns a range of the matching rows.
205             *
206             * <p>
207             * 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.
208             * </p>
209             *
210             * @param dynamicQuery the dynamic query
211             * @param start the lower bound of the range of model instances
212             * @param end the upper bound of the range of model instances (not inclusive)
213             * @return the range of matching rows
214             * @throws SystemException if a system exception occurred
215             */
216            @SuppressWarnings("rawtypes")
217            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
218                    throws SystemException {
219                    return socialActivityPersistence.findWithDynamicQuery(dynamicQuery,
220                            start, end);
221            }
222    
223            /**
224             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
225             *
226             * <p>
227             * 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.
228             * </p>
229             *
230             * @param dynamicQuery the dynamic query
231             * @param start the lower bound of the range of model instances
232             * @param end the upper bound of the range of model instances (not inclusive)
233             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
234             * @return the ordered range of matching rows
235             * @throws SystemException if a system exception occurred
236             */
237            @SuppressWarnings("rawtypes")
238            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
239                    OrderByComparator orderByComparator) throws SystemException {
240                    return socialActivityPersistence.findWithDynamicQuery(dynamicQuery,
241                            start, end, orderByComparator);
242            }
243    
244            /**
245             * Returns the number of rows that match the dynamic query.
246             *
247             * @param dynamicQuery the dynamic query
248             * @return the number of rows that match the dynamic query
249             * @throws SystemException if a system exception occurred
250             */
251            public long dynamicQueryCount(DynamicQuery dynamicQuery)
252                    throws SystemException {
253                    return socialActivityPersistence.countWithDynamicQuery(dynamicQuery);
254            }
255    
256            public SocialActivity fetchSocialActivity(long activityId)
257                    throws SystemException {
258                    return socialActivityPersistence.fetchByPrimaryKey(activityId);
259            }
260    
261            /**
262             * Returns the social activity with the primary key.
263             *
264             * @param activityId the primary key of the social activity
265             * @return the social activity
266             * @throws PortalException if a social activity with the primary key could not be found
267             * @throws SystemException if a system exception occurred
268             */
269            public SocialActivity getSocialActivity(long activityId)
270                    throws PortalException, SystemException {
271                    return socialActivityPersistence.findByPrimaryKey(activityId);
272            }
273    
274            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
275                    throws PortalException, SystemException {
276                    return socialActivityPersistence.findByPrimaryKey(primaryKeyObj);
277            }
278    
279            /**
280             * Returns a range of all the social activities.
281             *
282             * <p>
283             * 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.
284             * </p>
285             *
286             * @param start the lower bound of the range of social activities
287             * @param end the upper bound of the range of social activities (not inclusive)
288             * @return the range of social activities
289             * @throws SystemException if a system exception occurred
290             */
291            public List<SocialActivity> getSocialActivities(int start, int end)
292                    throws SystemException {
293                    return socialActivityPersistence.findAll(start, end);
294            }
295    
296            /**
297             * Returns the number of social activities.
298             *
299             * @return the number of social activities
300             * @throws SystemException if a system exception occurred
301             */
302            public int getSocialActivitiesCount() throws SystemException {
303                    return socialActivityPersistence.countAll();
304            }
305    
306            /**
307             * Updates the social activity in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
308             *
309             * @param socialActivity the social activity
310             * @return the social activity that was updated
311             * @throws SystemException if a system exception occurred
312             */
313            public SocialActivity updateSocialActivity(SocialActivity socialActivity)
314                    throws SystemException {
315                    return updateSocialActivity(socialActivity, true);
316            }
317    
318            /**
319             * Updates the social activity in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
320             *
321             * @param socialActivity the social activity
322             * @param merge whether to merge the social activity 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.
323             * @return the social activity that was updated
324             * @throws SystemException if a system exception occurred
325             */
326            public SocialActivity updateSocialActivity(SocialActivity socialActivity,
327                    boolean merge) throws SystemException {
328                    socialActivity.setNew(false);
329    
330                    socialActivity = socialActivityPersistence.update(socialActivity, merge);
331    
332                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
333    
334                    if (indexer != null) {
335                            try {
336                                    indexer.reindex(socialActivity);
337                            }
338                            catch (SearchException se) {
339                                    if (_log.isWarnEnabled()) {
340                                            _log.warn(se, se);
341                                    }
342                            }
343                    }
344    
345                    return socialActivity;
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 layout local service.
801             *
802             * @return the layout local service
803             */
804            public LayoutLocalService getLayoutLocalService() {
805                    return layoutLocalService;
806            }
807    
808            /**
809             * Sets the layout local service.
810             *
811             * @param layoutLocalService the layout local service
812             */
813            public void setLayoutLocalService(LayoutLocalService layoutLocalService) {
814                    this.layoutLocalService = layoutLocalService;
815            }
816    
817            /**
818             * Returns the layout remote service.
819             *
820             * @return the layout remote service
821             */
822            public LayoutService getLayoutService() {
823                    return layoutService;
824            }
825    
826            /**
827             * Sets the layout remote service.
828             *
829             * @param layoutService the layout remote service
830             */
831            public void setLayoutService(LayoutService layoutService) {
832                    this.layoutService = layoutService;
833            }
834    
835            /**
836             * Returns the layout persistence.
837             *
838             * @return the layout persistence
839             */
840            public LayoutPersistence getLayoutPersistence() {
841                    return layoutPersistence;
842            }
843    
844            /**
845             * Sets the layout persistence.
846             *
847             * @param layoutPersistence the layout persistence
848             */
849            public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
850                    this.layoutPersistence = layoutPersistence;
851            }
852    
853            /**
854             * Returns the layout finder.
855             *
856             * @return the layout finder
857             */
858            public LayoutFinder getLayoutFinder() {
859                    return layoutFinder;
860            }
861    
862            /**
863             * Sets the layout finder.
864             *
865             * @param layoutFinder the layout finder
866             */
867            public void setLayoutFinder(LayoutFinder layoutFinder) {
868                    this.layoutFinder = layoutFinder;
869            }
870    
871            /**
872             * Returns the resource local service.
873             *
874             * @return the resource local service
875             */
876            public ResourceLocalService getResourceLocalService() {
877                    return resourceLocalService;
878            }
879    
880            /**
881             * Sets the resource local service.
882             *
883             * @param resourceLocalService the resource local service
884             */
885            public void setResourceLocalService(
886                    ResourceLocalService resourceLocalService) {
887                    this.resourceLocalService = resourceLocalService;
888            }
889    
890            /**
891             * Returns the resource remote service.
892             *
893             * @return the resource remote service
894             */
895            public ResourceService getResourceService() {
896                    return resourceService;
897            }
898    
899            /**
900             * Sets the resource remote service.
901             *
902             * @param resourceService the resource remote service
903             */
904            public void setResourceService(ResourceService resourceService) {
905                    this.resourceService = resourceService;
906            }
907    
908            /**
909             * Returns the resource persistence.
910             *
911             * @return the resource persistence
912             */
913            public ResourcePersistence getResourcePersistence() {
914                    return resourcePersistence;
915            }
916    
917            /**
918             * Sets the resource persistence.
919             *
920             * @param resourcePersistence the resource persistence
921             */
922            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
923                    this.resourcePersistence = resourcePersistence;
924            }
925    
926            /**
927             * Returns the resource finder.
928             *
929             * @return the resource finder
930             */
931            public ResourceFinder getResourceFinder() {
932                    return resourceFinder;
933            }
934    
935            /**
936             * Sets the resource finder.
937             *
938             * @param resourceFinder the resource finder
939             */
940            public void setResourceFinder(ResourceFinder resourceFinder) {
941                    this.resourceFinder = resourceFinder;
942            }
943    
944            /**
945             * Returns the user local service.
946             *
947             * @return the user local service
948             */
949            public UserLocalService getUserLocalService() {
950                    return userLocalService;
951            }
952    
953            /**
954             * Sets the user local service.
955             *
956             * @param userLocalService the user local service
957             */
958            public void setUserLocalService(UserLocalService userLocalService) {
959                    this.userLocalService = userLocalService;
960            }
961    
962            /**
963             * Returns the user remote service.
964             *
965             * @return the user remote service
966             */
967            public UserService getUserService() {
968                    return userService;
969            }
970    
971            /**
972             * Sets the user remote service.
973             *
974             * @param userService the user remote service
975             */
976            public void setUserService(UserService userService) {
977                    this.userService = userService;
978            }
979    
980            /**
981             * Returns the user persistence.
982             *
983             * @return the user persistence
984             */
985            public UserPersistence getUserPersistence() {
986                    return userPersistence;
987            }
988    
989            /**
990             * Sets the user persistence.
991             *
992             * @param userPersistence the user persistence
993             */
994            public void setUserPersistence(UserPersistence userPersistence) {
995                    this.userPersistence = userPersistence;
996            }
997    
998            /**
999             * Returns the user finder.
1000             *
1001             * @return the user finder
1002             */
1003            public UserFinder getUserFinder() {
1004                    return userFinder;
1005            }
1006    
1007            /**
1008             * Sets the user finder.
1009             *
1010             * @param userFinder the user finder
1011             */
1012            public void setUserFinder(UserFinder userFinder) {
1013                    this.userFinder = userFinder;
1014            }
1015    
1016            /**
1017             * Returns the asset entry local service.
1018             *
1019             * @return the asset entry local service
1020             */
1021            public AssetEntryLocalService getAssetEntryLocalService() {
1022                    return assetEntryLocalService;
1023            }
1024    
1025            /**
1026             * Sets the asset entry local service.
1027             *
1028             * @param assetEntryLocalService the asset entry local service
1029             */
1030            public void setAssetEntryLocalService(
1031                    AssetEntryLocalService assetEntryLocalService) {
1032                    this.assetEntryLocalService = assetEntryLocalService;
1033            }
1034    
1035            /**
1036             * Returns the asset entry remote service.
1037             *
1038             * @return the asset entry remote service
1039             */
1040            public AssetEntryService getAssetEntryService() {
1041                    return assetEntryService;
1042            }
1043    
1044            /**
1045             * Sets the asset entry remote service.
1046             *
1047             * @param assetEntryService the asset entry remote service
1048             */
1049            public void setAssetEntryService(AssetEntryService assetEntryService) {
1050                    this.assetEntryService = assetEntryService;
1051            }
1052    
1053            /**
1054             * Returns the asset entry persistence.
1055             *
1056             * @return the asset entry persistence
1057             */
1058            public AssetEntryPersistence getAssetEntryPersistence() {
1059                    return assetEntryPersistence;
1060            }
1061    
1062            /**
1063             * Sets the asset entry persistence.
1064             *
1065             * @param assetEntryPersistence the asset entry persistence
1066             */
1067            public void setAssetEntryPersistence(
1068                    AssetEntryPersistence assetEntryPersistence) {
1069                    this.assetEntryPersistence = assetEntryPersistence;
1070            }
1071    
1072            /**
1073             * Returns the asset entry finder.
1074             *
1075             * @return the asset entry finder
1076             */
1077            public AssetEntryFinder getAssetEntryFinder() {
1078                    return assetEntryFinder;
1079            }
1080    
1081            /**
1082             * Sets the asset entry finder.
1083             *
1084             * @param assetEntryFinder the asset entry finder
1085             */
1086            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
1087                    this.assetEntryFinder = assetEntryFinder;
1088            }
1089    
1090            public void afterPropertiesSet() {
1091                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.social.model.SocialActivity",
1092                            socialActivityLocalService);
1093            }
1094    
1095            public void destroy() {
1096                    persistedModelLocalServiceRegistry.unregister(
1097                            "com.liferay.portlet.social.model.SocialActivity");
1098            }
1099    
1100            /**
1101             * Returns the Spring bean ID for this bean.
1102             *
1103             * @return the Spring bean ID for this bean
1104             */
1105            public String getBeanIdentifier() {
1106                    return _beanIdentifier;
1107            }
1108    
1109            /**
1110             * Sets the Spring bean ID for this bean.
1111             *
1112             * @param beanIdentifier the Spring bean ID for this bean
1113             */
1114            public void setBeanIdentifier(String beanIdentifier) {
1115                    _beanIdentifier = beanIdentifier;
1116            }
1117    
1118            protected ClassLoader getClassLoader() {
1119                    Class<?> clazz = getClass();
1120    
1121                    return clazz.getClassLoader();
1122            }
1123    
1124            protected Class<?> getModelClass() {
1125                    return SocialActivity.class;
1126            }
1127    
1128            protected String getModelClassName() {
1129                    return SocialActivity.class.getName();
1130            }
1131    
1132            /**
1133             * Performs an SQL query.
1134             *
1135             * @param sql the sql query
1136             */
1137            protected void runSQL(String sql) throws SystemException {
1138                    try {
1139                            DataSource dataSource = socialActivityPersistence.getDataSource();
1140    
1141                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1142                                            sql, new int[0]);
1143    
1144                            sqlUpdate.update();
1145                    }
1146                    catch (Exception e) {
1147                            throw new SystemException(e);
1148                    }
1149            }
1150    
1151            @BeanReference(type = SocialActivityLocalService.class)
1152            protected SocialActivityLocalService socialActivityLocalService;
1153            @BeanReference(type = SocialActivityPersistence.class)
1154            protected SocialActivityPersistence socialActivityPersistence;
1155            @BeanReference(type = SocialActivityFinder.class)
1156            protected SocialActivityFinder socialActivityFinder;
1157            @BeanReference(type = SocialActivityAchievementLocalService.class)
1158            protected SocialActivityAchievementLocalService socialActivityAchievementLocalService;
1159            @BeanReference(type = SocialActivityAchievementPersistence.class)
1160            protected SocialActivityAchievementPersistence socialActivityAchievementPersistence;
1161            @BeanReference(type = SocialActivityCounterLocalService.class)
1162            protected SocialActivityCounterLocalService socialActivityCounterLocalService;
1163            @BeanReference(type = SocialActivityCounterPersistence.class)
1164            protected SocialActivityCounterPersistence socialActivityCounterPersistence;
1165            @BeanReference(type = SocialActivityCounterFinder.class)
1166            protected SocialActivityCounterFinder socialActivityCounterFinder;
1167            @BeanReference(type = SocialActivityInterpreterLocalService.class)
1168            protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
1169            @BeanReference(type = SocialActivityLimitLocalService.class)
1170            protected SocialActivityLimitLocalService socialActivityLimitLocalService;
1171            @BeanReference(type = SocialActivityLimitPersistence.class)
1172            protected SocialActivityLimitPersistence socialActivityLimitPersistence;
1173            @BeanReference(type = SocialActivitySettingLocalService.class)
1174            protected SocialActivitySettingLocalService socialActivitySettingLocalService;
1175            @BeanReference(type = SocialActivitySettingService.class)
1176            protected SocialActivitySettingService socialActivitySettingService;
1177            @BeanReference(type = SocialActivitySettingPersistence.class)
1178            protected SocialActivitySettingPersistence socialActivitySettingPersistence;
1179            @BeanReference(type = SocialRelationLocalService.class)
1180            protected SocialRelationLocalService socialRelationLocalService;
1181            @BeanReference(type = SocialRelationPersistence.class)
1182            protected SocialRelationPersistence socialRelationPersistence;
1183            @BeanReference(type = SocialRequestLocalService.class)
1184            protected SocialRequestLocalService socialRequestLocalService;
1185            @BeanReference(type = SocialRequestPersistence.class)
1186            protected SocialRequestPersistence socialRequestPersistence;
1187            @BeanReference(type = SocialRequestInterpreterLocalService.class)
1188            protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
1189            @BeanReference(type = CounterLocalService.class)
1190            protected CounterLocalService counterLocalService;
1191            @BeanReference(type = GroupLocalService.class)
1192            protected GroupLocalService groupLocalService;
1193            @BeanReference(type = GroupService.class)
1194            protected GroupService groupService;
1195            @BeanReference(type = GroupPersistence.class)
1196            protected GroupPersistence groupPersistence;
1197            @BeanReference(type = GroupFinder.class)
1198            protected GroupFinder groupFinder;
1199            @BeanReference(type = LayoutLocalService.class)
1200            protected LayoutLocalService layoutLocalService;
1201            @BeanReference(type = LayoutService.class)
1202            protected LayoutService layoutService;
1203            @BeanReference(type = LayoutPersistence.class)
1204            protected LayoutPersistence layoutPersistence;
1205            @BeanReference(type = LayoutFinder.class)
1206            protected LayoutFinder layoutFinder;
1207            @BeanReference(type = ResourceLocalService.class)
1208            protected ResourceLocalService resourceLocalService;
1209            @BeanReference(type = ResourceService.class)
1210            protected ResourceService resourceService;
1211            @BeanReference(type = ResourcePersistence.class)
1212            protected ResourcePersistence resourcePersistence;
1213            @BeanReference(type = ResourceFinder.class)
1214            protected ResourceFinder resourceFinder;
1215            @BeanReference(type = UserLocalService.class)
1216            protected UserLocalService userLocalService;
1217            @BeanReference(type = UserService.class)
1218            protected UserService userService;
1219            @BeanReference(type = UserPersistence.class)
1220            protected UserPersistence userPersistence;
1221            @BeanReference(type = UserFinder.class)
1222            protected UserFinder userFinder;
1223            @BeanReference(type = AssetEntryLocalService.class)
1224            protected AssetEntryLocalService assetEntryLocalService;
1225            @BeanReference(type = AssetEntryService.class)
1226            protected AssetEntryService assetEntryService;
1227            @BeanReference(type = AssetEntryPersistence.class)
1228            protected AssetEntryPersistence assetEntryPersistence;
1229            @BeanReference(type = AssetEntryFinder.class)
1230            protected AssetEntryFinder assetEntryFinder;
1231            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1232            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1233            private static Log _log = LogFactoryUtil.getLog(SocialActivityLocalServiceBaseImpl.class);
1234            private String _beanIdentifier;
1235    }