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