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