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 remote service.
346             *
347             * @return the social activity remote service
348             */
349            public com.liferay.portlet.social.service.SocialActivityService getSocialActivityService() {
350                    return socialActivityService;
351            }
352    
353            /**
354             * Sets the social activity remote service.
355             *
356             * @param socialActivityService the social activity remote service
357             */
358            public void setSocialActivityService(
359                    com.liferay.portlet.social.service.SocialActivityService socialActivityService) {
360                    this.socialActivityService = socialActivityService;
361            }
362    
363            /**
364             * Returns the social activity persistence.
365             *
366             * @return the social activity persistence
367             */
368            public SocialActivityPersistence getSocialActivityPersistence() {
369                    return socialActivityPersistence;
370            }
371    
372            /**
373             * Sets the social activity persistence.
374             *
375             * @param socialActivityPersistence the social activity persistence
376             */
377            public void setSocialActivityPersistence(
378                    SocialActivityPersistence socialActivityPersistence) {
379                    this.socialActivityPersistence = socialActivityPersistence;
380            }
381    
382            /**
383             * Returns the social activity finder.
384             *
385             * @return the social activity finder
386             */
387            public SocialActivityFinder getSocialActivityFinder() {
388                    return socialActivityFinder;
389            }
390    
391            /**
392             * Sets the social activity finder.
393             *
394             * @param socialActivityFinder the social activity finder
395             */
396            public void setSocialActivityFinder(
397                    SocialActivityFinder socialActivityFinder) {
398                    this.socialActivityFinder = socialActivityFinder;
399            }
400    
401            /**
402             * Returns the social activity achievement local service.
403             *
404             * @return the social activity achievement local service
405             */
406            public com.liferay.portlet.social.service.SocialActivityAchievementLocalService getSocialActivityAchievementLocalService() {
407                    return socialActivityAchievementLocalService;
408            }
409    
410            /**
411             * Sets the social activity achievement local service.
412             *
413             * @param socialActivityAchievementLocalService the social activity achievement local service
414             */
415            public void setSocialActivityAchievementLocalService(
416                    com.liferay.portlet.social.service.SocialActivityAchievementLocalService socialActivityAchievementLocalService) {
417                    this.socialActivityAchievementLocalService = socialActivityAchievementLocalService;
418            }
419    
420            /**
421             * Returns the social activity achievement persistence.
422             *
423             * @return the social activity achievement persistence
424             */
425            public SocialActivityAchievementPersistence getSocialActivityAchievementPersistence() {
426                    return socialActivityAchievementPersistence;
427            }
428    
429            /**
430             * Sets the social activity achievement persistence.
431             *
432             * @param socialActivityAchievementPersistence the social activity achievement persistence
433             */
434            public void setSocialActivityAchievementPersistence(
435                    SocialActivityAchievementPersistence socialActivityAchievementPersistence) {
436                    this.socialActivityAchievementPersistence = socialActivityAchievementPersistence;
437            }
438    
439            /**
440             * Returns the social activity counter local service.
441             *
442             * @return the social activity counter local service
443             */
444            public com.liferay.portlet.social.service.SocialActivityCounterLocalService getSocialActivityCounterLocalService() {
445                    return socialActivityCounterLocalService;
446            }
447    
448            /**
449             * Sets the social activity counter local service.
450             *
451             * @param socialActivityCounterLocalService the social activity counter local service
452             */
453            public void setSocialActivityCounterLocalService(
454                    com.liferay.portlet.social.service.SocialActivityCounterLocalService socialActivityCounterLocalService) {
455                    this.socialActivityCounterLocalService = socialActivityCounterLocalService;
456            }
457    
458            /**
459             * Returns the social activity counter persistence.
460             *
461             * @return the social activity counter persistence
462             */
463            public SocialActivityCounterPersistence getSocialActivityCounterPersistence() {
464                    return socialActivityCounterPersistence;
465            }
466    
467            /**
468             * Sets the social activity counter persistence.
469             *
470             * @param socialActivityCounterPersistence the social activity counter persistence
471             */
472            public void setSocialActivityCounterPersistence(
473                    SocialActivityCounterPersistence socialActivityCounterPersistence) {
474                    this.socialActivityCounterPersistence = socialActivityCounterPersistence;
475            }
476    
477            /**
478             * Returns the social activity counter finder.
479             *
480             * @return the social activity counter finder
481             */
482            public SocialActivityCounterFinder getSocialActivityCounterFinder() {
483                    return socialActivityCounterFinder;
484            }
485    
486            /**
487             * Sets the social activity counter finder.
488             *
489             * @param socialActivityCounterFinder the social activity counter finder
490             */
491            public void setSocialActivityCounterFinder(
492                    SocialActivityCounterFinder socialActivityCounterFinder) {
493                    this.socialActivityCounterFinder = socialActivityCounterFinder;
494            }
495    
496            /**
497             * Returns the social activity interpreter local service.
498             *
499             * @return the social activity interpreter local service
500             */
501            public com.liferay.portlet.social.service.SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
502                    return socialActivityInterpreterLocalService;
503            }
504    
505            /**
506             * Sets the social activity interpreter local service.
507             *
508             * @param socialActivityInterpreterLocalService the social activity interpreter local service
509             */
510            public void setSocialActivityInterpreterLocalService(
511                    com.liferay.portlet.social.service.SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
512                    this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
513            }
514    
515            /**
516             * Returns the social activity limit local service.
517             *
518             * @return the social activity limit local service
519             */
520            public com.liferay.portlet.social.service.SocialActivityLimitLocalService getSocialActivityLimitLocalService() {
521                    return socialActivityLimitLocalService;
522            }
523    
524            /**
525             * Sets the social activity limit local service.
526             *
527             * @param socialActivityLimitLocalService the social activity limit local service
528             */
529            public void setSocialActivityLimitLocalService(
530                    com.liferay.portlet.social.service.SocialActivityLimitLocalService socialActivityLimitLocalService) {
531                    this.socialActivityLimitLocalService = socialActivityLimitLocalService;
532            }
533    
534            /**
535             * Returns the social activity limit persistence.
536             *
537             * @return the social activity limit persistence
538             */
539            public SocialActivityLimitPersistence getSocialActivityLimitPersistence() {
540                    return socialActivityLimitPersistence;
541            }
542    
543            /**
544             * Sets the social activity limit persistence.
545             *
546             * @param socialActivityLimitPersistence the social activity limit persistence
547             */
548            public void setSocialActivityLimitPersistence(
549                    SocialActivityLimitPersistence socialActivityLimitPersistence) {
550                    this.socialActivityLimitPersistence = socialActivityLimitPersistence;
551            }
552    
553            /**
554             * Returns the social activity set local service.
555             *
556             * @return the social activity set local service
557             */
558            public com.liferay.portlet.social.service.SocialActivitySetLocalService getSocialActivitySetLocalService() {
559                    return socialActivitySetLocalService;
560            }
561    
562            /**
563             * Sets the social activity set local service.
564             *
565             * @param socialActivitySetLocalService the social activity set local service
566             */
567            public void setSocialActivitySetLocalService(
568                    com.liferay.portlet.social.service.SocialActivitySetLocalService socialActivitySetLocalService) {
569                    this.socialActivitySetLocalService = socialActivitySetLocalService;
570            }
571    
572            /**
573             * Returns the social activity set persistence.
574             *
575             * @return the social activity set persistence
576             */
577            public SocialActivitySetPersistence getSocialActivitySetPersistence() {
578                    return socialActivitySetPersistence;
579            }
580    
581            /**
582             * Sets the social activity set persistence.
583             *
584             * @param socialActivitySetPersistence the social activity set persistence
585             */
586            public void setSocialActivitySetPersistence(
587                    SocialActivitySetPersistence socialActivitySetPersistence) {
588                    this.socialActivitySetPersistence = socialActivitySetPersistence;
589            }
590    
591            /**
592             * Returns the social activity set finder.
593             *
594             * @return the social activity set finder
595             */
596            public SocialActivitySetFinder getSocialActivitySetFinder() {
597                    return socialActivitySetFinder;
598            }
599    
600            /**
601             * Sets the social activity set finder.
602             *
603             * @param socialActivitySetFinder the social activity set finder
604             */
605            public void setSocialActivitySetFinder(
606                    SocialActivitySetFinder socialActivitySetFinder) {
607                    this.socialActivitySetFinder = socialActivitySetFinder;
608            }
609    
610            /**
611             * Returns the social activity setting local service.
612             *
613             * @return the social activity setting local service
614             */
615            public com.liferay.portlet.social.service.SocialActivitySettingLocalService getSocialActivitySettingLocalService() {
616                    return socialActivitySettingLocalService;
617            }
618    
619            /**
620             * Sets the social activity setting local service.
621             *
622             * @param socialActivitySettingLocalService the social activity setting local service
623             */
624            public void setSocialActivitySettingLocalService(
625                    com.liferay.portlet.social.service.SocialActivitySettingLocalService socialActivitySettingLocalService) {
626                    this.socialActivitySettingLocalService = socialActivitySettingLocalService;
627            }
628    
629            /**
630             * Returns the social activity setting remote service.
631             *
632             * @return the social activity setting remote service
633             */
634            public com.liferay.portlet.social.service.SocialActivitySettingService getSocialActivitySettingService() {
635                    return socialActivitySettingService;
636            }
637    
638            /**
639             * Sets the social activity setting remote service.
640             *
641             * @param socialActivitySettingService the social activity setting remote service
642             */
643            public void setSocialActivitySettingService(
644                    com.liferay.portlet.social.service.SocialActivitySettingService socialActivitySettingService) {
645                    this.socialActivitySettingService = socialActivitySettingService;
646            }
647    
648            /**
649             * Returns the social activity setting persistence.
650             *
651             * @return the social activity setting persistence
652             */
653            public SocialActivitySettingPersistence getSocialActivitySettingPersistence() {
654                    return socialActivitySettingPersistence;
655            }
656    
657            /**
658             * Sets the social activity setting persistence.
659             *
660             * @param socialActivitySettingPersistence the social activity setting persistence
661             */
662            public void setSocialActivitySettingPersistence(
663                    SocialActivitySettingPersistence socialActivitySettingPersistence) {
664                    this.socialActivitySettingPersistence = socialActivitySettingPersistence;
665            }
666    
667            /**
668             * Returns the social relation local service.
669             *
670             * @return the social relation local service
671             */
672            public com.liferay.portlet.social.service.SocialRelationLocalService getSocialRelationLocalService() {
673                    return socialRelationLocalService;
674            }
675    
676            /**
677             * Sets the social relation local service.
678             *
679             * @param socialRelationLocalService the social relation local service
680             */
681            public void setSocialRelationLocalService(
682                    com.liferay.portlet.social.service.SocialRelationLocalService socialRelationLocalService) {
683                    this.socialRelationLocalService = socialRelationLocalService;
684            }
685    
686            /**
687             * Returns the social relation persistence.
688             *
689             * @return the social relation persistence
690             */
691            public SocialRelationPersistence getSocialRelationPersistence() {
692                    return socialRelationPersistence;
693            }
694    
695            /**
696             * Sets the social relation persistence.
697             *
698             * @param socialRelationPersistence the social relation persistence
699             */
700            public void setSocialRelationPersistence(
701                    SocialRelationPersistence socialRelationPersistence) {
702                    this.socialRelationPersistence = socialRelationPersistence;
703            }
704    
705            /**
706             * Returns the social request local service.
707             *
708             * @return the social request local service
709             */
710            public com.liferay.portlet.social.service.SocialRequestLocalService getSocialRequestLocalService() {
711                    return socialRequestLocalService;
712            }
713    
714            /**
715             * Sets the social request local service.
716             *
717             * @param socialRequestLocalService the social request local service
718             */
719            public void setSocialRequestLocalService(
720                    com.liferay.portlet.social.service.SocialRequestLocalService socialRequestLocalService) {
721                    this.socialRequestLocalService = socialRequestLocalService;
722            }
723    
724            /**
725             * Returns the social request remote service.
726             *
727             * @return the social request remote service
728             */
729            public com.liferay.portlet.social.service.SocialRequestService getSocialRequestService() {
730                    return socialRequestService;
731            }
732    
733            /**
734             * Sets the social request remote service.
735             *
736             * @param socialRequestService the social request remote service
737             */
738            public void setSocialRequestService(
739                    com.liferay.portlet.social.service.SocialRequestService socialRequestService) {
740                    this.socialRequestService = socialRequestService;
741            }
742    
743            /**
744             * Returns the social request persistence.
745             *
746             * @return the social request persistence
747             */
748            public SocialRequestPersistence getSocialRequestPersistence() {
749                    return socialRequestPersistence;
750            }
751    
752            /**
753             * Sets the social request persistence.
754             *
755             * @param socialRequestPersistence the social request persistence
756             */
757            public void setSocialRequestPersistence(
758                    SocialRequestPersistence socialRequestPersistence) {
759                    this.socialRequestPersistence = socialRequestPersistence;
760            }
761    
762            /**
763             * Returns the social request interpreter local service.
764             *
765             * @return the social request interpreter local service
766             */
767            public com.liferay.portlet.social.service.SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
768                    return socialRequestInterpreterLocalService;
769            }
770    
771            /**
772             * Sets the social request interpreter local service.
773             *
774             * @param socialRequestInterpreterLocalService the social request interpreter local service
775             */
776            public void setSocialRequestInterpreterLocalService(
777                    com.liferay.portlet.social.service.SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
778                    this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
779            }
780    
781            /**
782             * Returns the counter local service.
783             *
784             * @return the counter local service
785             */
786            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
787                    return counterLocalService;
788            }
789    
790            /**
791             * Sets the counter local service.
792             *
793             * @param counterLocalService the counter local service
794             */
795            public void setCounterLocalService(
796                    com.liferay.counter.service.CounterLocalService counterLocalService) {
797                    this.counterLocalService = counterLocalService;
798            }
799    
800            /**
801             * Returns the resource local service.
802             *
803             * @return the resource local service
804             */
805            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
806                    return resourceLocalService;
807            }
808    
809            /**
810             * Sets the resource local service.
811             *
812             * @param resourceLocalService the resource local service
813             */
814            public void setResourceLocalService(
815                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
816                    this.resourceLocalService = resourceLocalService;
817            }
818    
819            /**
820             * Returns the user local service.
821             *
822             * @return the user local service
823             */
824            public com.liferay.portal.service.UserLocalService getUserLocalService() {
825                    return userLocalService;
826            }
827    
828            /**
829             * Sets the user local service.
830             *
831             * @param userLocalService the user local service
832             */
833            public void setUserLocalService(
834                    com.liferay.portal.service.UserLocalService userLocalService) {
835                    this.userLocalService = userLocalService;
836            }
837    
838            /**
839             * Returns the user remote service.
840             *
841             * @return the user remote service
842             */
843            public com.liferay.portal.service.UserService getUserService() {
844                    return userService;
845            }
846    
847            /**
848             * Sets the user remote service.
849             *
850             * @param userService the user remote service
851             */
852            public void setUserService(
853                    com.liferay.portal.service.UserService userService) {
854                    this.userService = userService;
855            }
856    
857            /**
858             * Returns the user persistence.
859             *
860             * @return the user persistence
861             */
862            public UserPersistence getUserPersistence() {
863                    return userPersistence;
864            }
865    
866            /**
867             * Sets the user persistence.
868             *
869             * @param userPersistence the user persistence
870             */
871            public void setUserPersistence(UserPersistence userPersistence) {
872                    this.userPersistence = userPersistence;
873            }
874    
875            /**
876             * Returns the user finder.
877             *
878             * @return the user finder
879             */
880            public UserFinder getUserFinder() {
881                    return userFinder;
882            }
883    
884            /**
885             * Sets the user finder.
886             *
887             * @param userFinder the user finder
888             */
889            public void setUserFinder(UserFinder userFinder) {
890                    this.userFinder = userFinder;
891            }
892    
893            public void afterPropertiesSet() {
894                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.social.model.SocialRelation",
895                            socialRelationLocalService);
896            }
897    
898            public void destroy() {
899                    persistedModelLocalServiceRegistry.unregister(
900                            "com.liferay.portlet.social.model.SocialRelation");
901            }
902    
903            /**
904             * Returns the Spring bean ID for this bean.
905             *
906             * @return the Spring bean ID for this bean
907             */
908            @Override
909            public String getBeanIdentifier() {
910                    return _beanIdentifier;
911            }
912    
913            /**
914             * Sets the Spring bean ID for this bean.
915             *
916             * @param beanIdentifier the Spring bean ID for this bean
917             */
918            @Override
919            public void setBeanIdentifier(String beanIdentifier) {
920                    _beanIdentifier = beanIdentifier;
921            }
922    
923            protected Class<?> getModelClass() {
924                    return SocialRelation.class;
925            }
926    
927            protected String getModelClassName() {
928                    return SocialRelation.class.getName();
929            }
930    
931            /**
932             * Performs an SQL query.
933             *
934             * @param sql the sql query
935             */
936            protected void runSQL(String sql) throws SystemException {
937                    try {
938                            DataSource dataSource = socialRelationPersistence.getDataSource();
939    
940                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
941                                            sql, new int[0]);
942    
943                            sqlUpdate.update();
944                    }
945                    catch (Exception e) {
946                            throw new SystemException(e);
947                    }
948            }
949    
950            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLocalService.class)
951            protected com.liferay.portlet.social.service.SocialActivityLocalService socialActivityLocalService;
952            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityService.class)
953            protected com.liferay.portlet.social.service.SocialActivityService socialActivityService;
954            @BeanReference(type = SocialActivityPersistence.class)
955            protected SocialActivityPersistence socialActivityPersistence;
956            @BeanReference(type = SocialActivityFinder.class)
957            protected SocialActivityFinder socialActivityFinder;
958            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityAchievementLocalService.class)
959            protected com.liferay.portlet.social.service.SocialActivityAchievementLocalService socialActivityAchievementLocalService;
960            @BeanReference(type = SocialActivityAchievementPersistence.class)
961            protected SocialActivityAchievementPersistence socialActivityAchievementPersistence;
962            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityCounterLocalService.class)
963            protected com.liferay.portlet.social.service.SocialActivityCounterLocalService socialActivityCounterLocalService;
964            @BeanReference(type = SocialActivityCounterPersistence.class)
965            protected SocialActivityCounterPersistence socialActivityCounterPersistence;
966            @BeanReference(type = SocialActivityCounterFinder.class)
967            protected SocialActivityCounterFinder socialActivityCounterFinder;
968            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityInterpreterLocalService.class)
969            protected com.liferay.portlet.social.service.SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
970            @BeanReference(type = com.liferay.portlet.social.service.SocialActivityLimitLocalService.class)
971            protected com.liferay.portlet.social.service.SocialActivityLimitLocalService socialActivityLimitLocalService;
972            @BeanReference(type = SocialActivityLimitPersistence.class)
973            protected SocialActivityLimitPersistence socialActivityLimitPersistence;
974            @BeanReference(type = com.liferay.portlet.social.service.SocialActivitySetLocalService.class)
975            protected com.liferay.portlet.social.service.SocialActivitySetLocalService socialActivitySetLocalService;
976            @BeanReference(type = SocialActivitySetPersistence.class)
977            protected SocialActivitySetPersistence socialActivitySetPersistence;
978            @BeanReference(type = SocialActivitySetFinder.class)
979            protected SocialActivitySetFinder socialActivitySetFinder;
980            @BeanReference(type = com.liferay.portlet.social.service.SocialActivitySettingLocalService.class)
981            protected com.liferay.portlet.social.service.SocialActivitySettingLocalService socialActivitySettingLocalService;
982            @BeanReference(type = com.liferay.portlet.social.service.SocialActivitySettingService.class)
983            protected com.liferay.portlet.social.service.SocialActivitySettingService socialActivitySettingService;
984            @BeanReference(type = SocialActivitySettingPersistence.class)
985            protected SocialActivitySettingPersistence socialActivitySettingPersistence;
986            @BeanReference(type = com.liferay.portlet.social.service.SocialRelationLocalService.class)
987            protected com.liferay.portlet.social.service.SocialRelationLocalService socialRelationLocalService;
988            @BeanReference(type = SocialRelationPersistence.class)
989            protected SocialRelationPersistence socialRelationPersistence;
990            @BeanReference(type = com.liferay.portlet.social.service.SocialRequestLocalService.class)
991            protected com.liferay.portlet.social.service.SocialRequestLocalService socialRequestLocalService;
992            @BeanReference(type = com.liferay.portlet.social.service.SocialRequestService.class)
993            protected com.liferay.portlet.social.service.SocialRequestService socialRequestService;
994            @BeanReference(type = SocialRequestPersistence.class)
995            protected SocialRequestPersistence socialRequestPersistence;
996            @BeanReference(type = com.liferay.portlet.social.service.SocialRequestInterpreterLocalService.class)
997            protected com.liferay.portlet.social.service.SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
998            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
999            protected com.liferay.counter.service.CounterLocalService counterLocalService;
1000            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
1001            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1002            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1003            protected com.liferay.portal.service.UserLocalService userLocalService;
1004            @BeanReference(type = com.liferay.portal.service.UserService.class)
1005            protected com.liferay.portal.service.UserService userService;
1006            @BeanReference(type = UserPersistence.class)
1007            protected UserPersistence userPersistence;
1008            @BeanReference(type = UserFinder.class)
1009            protected UserFinder userFinder;
1010            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1011            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1012            private String _beanIdentifier;
1013    }