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