001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.dao.db.DB;
021    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
025    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
028    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
029    import com.liferay.portal.kernel.dao.orm.Projection;
030    import com.liferay.portal.kernel.exception.PortalException;
031    import com.liferay.portal.kernel.exception.SystemException;
032    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
033    import com.liferay.portal.kernel.search.Indexable;
034    import com.liferay.portal.kernel.search.IndexableType;
035    import com.liferay.portal.kernel.util.OrderByComparator;
036    import com.liferay.portal.model.PersistedModel;
037    import com.liferay.portal.service.BaseLocalServiceImpl;
038    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
039    import com.liferay.portal.service.persistence.ClassNamePersistence;
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    import com.liferay.portal.util.PortalUtil;
047    
048    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
049    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
050    import com.liferay.portlet.social.model.SocialActivity;
051    import com.liferay.portlet.social.service.SocialActivityLocalService;
052    import com.liferay.portlet.social.service.persistence.SocialActivityCounterFinder;
053    import com.liferay.portlet.social.service.persistence.SocialActivityCounterPersistence;
054    import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
055    import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence;
056    import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
057    import com.liferay.portlet.social.service.persistence.SocialActivitySetFinder;
058    import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence;
059    import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence;
060    
061    import java.io.Serializable;
062    
063    import java.util.List;
064    
065    import javax.sql.DataSource;
066    
067    /**
068     * Provides the base implementation for the social activity local service.
069     *
070     * <p>
071     * 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}.
072     * </p>
073     *
074     * @author Brian Wing Shun Chan
075     * @see com.liferay.portlet.social.service.impl.SocialActivityLocalServiceImpl
076     * @see com.liferay.portlet.social.service.SocialActivityLocalServiceUtil
077     * @generated
078     */
079    @ProviderType
080    public abstract class SocialActivityLocalServiceBaseImpl
081            extends BaseLocalServiceImpl implements SocialActivityLocalService,
082                    IdentifiableOSGiService {
083            /*
084             * NOTE FOR DEVELOPERS:
085             *
086             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.social.service.SocialActivityLocalServiceUtil} to access the social activity local service.
087             */
088    
089            /**
090             * Adds the social activity to the database. Also notifies the appropriate model listeners.
091             *
092             * @param socialActivity the social activity
093             * @return the social activity that was added
094             */
095            @Indexable(type = IndexableType.REINDEX)
096            @Override
097            public SocialActivity addSocialActivity(SocialActivity socialActivity) {
098                    socialActivity.setNew(true);
099    
100                    return socialActivityPersistence.update(socialActivity);
101            }
102    
103            /**
104             * Creates a new social activity with the primary key. Does not add the social activity to the database.
105             *
106             * @param activityId the primary key for the new social activity
107             * @return the new social activity
108             */
109            @Override
110            public SocialActivity createSocialActivity(long activityId) {
111                    return socialActivityPersistence.create(activityId);
112            }
113    
114            /**
115             * Deletes the social activity with the primary key from the database. Also notifies the appropriate model listeners.
116             *
117             * @param activityId the primary key of the social activity
118             * @return the social activity that was removed
119             * @throws PortalException if a social activity with the primary key could not be found
120             */
121            @Indexable(type = IndexableType.DELETE)
122            @Override
123            public SocialActivity deleteSocialActivity(long activityId)
124                    throws PortalException {
125                    return socialActivityPersistence.remove(activityId);
126            }
127    
128            /**
129             * Deletes the social activity from the database. Also notifies the appropriate model listeners.
130             *
131             * @param socialActivity the social activity
132             * @return the social activity that was removed
133             */
134            @Indexable(type = IndexableType.DELETE)
135            @Override
136            public SocialActivity deleteSocialActivity(SocialActivity socialActivity) {
137                    return socialActivityPersistence.remove(socialActivity);
138            }
139    
140            @Override
141            public DynamicQuery dynamicQuery() {
142                    Class<?> clazz = getClass();
143    
144                    return DynamicQueryFactoryUtil.forClass(SocialActivity.class,
145                            clazz.getClassLoader());
146            }
147    
148            /**
149             * Performs a dynamic query on the database and returns the matching rows.
150             *
151             * @param dynamicQuery the dynamic query
152             * @return the matching rows
153             */
154            @Override
155            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
156                    return socialActivityPersistence.findWithDynamicQuery(dynamicQuery);
157            }
158    
159            /**
160             * Performs a dynamic query on the database and returns a range of the matching rows.
161             *
162             * <p>
163             * 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.
164             * </p>
165             *
166             * @param dynamicQuery the dynamic query
167             * @param start the lower bound of the range of model instances
168             * @param end the upper bound of the range of model instances (not inclusive)
169             * @return the range of matching rows
170             */
171            @Override
172            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
173                    int end) {
174                    return socialActivityPersistence.findWithDynamicQuery(dynamicQuery,
175                            start, end);
176            }
177    
178            /**
179             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
180             *
181             * <p>
182             * 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.
183             * </p>
184             *
185             * @param dynamicQuery the dynamic query
186             * @param start the lower bound of the range of model instances
187             * @param end the upper bound of the range of model instances (not inclusive)
188             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
189             * @return the ordered range of matching rows
190             */
191            @Override
192            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
193                    int end, OrderByComparator<T> orderByComparator) {
194                    return socialActivityPersistence.findWithDynamicQuery(dynamicQuery,
195                            start, end, orderByComparator);
196            }
197    
198            /**
199             * Returns the number of rows matching the dynamic query.
200             *
201             * @param dynamicQuery the dynamic query
202             * @return the number of rows matching the dynamic query
203             */
204            @Override
205            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
206                    return socialActivityPersistence.countWithDynamicQuery(dynamicQuery);
207            }
208    
209            /**
210             * Returns the number of rows matching the dynamic query.
211             *
212             * @param dynamicQuery the dynamic query
213             * @param projection the projection to apply to the query
214             * @return the number of rows matching the dynamic query
215             */
216            @Override
217            public long dynamicQueryCount(DynamicQuery dynamicQuery,
218                    Projection projection) {
219                    return socialActivityPersistence.countWithDynamicQuery(dynamicQuery,
220                            projection);
221            }
222    
223            @Override
224            public SocialActivity fetchSocialActivity(long activityId) {
225                    return socialActivityPersistence.fetchByPrimaryKey(activityId);
226            }
227    
228            /**
229             * Returns the social activity with the primary key.
230             *
231             * @param activityId the primary key of the social activity
232             * @return the social activity
233             * @throws PortalException if a social activity with the primary key could not be found
234             */
235            @Override
236            public SocialActivity getSocialActivity(long activityId)
237                    throws PortalException {
238                    return socialActivityPersistence.findByPrimaryKey(activityId);
239            }
240    
241            @Override
242            public ActionableDynamicQuery getActionableDynamicQuery() {
243                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
244    
245                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.social.service.SocialActivityLocalServiceUtil.getService());
246                    actionableDynamicQuery.setClassLoader(getClassLoader());
247                    actionableDynamicQuery.setModelClass(SocialActivity.class);
248    
249                    actionableDynamicQuery.setPrimaryKeyPropertyName("activityId");
250    
251                    return actionableDynamicQuery;
252            }
253    
254            @Override
255            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
256                    IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery();
257    
258                    indexableActionableDynamicQuery.setBaseLocalService(com.liferay.portlet.social.service.SocialActivityLocalServiceUtil.getService());
259                    indexableActionableDynamicQuery.setClassLoader(getClassLoader());
260                    indexableActionableDynamicQuery.setModelClass(SocialActivity.class);
261    
262                    indexableActionableDynamicQuery.setPrimaryKeyPropertyName("activityId");
263    
264                    return indexableActionableDynamicQuery;
265            }
266    
267            protected void initActionableDynamicQuery(
268                    ActionableDynamicQuery actionableDynamicQuery) {
269                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.social.service.SocialActivityLocalServiceUtil.getService());
270                    actionableDynamicQuery.setClassLoader(getClassLoader());
271                    actionableDynamicQuery.setModelClass(SocialActivity.class);
272    
273                    actionableDynamicQuery.setPrimaryKeyPropertyName("activityId");
274            }
275    
276            /**
277             * @throws PortalException
278             */
279            @Override
280            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
281                    throws PortalException {
282                    return socialActivityLocalService.deleteSocialActivity((SocialActivity)persistedModel);
283            }
284    
285            @Override
286            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
287                    throws PortalException {
288                    return socialActivityPersistence.findByPrimaryKey(primaryKeyObj);
289            }
290    
291            /**
292             * Returns a range of all the social activities.
293             *
294             * <p>
295             * 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.
296             * </p>
297             *
298             * @param start the lower bound of the range of social activities
299             * @param end the upper bound of the range of social activities (not inclusive)
300             * @return the range of social activities
301             */
302            @Override
303            public List<SocialActivity> getSocialActivities(int start, int end) {
304                    return socialActivityPersistence.findAll(start, end);
305            }
306    
307            /**
308             * Returns the number of social activities.
309             *
310             * @return the number of social activities
311             */
312            @Override
313            public int getSocialActivitiesCount() {
314                    return socialActivityPersistence.countAll();
315            }
316    
317            /**
318             * Updates the social activity in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
319             *
320             * @param socialActivity the social activity
321             * @return the social activity that was updated
322             */
323            @Indexable(type = IndexableType.REINDEX)
324            @Override
325            public SocialActivity updateSocialActivity(SocialActivity socialActivity) {
326                    return socialActivityPersistence.update(socialActivity);
327            }
328    
329            /**
330             * Returns the social activity local service.
331             *
332             * @return the social activity local service
333             */
334            public SocialActivityLocalService getSocialActivityLocalService() {
335                    return socialActivityLocalService;
336            }
337    
338            /**
339             * Sets the social activity local service.
340             *
341             * @param socialActivityLocalService the social activity local service
342             */
343            public void setSocialActivityLocalService(
344                    SocialActivityLocalService socialActivityLocalService) {
345                    this.socialActivityLocalService = socialActivityLocalService;
346            }
347    
348            /**
349             * Returns the social activity persistence.
350             *
351             * @return the social activity persistence
352             */
353            public SocialActivityPersistence getSocialActivityPersistence() {
354                    return socialActivityPersistence;
355            }
356    
357            /**
358             * Sets the social activity persistence.
359             *
360             * @param socialActivityPersistence the social activity persistence
361             */
362            public void setSocialActivityPersistence(
363                    SocialActivityPersistence socialActivityPersistence) {
364                    this.socialActivityPersistence = socialActivityPersistence;
365            }
366    
367            /**
368             * Returns the social activity finder.
369             *
370             * @return the social activity finder
371             */
372            public SocialActivityFinder getSocialActivityFinder() {
373                    return socialActivityFinder;
374            }
375    
376            /**
377             * Sets the social activity finder.
378             *
379             * @param socialActivityFinder the social activity finder
380             */
381            public void setSocialActivityFinder(
382                    SocialActivityFinder socialActivityFinder) {
383                    this.socialActivityFinder = socialActivityFinder;
384            }
385    
386            /**
387             * Returns the counter local service.
388             *
389             * @return the counter local service
390             */
391            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
392                    return counterLocalService;
393            }
394    
395            /**
396             * Sets the counter local service.
397             *
398             * @param counterLocalService the counter local service
399             */
400            public void setCounterLocalService(
401                    com.liferay.counter.service.CounterLocalService counterLocalService) {
402                    this.counterLocalService = counterLocalService;
403            }
404    
405            /**
406             * Returns the class name local service.
407             *
408             * @return the class name local service
409             */
410            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
411                    return classNameLocalService;
412            }
413    
414            /**
415             * Sets the class name local service.
416             *
417             * @param classNameLocalService the class name local service
418             */
419            public void setClassNameLocalService(
420                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
421                    this.classNameLocalService = classNameLocalService;
422            }
423    
424            /**
425             * Returns the class name persistence.
426             *
427             * @return the class name persistence
428             */
429            public ClassNamePersistence getClassNamePersistence() {
430                    return classNamePersistence;
431            }
432    
433            /**
434             * Sets the class name persistence.
435             *
436             * @param classNamePersistence the class name persistence
437             */
438            public void setClassNamePersistence(
439                    ClassNamePersistence classNamePersistence) {
440                    this.classNamePersistence = classNamePersistence;
441            }
442    
443            /**
444             * Returns the group local service.
445             *
446             * @return the group local service
447             */
448            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
449                    return groupLocalService;
450            }
451    
452            /**
453             * Sets the group local service.
454             *
455             * @param groupLocalService the group local service
456             */
457            public void setGroupLocalService(
458                    com.liferay.portal.service.GroupLocalService groupLocalService) {
459                    this.groupLocalService = groupLocalService;
460            }
461    
462            /**
463             * Returns the group persistence.
464             *
465             * @return the group persistence
466             */
467            public GroupPersistence getGroupPersistence() {
468                    return groupPersistence;
469            }
470    
471            /**
472             * Sets the group persistence.
473             *
474             * @param groupPersistence the group persistence
475             */
476            public void setGroupPersistence(GroupPersistence groupPersistence) {
477                    this.groupPersistence = groupPersistence;
478            }
479    
480            /**
481             * Returns the group finder.
482             *
483             * @return the group finder
484             */
485            public GroupFinder getGroupFinder() {
486                    return groupFinder;
487            }
488    
489            /**
490             * Sets the group finder.
491             *
492             * @param groupFinder the group finder
493             */
494            public void setGroupFinder(GroupFinder groupFinder) {
495                    this.groupFinder = groupFinder;
496            }
497    
498            /**
499             * Returns the layout local service.
500             *
501             * @return the layout local service
502             */
503            public com.liferay.portal.service.LayoutLocalService getLayoutLocalService() {
504                    return layoutLocalService;
505            }
506    
507            /**
508             * Sets the layout local service.
509             *
510             * @param layoutLocalService the layout local service
511             */
512            public void setLayoutLocalService(
513                    com.liferay.portal.service.LayoutLocalService layoutLocalService) {
514                    this.layoutLocalService = layoutLocalService;
515            }
516    
517            /**
518             * Returns the layout persistence.
519             *
520             * @return the layout persistence
521             */
522            public LayoutPersistence getLayoutPersistence() {
523                    return layoutPersistence;
524            }
525    
526            /**
527             * Sets the layout persistence.
528             *
529             * @param layoutPersistence the layout persistence
530             */
531            public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
532                    this.layoutPersistence = layoutPersistence;
533            }
534    
535            /**
536             * Returns the layout finder.
537             *
538             * @return the layout finder
539             */
540            public LayoutFinder getLayoutFinder() {
541                    return layoutFinder;
542            }
543    
544            /**
545             * Sets the layout finder.
546             *
547             * @param layoutFinder the layout finder
548             */
549            public void setLayoutFinder(LayoutFinder layoutFinder) {
550                    this.layoutFinder = layoutFinder;
551            }
552    
553            /**
554             * Returns the user local service.
555             *
556             * @return the user local service
557             */
558            public com.liferay.portal.service.UserLocalService getUserLocalService() {
559                    return userLocalService;
560            }
561    
562            /**
563             * Sets the user local service.
564             *
565             * @param userLocalService the user local service
566             */
567            public void setUserLocalService(
568                    com.liferay.portal.service.UserLocalService userLocalService) {
569                    this.userLocalService = userLocalService;
570            }
571    
572            /**
573             * Returns the user persistence.
574             *
575             * @return the user persistence
576             */
577            public UserPersistence getUserPersistence() {
578                    return userPersistence;
579            }
580    
581            /**
582             * Sets the user persistence.
583             *
584             * @param userPersistence the user persistence
585             */
586            public void setUserPersistence(UserPersistence userPersistence) {
587                    this.userPersistence = userPersistence;
588            }
589    
590            /**
591             * Returns the user finder.
592             *
593             * @return the user finder
594             */
595            public UserFinder getUserFinder() {
596                    return userFinder;
597            }
598    
599            /**
600             * Sets the user finder.
601             *
602             * @param userFinder the user finder
603             */
604            public void setUserFinder(UserFinder userFinder) {
605                    this.userFinder = userFinder;
606            }
607    
608            /**
609             * Returns the asset entry local service.
610             *
611             * @return the asset entry local service
612             */
613            public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
614                    return assetEntryLocalService;
615            }
616    
617            /**
618             * Sets the asset entry local service.
619             *
620             * @param assetEntryLocalService the asset entry local service
621             */
622            public void setAssetEntryLocalService(
623                    com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
624                    this.assetEntryLocalService = assetEntryLocalService;
625            }
626    
627            /**
628             * Returns the asset entry persistence.
629             *
630             * @return the asset entry persistence
631             */
632            public AssetEntryPersistence getAssetEntryPersistence() {
633                    return assetEntryPersistence;
634            }
635    
636            /**
637             * Sets the asset entry persistence.
638             *
639             * @param assetEntryPersistence the asset entry persistence
640             */
641            public void setAssetEntryPersistence(
642                    AssetEntryPersistence assetEntryPersistence) {
643                    this.assetEntryPersistence = assetEntryPersistence;
644            }
645    
646            /**
647             * Returns the asset entry finder.
648             *
649             * @return the asset entry finder
650             */
651            public AssetEntryFinder getAssetEntryFinder() {
652                    return assetEntryFinder;
653            }
654    
655            /**
656             * Sets the asset entry finder.
657             *
658             * @param assetEntryFinder the asset entry finder
659             */
660            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
661                    this.assetEntryFinder = assetEntryFinder;
662            }
663    
664            /**
665             * Returns the social activity counter local service.
666             *
667             * @return the social activity counter local service
668             */
669            public com.liferay.portlet.social.service.SocialActivityCounterLocalService getSocialActivityCounterLocalService() {
670                    return socialActivityCounterLocalService;
671            }
672    
673            /**
674             * Sets the social activity counter local service.
675             *
676             * @param socialActivityCounterLocalService the social activity counter local service
677             */
678            public void setSocialActivityCounterLocalService(
679                    com.liferay.portlet.social.service.SocialActivityCounterLocalService socialActivityCounterLocalService) {
680                    this.socialActivityCounterLocalService = socialActivityCounterLocalService;
681            }
682    
683            /**
684             * Returns the social activity counter persistence.
685             *
686             * @return the social activity counter persistence
687             */
688            public SocialActivityCounterPersistence getSocialActivityCounterPersistence() {
689                    return socialActivityCounterPersistence;
690            }
691    
692            /**
693             * Sets the social activity counter persistence.
694             *
695             * @param socialActivityCounterPersistence the social activity counter persistence
696             */
697            public void setSocialActivityCounterPersistence(
698                    SocialActivityCounterPersistence socialActivityCounterPersistence) {
699                    this.socialActivityCounterPersistence = socialActivityCounterPersistence;
700            }
701    
702            /**
703             * Returns the social activity counter finder.
704             *
705             * @return the social activity counter finder
706             */
707            public SocialActivityCounterFinder getSocialActivityCounterFinder() {
708                    return socialActivityCounterFinder;
709            }
710    
711            /**
712             * Sets the social activity counter finder.
713             *
714             * @param socialActivityCounterFinder the social activity counter finder
715             */
716            public void setSocialActivityCounterFinder(
717                    SocialActivityCounterFinder socialActivityCounterFinder) {
718                    this.socialActivityCounterFinder = socialActivityCounterFinder;
719            }
720    
721            /**
722             * Returns the social activity interpreter local service.
723             *
724             * @return the social activity interpreter local service
725             */
726            public com.liferay.portlet.social.service.SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
727                    return socialActivityInterpreterLocalService;
728            }
729    
730            /**
731             * Sets the social activity interpreter local service.
732             *
733             * @param socialActivityInterpreterLocalService the social activity interpreter local service
734             */
735            public void setSocialActivityInterpreterLocalService(
736                    com.liferay.portlet.social.service.SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
737                    this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
738            }
739    
740            /**
741             * Returns the social activity limit local service.
742             *
743             * @return the social activity limit local service
744             */
745            public com.liferay.portlet.social.service.SocialActivityLimitLocalService getSocialActivityLimitLocalService() {
746                    return socialActivityLimitLocalService;
747            }
748    
749            /**
750             * Sets the social activity limit local service.
751             *
752             * @param socialActivityLimitLocalService the social activity limit local service
753             */
754            public void setSocialActivityLimitLocalService(
755                    com.liferay.portlet.social.service.SocialActivityLimitLocalService socialActivityLimitLocalService) {
756                    this.socialActivityLimitLocalService = socialActivityLimitLocalService;
757            }
758    
759            /**
760             * Returns the social activity limit persistence.
761             *
762             * @return the social activity limit persistence
763             */
764            public SocialActivityLimitPersistence getSocialActivityLimitPersistence() {
765                    return socialActivityLimitPersistence;
766            }
767    
768            /**
769             * Sets the social activity limit persistence.
770             *
771             * @param socialActivityLimitPersistence the social activity limit persistence
772             */
773            public void setSocialActivityLimitPersistence(
774                    SocialActivityLimitPersistence socialActivityLimitPersistence) {
775                    this.socialActivityLimitPersistence = socialActivityLimitPersistence;
776            }
777    
778            /**
779             * Returns the social activity set local service.
780             *
781             * @return the social activity set local service
782             */
783            public com.liferay.portlet.social.service.SocialActivitySetLocalService getSocialActivitySetLocalService() {
784                    return socialActivitySetLocalService;
785            }
786    
787            /**
788             * Sets the social activity set local service.
789             *
790             * @param socialActivitySetLocalService the social activity set local service
791             */
792            public void setSocialActivitySetLocalService(
793                    com.liferay.portlet.social.service.SocialActivitySetLocalService socialActivitySetLocalService) {
794                    this.socialActivitySetLocalService = socialActivitySetLocalService;
795            }
796    
797            /**
798             * Returns the social activity set persistence.
799             *
800             * @return the social activity set persistence
801             */
802            public SocialActivitySetPersistence getSocialActivitySetPersistence() {
803                    return socialActivitySetPersistence;
804            }
805    
806            /**
807             * Sets the social activity set persistence.
808             *
809             * @param socialActivitySetPersistence the social activity set persistence
810             */
811            public void setSocialActivitySetPersistence(
812                    SocialActivitySetPersistence socialActivitySetPersistence) {
813                    this.socialActivitySetPersistence = socialActivitySetPersistence;
814            }
815    
816            /**
817             * Returns the social activity set finder.
818             *
819             * @return the social activity set finder
820             */
821            public SocialActivitySetFinder getSocialActivitySetFinder() {
822                    return socialActivitySetFinder;
823            }
824    
825            /**
826             * Sets the social activity set finder.
827             *
828             * @param socialActivitySetFinder the social activity set finder
829             */
830            public void setSocialActivitySetFinder(
831                    SocialActivitySetFinder socialActivitySetFinder) {
832                    this.socialActivitySetFinder = socialActivitySetFinder;
833            }
834    
835            /**
836             * Returns the social activity setting local service.
837             *
838             * @return the social activity setting local service
839             */
840            public com.liferay.portlet.social.service.SocialActivitySettingLocalService getSocialActivitySettingLocalService() {
841                    return socialActivitySettingLocalService;
842            }
843    
844            /**
845             * Sets the social activity setting local service.
846             *
847             * @param socialActivitySettingLocalService the social activity setting local service
848             */
849            public void setSocialActivitySettingLocalService(
850                    com.liferay.portlet.social.service.SocialActivitySettingLocalService socialActivitySettingLocalService) {
851                    this.socialActivitySettingLocalService = socialActivitySettingLocalService;
852            }
853    
854            /**
855             * Returns the social activity setting persistence.
856             *
857             * @return the social activity setting persistence
858             */
859            public SocialActivitySettingPersistence getSocialActivitySettingPersistence() {
860                    return socialActivitySettingPersistence;
861            }
862    
863            /**
864             * Sets the social activity setting persistence.
865             *
866             * @param socialActivitySettingPersistence the social activity setting persistence
867             */
868            public void setSocialActivitySettingPersistence(
869                    SocialActivitySettingPersistence socialActivitySettingPersistence) {
870                    this.socialActivitySettingPersistence = socialActivitySettingPersistence;
871            }
872    
873            public void afterPropertiesSet() {
874                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.social.model.SocialActivity",
875                            socialActivityLocalService);
876            }
877    
878            public void destroy() {
879                    persistedModelLocalServiceRegistry.unregister(
880                            "com.liferay.portlet.social.model.SocialActivity");
881            }
882    
883            /**
884             * Returns the OSGi service identifier.
885             *
886             * @return the OSGi service identifier
887             */
888            @Override
889            public String getOSGiServiceIdentifier() {
890                    return SocialActivityLocalService.class.getName();
891            }
892    
893            protected Class<?> getModelClass() {
894                    return SocialActivity.class;
895            }
896    
897            protected String getModelClassName() {
898                    return SocialActivity.class.getName();
899            }
900    
901            /**
902             * Performs a SQL query.
903             *
904             * @param sql the sql query
905             */
906            protected void runSQL(String sql) {
907                    try {
908                            DataSource dataSource = socialActivityPersistence.getDataSource();
909    
910                            DB db = DBManagerUtil.getDB();
911    
912                            sql = db.buildSQL(sql);
913                            sql = PortalUtil.transformSQL(sql);
914    
915                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
916                                            sql, new int[0]);
917    
918                            sqlUpdate.update();
919                    }
920                    catch (Exception e) {
921                            throw new SystemException(e);
922                    }
923            }
924    
925            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class)
926            protected SocialActivityLocalService socialActivityLocalService;
927            @BeanReference(type = SocialActivityPersistence.class)
928            protected SocialActivityPersistence socialActivityPersistence;
929            @BeanReference(type = SocialActivityFinder.class)
930            protected SocialActivityFinder socialActivityFinder;
931            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
932            protected com.liferay.counter.service.CounterLocalService counterLocalService;
933            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
934            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
935            @BeanReference(type = ClassNamePersistence.class)
936            protected ClassNamePersistence classNamePersistence;
937            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
938            protected com.liferay.portal.service.GroupLocalService groupLocalService;
939            @BeanReference(type = GroupPersistence.class)
940            protected GroupPersistence groupPersistence;
941            @BeanReference(type = GroupFinder.class)
942            protected GroupFinder groupFinder;
943            @BeanReference(type = com.liferay.portal.service.LayoutLocalService.class)
944            protected com.liferay.portal.service.LayoutLocalService layoutLocalService;
945            @BeanReference(type = LayoutPersistence.class)
946            protected LayoutPersistence layoutPersistence;
947            @BeanReference(type = LayoutFinder.class)
948            protected LayoutFinder layoutFinder;
949            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
950            protected com.liferay.portal.service.UserLocalService userLocalService;
951            @BeanReference(type = UserPersistence.class)
952            protected UserPersistence userPersistence;
953            @BeanReference(type = UserFinder.class)
954            protected UserFinder userFinder;
955            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
956            protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
957            @BeanReference(type = AssetEntryPersistence.class)
958            protected AssetEntryPersistence assetEntryPersistence;
959            @BeanReference(type = AssetEntryFinder.class)
960            protected AssetEntryFinder assetEntryFinder;
961            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityCounterLocalService.class)
962            protected com.liferay.portlet.social.service.SocialActivityCounterLocalService socialActivityCounterLocalService;
963            @BeanReference(type = SocialActivityCounterPersistence.class)
964            protected SocialActivityCounterPersistence socialActivityCounterPersistence;
965            @BeanReference(type = SocialActivityCounterFinder.class)
966            protected SocialActivityCounterFinder socialActivityCounterFinder;
967            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityInterpreterLocalService.class)
968            protected com.liferay.portlet.social.service.SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
969            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLimitLocalService.class)
970            protected com.liferay.portlet.social.service.SocialActivityLimitLocalService socialActivityLimitLocalService;
971            @BeanReference(type = SocialActivityLimitPersistence.class)
972            protected SocialActivityLimitPersistence socialActivityLimitPersistence;
973            @BeanReference(type = com.liferay.portlet.social.service.SocialActivitySetLocalService.class)
974            protected com.liferay.portlet.social.service.SocialActivitySetLocalService socialActivitySetLocalService;
975            @BeanReference(type = SocialActivitySetPersistence.class)
976            protected SocialActivitySetPersistence socialActivitySetPersistence;
977            @BeanReference(type = SocialActivitySetFinder.class)
978            protected SocialActivitySetFinder socialActivitySetFinder;
979            @BeanReference(type = com.liferay.portlet.social.service.SocialActivitySettingLocalService.class)
980            protected com.liferay.portlet.social.service.SocialActivitySettingLocalService socialActivitySettingLocalService;
981            @BeanReference(type = SocialActivitySettingPersistence.class)
982            protected SocialActivitySettingPersistence socialActivitySettingPersistence;
983            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
984            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
985    }