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