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