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