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