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