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