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