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