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.GroupLocalService;
033    import com.liferay.portal.service.GroupService;
034    import com.liferay.portal.service.LockLocalService;
035    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
036    import com.liferay.portal.service.ResourceLocalService;
037    import com.liferay.portal.service.UserLocalService;
038    import com.liferay.portal.service.UserService;
039    import com.liferay.portal.service.persistence.GroupFinder;
040    import com.liferay.portal.service.persistence.GroupPersistence;
041    import com.liferay.portal.service.persistence.LockFinder;
042    import com.liferay.portal.service.persistence.LockPersistence;
043    import com.liferay.portal.service.persistence.UserFinder;
044    import com.liferay.portal.service.persistence.UserPersistence;
045    
046    import com.liferay.portlet.asset.service.AssetEntryLocalService;
047    import com.liferay.portlet.asset.service.AssetEntryService;
048    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
049    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
050    import com.liferay.portlet.social.model.SocialActivityCounter;
051    import com.liferay.portlet.social.service.SocialActivityAchievementLocalService;
052    import com.liferay.portlet.social.service.SocialActivityCounterLocalService;
053    import com.liferay.portlet.social.service.SocialActivityInterpreterLocalService;
054    import com.liferay.portlet.social.service.SocialActivityLimitLocalService;
055    import com.liferay.portlet.social.service.SocialActivityLocalService;
056    import com.liferay.portlet.social.service.SocialActivitySetLocalService;
057    import com.liferay.portlet.social.service.SocialActivitySettingLocalService;
058    import com.liferay.portlet.social.service.SocialActivitySettingService;
059    import com.liferay.portlet.social.service.SocialRelationLocalService;
060    import com.liferay.portlet.social.service.SocialRequestInterpreterLocalService;
061    import com.liferay.portlet.social.service.SocialRequestLocalService;
062    import com.liferay.portlet.social.service.SocialRequestService;
063    import com.liferay.portlet.social.service.persistence.SocialActivityAchievementPersistence;
064    import com.liferay.portlet.social.service.persistence.SocialActivityCounterFinder;
065    import com.liferay.portlet.social.service.persistence.SocialActivityCounterPersistence;
066    import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
067    import com.liferay.portlet.social.service.persistence.SocialActivityLimitPersistence;
068    import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
069    import com.liferay.portlet.social.service.persistence.SocialActivitySetPersistence;
070    import com.liferay.portlet.social.service.persistence.SocialActivitySettingPersistence;
071    import com.liferay.portlet.social.service.persistence.SocialRelationPersistence;
072    import com.liferay.portlet.social.service.persistence.SocialRequestPersistence;
073    
074    import java.io.Serializable;
075    
076    import java.util.List;
077    
078    import javax.sql.DataSource;
079    
080    /**
081     * The base implementation of the social activity counter local service.
082     *
083     * <p>
084     * 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.SocialActivityCounterLocalServiceImpl}.
085     * </p>
086     *
087     * @author Brian Wing Shun Chan
088     * @see com.liferay.portlet.social.service.impl.SocialActivityCounterLocalServiceImpl
089     * @see com.liferay.portlet.social.service.SocialActivityCounterLocalServiceUtil
090     * @generated
091     */
092    public abstract class SocialActivityCounterLocalServiceBaseImpl
093            extends BaseLocalServiceImpl implements SocialActivityCounterLocalService,
094                    IdentifiableBean {
095            /*
096             * NOTE FOR DEVELOPERS:
097             *
098             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.social.service.SocialActivityCounterLocalServiceUtil} to access the social activity counter local service.
099             */
100    
101            /**
102             * Adds the social activity counter to the database. Also notifies the appropriate model listeners.
103             *
104             * @param socialActivityCounter the social activity counter
105             * @return the social activity counter that was added
106             * @throws SystemException if a system exception occurred
107             */
108            @Indexable(type = IndexableType.REINDEX)
109            public SocialActivityCounter addSocialActivityCounter(
110                    SocialActivityCounter socialActivityCounter) throws SystemException {
111                    socialActivityCounter.setNew(true);
112    
113                    return socialActivityCounterPersistence.update(socialActivityCounter);
114            }
115    
116            /**
117             * Creates a new social activity counter with the primary key. Does not add the social activity counter to the database.
118             *
119             * @param activityCounterId the primary key for the new social activity counter
120             * @return the new social activity counter
121             */
122            public SocialActivityCounter createSocialActivityCounter(
123                    long activityCounterId) {
124                    return socialActivityCounterPersistence.create(activityCounterId);
125            }
126    
127            /**
128             * Deletes the social activity counter with the primary key from the database. Also notifies the appropriate model listeners.
129             *
130             * @param activityCounterId the primary key of the social activity counter
131             * @return the social activity counter that was removed
132             * @throws PortalException if a social activity counter with the primary key could not be found
133             * @throws SystemException if a system exception occurred
134             */
135            @Indexable(type = IndexableType.DELETE)
136            public SocialActivityCounter deleteSocialActivityCounter(
137                    long activityCounterId) throws PortalException, SystemException {
138                    return socialActivityCounterPersistence.remove(activityCounterId);
139            }
140    
141            /**
142             * Deletes the social activity counter from the database. Also notifies the appropriate model listeners.
143             *
144             * @param socialActivityCounter the social activity counter
145             * @return the social activity counter that was removed
146             * @throws SystemException if a system exception occurred
147             */
148            @Indexable(type = IndexableType.DELETE)
149            public SocialActivityCounter deleteSocialActivityCounter(
150                    SocialActivityCounter socialActivityCounter) throws SystemException {
151                    return socialActivityCounterPersistence.remove(socialActivityCounter);
152            }
153    
154            public DynamicQuery dynamicQuery() {
155                    Class<?> clazz = getClass();
156    
157                    return DynamicQueryFactoryUtil.forClass(SocialActivityCounter.class,
158                            clazz.getClassLoader());
159            }
160    
161            /**
162             * Performs a dynamic query on the database and returns the matching rows.
163             *
164             * @param dynamicQuery the dynamic query
165             * @return the matching rows
166             * @throws SystemException if a system exception occurred
167             */
168            @SuppressWarnings("rawtypes")
169            public List dynamicQuery(DynamicQuery dynamicQuery)
170                    throws SystemException {
171                    return socialActivityCounterPersistence.findWithDynamicQuery(dynamicQuery);
172            }
173    
174            /**
175             * Performs a dynamic query on the database and returns a range of the matching rows.
176             *
177             * <p>
178             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityCounterModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
179             * </p>
180             *
181             * @param dynamicQuery the dynamic query
182             * @param start the lower bound of the range of model instances
183             * @param end the upper bound of the range of model instances (not inclusive)
184             * @return the range of matching rows
185             * @throws SystemException if a system exception occurred
186             */
187            @SuppressWarnings("rawtypes")
188            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
189                    throws SystemException {
190                    return socialActivityCounterPersistence.findWithDynamicQuery(dynamicQuery,
191                            start, end);
192            }
193    
194            /**
195             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
196             *
197             * <p>
198             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityCounterModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
199             * </p>
200             *
201             * @param dynamicQuery the dynamic query
202             * @param start the lower bound of the range of model instances
203             * @param end the upper bound of the range of model instances (not inclusive)
204             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
205             * @return the ordered range of matching rows
206             * @throws SystemException if a system exception occurred
207             */
208            @SuppressWarnings("rawtypes")
209            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
210                    OrderByComparator orderByComparator) throws SystemException {
211                    return socialActivityCounterPersistence.findWithDynamicQuery(dynamicQuery,
212                            start, end, orderByComparator);
213            }
214    
215            /**
216             * Returns the number of rows that match the dynamic query.
217             *
218             * @param dynamicQuery the dynamic query
219             * @return the number of rows that match the dynamic query
220             * @throws SystemException if a system exception occurred
221             */
222            public long dynamicQueryCount(DynamicQuery dynamicQuery)
223                    throws SystemException {
224                    return socialActivityCounterPersistence.countWithDynamicQuery(dynamicQuery);
225            }
226    
227            public SocialActivityCounter fetchSocialActivityCounter(
228                    long activityCounterId) throws SystemException {
229                    return socialActivityCounterPersistence.fetchByPrimaryKey(activityCounterId);
230            }
231    
232            /**
233             * Returns the social activity counter with the primary key.
234             *
235             * @param activityCounterId the primary key of the social activity counter
236             * @return the social activity counter
237             * @throws PortalException if a social activity counter with the primary key could not be found
238             * @throws SystemException if a system exception occurred
239             */
240            public SocialActivityCounter getSocialActivityCounter(
241                    long activityCounterId) throws PortalException, SystemException {
242                    return socialActivityCounterPersistence.findByPrimaryKey(activityCounterId);
243            }
244    
245            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
246                    throws PortalException, SystemException {
247                    return socialActivityCounterPersistence.findByPrimaryKey(primaryKeyObj);
248            }
249    
250            /**
251             * Returns a range of all the social activity counters.
252             *
253             * <p>
254             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.social.model.impl.SocialActivityCounterModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
255             * </p>
256             *
257             * @param start the lower bound of the range of social activity counters
258             * @param end the upper bound of the range of social activity counters (not inclusive)
259             * @return the range of social activity counters
260             * @throws SystemException if a system exception occurred
261             */
262            public List<SocialActivityCounter> getSocialActivityCounters(int start,
263                    int end) throws SystemException {
264                    return socialActivityCounterPersistence.findAll(start, end);
265            }
266    
267            /**
268             * Returns the number of social activity counters.
269             *
270             * @return the number of social activity counters
271             * @throws SystemException if a system exception occurred
272             */
273            public int getSocialActivityCountersCount() throws SystemException {
274                    return socialActivityCounterPersistence.countAll();
275            }
276    
277            /**
278             * Updates the social activity counter in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
279             *
280             * @param socialActivityCounter the social activity counter
281             * @return the social activity counter that was updated
282             * @throws SystemException if a system exception occurred
283             */
284            @Indexable(type = IndexableType.REINDEX)
285            public SocialActivityCounter updateSocialActivityCounter(
286                    SocialActivityCounter socialActivityCounter) throws SystemException {
287                    return socialActivityCounterPersistence.update(socialActivityCounter);
288            }
289    
290            /**
291             * Returns the social activity local service.
292             *
293             * @return the social activity local service
294             */
295            public SocialActivityLocalService getSocialActivityLocalService() {
296                    return socialActivityLocalService;
297            }
298    
299            /**
300             * Sets the social activity local service.
301             *
302             * @param socialActivityLocalService the social activity local service
303             */
304            public void setSocialActivityLocalService(
305                    SocialActivityLocalService socialActivityLocalService) {
306                    this.socialActivityLocalService = socialActivityLocalService;
307            }
308    
309            /**
310             * Returns the social activity persistence.
311             *
312             * @return the social activity persistence
313             */
314            public SocialActivityPersistence getSocialActivityPersistence() {
315                    return socialActivityPersistence;
316            }
317    
318            /**
319             * Sets the social activity persistence.
320             *
321             * @param socialActivityPersistence the social activity persistence
322             */
323            public void setSocialActivityPersistence(
324                    SocialActivityPersistence socialActivityPersistence) {
325                    this.socialActivityPersistence = socialActivityPersistence;
326            }
327    
328            /**
329             * Returns the social activity finder.
330             *
331             * @return the social activity finder
332             */
333            public SocialActivityFinder getSocialActivityFinder() {
334                    return socialActivityFinder;
335            }
336    
337            /**
338             * Sets the social activity finder.
339             *
340             * @param socialActivityFinder the social activity finder
341             */
342            public void setSocialActivityFinder(
343                    SocialActivityFinder socialActivityFinder) {
344                    this.socialActivityFinder = socialActivityFinder;
345            }
346    
347            /**
348             * Returns the social activity achievement local service.
349             *
350             * @return the social activity achievement local service
351             */
352            public SocialActivityAchievementLocalService getSocialActivityAchievementLocalService() {
353                    return socialActivityAchievementLocalService;
354            }
355    
356            /**
357             * Sets the social activity achievement local service.
358             *
359             * @param socialActivityAchievementLocalService the social activity achievement local service
360             */
361            public void setSocialActivityAchievementLocalService(
362                    SocialActivityAchievementLocalService socialActivityAchievementLocalService) {
363                    this.socialActivityAchievementLocalService = socialActivityAchievementLocalService;
364            }
365    
366            /**
367             * Returns the social activity achievement persistence.
368             *
369             * @return the social activity achievement persistence
370             */
371            public SocialActivityAchievementPersistence getSocialActivityAchievementPersistence() {
372                    return socialActivityAchievementPersistence;
373            }
374    
375            /**
376             * Sets the social activity achievement persistence.
377             *
378             * @param socialActivityAchievementPersistence the social activity achievement persistence
379             */
380            public void setSocialActivityAchievementPersistence(
381                    SocialActivityAchievementPersistence socialActivityAchievementPersistence) {
382                    this.socialActivityAchievementPersistence = socialActivityAchievementPersistence;
383            }
384    
385            /**
386             * Returns the social activity counter local service.
387             *
388             * @return the social activity counter local service
389             */
390            public SocialActivityCounterLocalService getSocialActivityCounterLocalService() {
391                    return socialActivityCounterLocalService;
392            }
393    
394            /**
395             * Sets the social activity counter local service.
396             *
397             * @param socialActivityCounterLocalService the social activity counter local service
398             */
399            public void setSocialActivityCounterLocalService(
400                    SocialActivityCounterLocalService socialActivityCounterLocalService) {
401                    this.socialActivityCounterLocalService = socialActivityCounterLocalService;
402            }
403    
404            /**
405             * Returns the social activity counter persistence.
406             *
407             * @return the social activity counter persistence
408             */
409            public SocialActivityCounterPersistence getSocialActivityCounterPersistence() {
410                    return socialActivityCounterPersistence;
411            }
412    
413            /**
414             * Sets the social activity counter persistence.
415             *
416             * @param socialActivityCounterPersistence the social activity counter persistence
417             */
418            public void setSocialActivityCounterPersistence(
419                    SocialActivityCounterPersistence socialActivityCounterPersistence) {
420                    this.socialActivityCounterPersistence = socialActivityCounterPersistence;
421            }
422    
423            /**
424             * Returns the social activity counter finder.
425             *
426             * @return the social activity counter finder
427             */
428            public SocialActivityCounterFinder getSocialActivityCounterFinder() {
429                    return socialActivityCounterFinder;
430            }
431    
432            /**
433             * Sets the social activity counter finder.
434             *
435             * @param socialActivityCounterFinder the social activity counter finder
436             */
437            public void setSocialActivityCounterFinder(
438                    SocialActivityCounterFinder socialActivityCounterFinder) {
439                    this.socialActivityCounterFinder = socialActivityCounterFinder;
440            }
441    
442            /**
443             * Returns the social activity interpreter local service.
444             *
445             * @return the social activity interpreter local service
446             */
447            public SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
448                    return socialActivityInterpreterLocalService;
449            }
450    
451            /**
452             * Sets the social activity interpreter local service.
453             *
454             * @param socialActivityInterpreterLocalService the social activity interpreter local service
455             */
456            public void setSocialActivityInterpreterLocalService(
457                    SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
458                    this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
459            }
460    
461            /**
462             * Returns the social activity limit local service.
463             *
464             * @return the social activity limit local service
465             */
466            public SocialActivityLimitLocalService getSocialActivityLimitLocalService() {
467                    return socialActivityLimitLocalService;
468            }
469    
470            /**
471             * Sets the social activity limit local service.
472             *
473             * @param socialActivityLimitLocalService the social activity limit local service
474             */
475            public void setSocialActivityLimitLocalService(
476                    SocialActivityLimitLocalService socialActivityLimitLocalService) {
477                    this.socialActivityLimitLocalService = socialActivityLimitLocalService;
478            }
479    
480            /**
481             * Returns the social activity limit persistence.
482             *
483             * @return the social activity limit persistence
484             */
485            public SocialActivityLimitPersistence getSocialActivityLimitPersistence() {
486                    return socialActivityLimitPersistence;
487            }
488    
489            /**
490             * Sets the social activity limit persistence.
491             *
492             * @param socialActivityLimitPersistence the social activity limit persistence
493             */
494            public void setSocialActivityLimitPersistence(
495                    SocialActivityLimitPersistence socialActivityLimitPersistence) {
496                    this.socialActivityLimitPersistence = socialActivityLimitPersistence;
497            }
498    
499            /**
500             * Returns the social activity set local service.
501             *
502             * @return the social activity set local service
503             */
504            public SocialActivitySetLocalService getSocialActivitySetLocalService() {
505                    return socialActivitySetLocalService;
506            }
507    
508            /**
509             * Sets the social activity set local service.
510             *
511             * @param socialActivitySetLocalService the social activity set local service
512             */
513            public void setSocialActivitySetLocalService(
514                    SocialActivitySetLocalService socialActivitySetLocalService) {
515                    this.socialActivitySetLocalService = socialActivitySetLocalService;
516            }
517    
518            /**
519             * Returns the social activity set persistence.
520             *
521             * @return the social activity set persistence
522             */
523            public SocialActivitySetPersistence getSocialActivitySetPersistence() {
524                    return socialActivitySetPersistence;
525            }
526    
527            /**
528             * Sets the social activity set persistence.
529             *
530             * @param socialActivitySetPersistence the social activity set persistence
531             */
532            public void setSocialActivitySetPersistence(
533                    SocialActivitySetPersistence socialActivitySetPersistence) {
534                    this.socialActivitySetPersistence = socialActivitySetPersistence;
535            }
536    
537            /**
538             * Returns the social activity setting local service.
539             *
540             * @return the social activity setting local service
541             */
542            public SocialActivitySettingLocalService getSocialActivitySettingLocalService() {
543                    return socialActivitySettingLocalService;
544            }
545    
546            /**
547             * Sets the social activity setting local service.
548             *
549             * @param socialActivitySettingLocalService the social activity setting local service
550             */
551            public void setSocialActivitySettingLocalService(
552                    SocialActivitySettingLocalService socialActivitySettingLocalService) {
553                    this.socialActivitySettingLocalService = socialActivitySettingLocalService;
554            }
555    
556            /**
557             * Returns the social activity setting remote service.
558             *
559             * @return the social activity setting remote service
560             */
561            public SocialActivitySettingService getSocialActivitySettingService() {
562                    return socialActivitySettingService;
563            }
564    
565            /**
566             * Sets the social activity setting remote service.
567             *
568             * @param socialActivitySettingService the social activity setting remote service
569             */
570            public void setSocialActivitySettingService(
571                    SocialActivitySettingService socialActivitySettingService) {
572                    this.socialActivitySettingService = socialActivitySettingService;
573            }
574    
575            /**
576             * Returns the social activity setting persistence.
577             *
578             * @return the social activity setting persistence
579             */
580            public SocialActivitySettingPersistence getSocialActivitySettingPersistence() {
581                    return socialActivitySettingPersistence;
582            }
583    
584            /**
585             * Sets the social activity setting persistence.
586             *
587             * @param socialActivitySettingPersistence the social activity setting persistence
588             */
589            public void setSocialActivitySettingPersistence(
590                    SocialActivitySettingPersistence socialActivitySettingPersistence) {
591                    this.socialActivitySettingPersistence = socialActivitySettingPersistence;
592            }
593    
594            /**
595             * Returns the social relation local service.
596             *
597             * @return the social relation local service
598             */
599            public SocialRelationLocalService getSocialRelationLocalService() {
600                    return socialRelationLocalService;
601            }
602    
603            /**
604             * Sets the social relation local service.
605             *
606             * @param socialRelationLocalService the social relation local service
607             */
608            public void setSocialRelationLocalService(
609                    SocialRelationLocalService socialRelationLocalService) {
610                    this.socialRelationLocalService = socialRelationLocalService;
611            }
612    
613            /**
614             * Returns the social relation persistence.
615             *
616             * @return the social relation persistence
617             */
618            public SocialRelationPersistence getSocialRelationPersistence() {
619                    return socialRelationPersistence;
620            }
621    
622            /**
623             * Sets the social relation persistence.
624             *
625             * @param socialRelationPersistence the social relation persistence
626             */
627            public void setSocialRelationPersistence(
628                    SocialRelationPersistence socialRelationPersistence) {
629                    this.socialRelationPersistence = socialRelationPersistence;
630            }
631    
632            /**
633             * Returns the social request local service.
634             *
635             * @return the social request local service
636             */
637            public SocialRequestLocalService getSocialRequestLocalService() {
638                    return socialRequestLocalService;
639            }
640    
641            /**
642             * Sets the social request local service.
643             *
644             * @param socialRequestLocalService the social request local service
645             */
646            public void setSocialRequestLocalService(
647                    SocialRequestLocalService socialRequestLocalService) {
648                    this.socialRequestLocalService = socialRequestLocalService;
649            }
650    
651            /**
652             * Returns the social request remote service.
653             *
654             * @return the social request remote service
655             */
656            public SocialRequestService getSocialRequestService() {
657                    return socialRequestService;
658            }
659    
660            /**
661             * Sets the social request remote service.
662             *
663             * @param socialRequestService the social request remote service
664             */
665            public void setSocialRequestService(
666                    SocialRequestService socialRequestService) {
667                    this.socialRequestService = socialRequestService;
668            }
669    
670            /**
671             * Returns the social request persistence.
672             *
673             * @return the social request persistence
674             */
675            public SocialRequestPersistence getSocialRequestPersistence() {
676                    return socialRequestPersistence;
677            }
678    
679            /**
680             * Sets the social request persistence.
681             *
682             * @param socialRequestPersistence the social request persistence
683             */
684            public void setSocialRequestPersistence(
685                    SocialRequestPersistence socialRequestPersistence) {
686                    this.socialRequestPersistence = socialRequestPersistence;
687            }
688    
689            /**
690             * Returns the social request interpreter local service.
691             *
692             * @return the social request interpreter local service
693             */
694            public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
695                    return socialRequestInterpreterLocalService;
696            }
697    
698            /**
699             * Sets the social request interpreter local service.
700             *
701             * @param socialRequestInterpreterLocalService the social request interpreter local service
702             */
703            public void setSocialRequestInterpreterLocalService(
704                    SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
705                    this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
706            }
707    
708            /**
709             * Returns the counter local service.
710             *
711             * @return the counter local service
712             */
713            public CounterLocalService getCounterLocalService() {
714                    return counterLocalService;
715            }
716    
717            /**
718             * Sets the counter local service.
719             *
720             * @param counterLocalService the counter local service
721             */
722            public void setCounterLocalService(CounterLocalService counterLocalService) {
723                    this.counterLocalService = counterLocalService;
724            }
725    
726            /**
727             * Returns the group local service.
728             *
729             * @return the group local service
730             */
731            public GroupLocalService getGroupLocalService() {
732                    return groupLocalService;
733            }
734    
735            /**
736             * Sets the group local service.
737             *
738             * @param groupLocalService the group local service
739             */
740            public void setGroupLocalService(GroupLocalService groupLocalService) {
741                    this.groupLocalService = groupLocalService;
742            }
743    
744            /**
745             * Returns the group remote service.
746             *
747             * @return the group remote service
748             */
749            public GroupService getGroupService() {
750                    return groupService;
751            }
752    
753            /**
754             * Sets the group remote service.
755             *
756             * @param groupService the group remote service
757             */
758            public void setGroupService(GroupService groupService) {
759                    this.groupService = groupService;
760            }
761    
762            /**
763             * Returns the group persistence.
764             *
765             * @return the group persistence
766             */
767            public GroupPersistence getGroupPersistence() {
768                    return groupPersistence;
769            }
770    
771            /**
772             * Sets the group persistence.
773             *
774             * @param groupPersistence the group persistence
775             */
776            public void setGroupPersistence(GroupPersistence groupPersistence) {
777                    this.groupPersistence = groupPersistence;
778            }
779    
780            /**
781             * Returns the group finder.
782             *
783             * @return the group finder
784             */
785            public GroupFinder getGroupFinder() {
786                    return groupFinder;
787            }
788    
789            /**
790             * Sets the group finder.
791             *
792             * @param groupFinder the group finder
793             */
794            public void setGroupFinder(GroupFinder groupFinder) {
795                    this.groupFinder = groupFinder;
796            }
797    
798            /**
799             * Returns the lock local service.
800             *
801             * @return the lock local service
802             */
803            public LockLocalService getLockLocalService() {
804                    return lockLocalService;
805            }
806    
807            /**
808             * Sets the lock local service.
809             *
810             * @param lockLocalService the lock local service
811             */
812            public void setLockLocalService(LockLocalService lockLocalService) {
813                    this.lockLocalService = lockLocalService;
814            }
815    
816            /**
817             * Returns the lock persistence.
818             *
819             * @return the lock persistence
820             */
821            public LockPersistence getLockPersistence() {
822                    return lockPersistence;
823            }
824    
825            /**
826             * Sets the lock persistence.
827             *
828             * @param lockPersistence the lock persistence
829             */
830            public void setLockPersistence(LockPersistence lockPersistence) {
831                    this.lockPersistence = lockPersistence;
832            }
833    
834            /**
835             * Returns the lock finder.
836             *
837             * @return the lock finder
838             */
839            public LockFinder getLockFinder() {
840                    return lockFinder;
841            }
842    
843            /**
844             * Sets the lock finder.
845             *
846             * @param lockFinder the lock finder
847             */
848            public void setLockFinder(LockFinder lockFinder) {
849                    this.lockFinder = lockFinder;
850            }
851    
852            /**
853             * Returns the resource local service.
854             *
855             * @return the resource local service
856             */
857            public ResourceLocalService getResourceLocalService() {
858                    return resourceLocalService;
859            }
860    
861            /**
862             * Sets the resource local service.
863             *
864             * @param resourceLocalService the resource local service
865             */
866            public void setResourceLocalService(
867                    ResourceLocalService resourceLocalService) {
868                    this.resourceLocalService = resourceLocalService;
869            }
870    
871            /**
872             * Returns the user local service.
873             *
874             * @return the user local service
875             */
876            public UserLocalService getUserLocalService() {
877                    return userLocalService;
878            }
879    
880            /**
881             * Sets the user local service.
882             *
883             * @param userLocalService the user local service
884             */
885            public void setUserLocalService(UserLocalService userLocalService) {
886                    this.userLocalService = userLocalService;
887            }
888    
889            /**
890             * Returns the user remote service.
891             *
892             * @return the user remote service
893             */
894            public UserService getUserService() {
895                    return userService;
896            }
897    
898            /**
899             * Sets the user remote service.
900             *
901             * @param userService the user remote service
902             */
903            public void setUserService(UserService userService) {
904                    this.userService = userService;
905            }
906    
907            /**
908             * Returns the user persistence.
909             *
910             * @return the user persistence
911             */
912            public UserPersistence getUserPersistence() {
913                    return userPersistence;
914            }
915    
916            /**
917             * Sets the user persistence.
918             *
919             * @param userPersistence the user persistence
920             */
921            public void setUserPersistence(UserPersistence userPersistence) {
922                    this.userPersistence = userPersistence;
923            }
924    
925            /**
926             * Returns the user finder.
927             *
928             * @return the user finder
929             */
930            public UserFinder getUserFinder() {
931                    return userFinder;
932            }
933    
934            /**
935             * Sets the user finder.
936             *
937             * @param userFinder the user finder
938             */
939            public void setUserFinder(UserFinder userFinder) {
940                    this.userFinder = userFinder;
941            }
942    
943            /**
944             * Returns the asset entry local service.
945             *
946             * @return the asset entry local service
947             */
948            public AssetEntryLocalService getAssetEntryLocalService() {
949                    return assetEntryLocalService;
950            }
951    
952            /**
953             * Sets the asset entry local service.
954             *
955             * @param assetEntryLocalService the asset entry local service
956             */
957            public void setAssetEntryLocalService(
958                    AssetEntryLocalService assetEntryLocalService) {
959                    this.assetEntryLocalService = assetEntryLocalService;
960            }
961    
962            /**
963             * Returns the asset entry remote service.
964             *
965             * @return the asset entry remote service
966             */
967            public AssetEntryService getAssetEntryService() {
968                    return assetEntryService;
969            }
970    
971            /**
972             * Sets the asset entry remote service.
973             *
974             * @param assetEntryService the asset entry remote service
975             */
976            public void setAssetEntryService(AssetEntryService assetEntryService) {
977                    this.assetEntryService = assetEntryService;
978            }
979    
980            /**
981             * Returns the asset entry persistence.
982             *
983             * @return the asset entry persistence
984             */
985            public AssetEntryPersistence getAssetEntryPersistence() {
986                    return assetEntryPersistence;
987            }
988    
989            /**
990             * Sets the asset entry persistence.
991             *
992             * @param assetEntryPersistence the asset entry persistence
993             */
994            public void setAssetEntryPersistence(
995                    AssetEntryPersistence assetEntryPersistence) {
996                    this.assetEntryPersistence = assetEntryPersistence;
997            }
998    
999            /**
1000             * Returns the asset entry finder.
1001             *
1002             * @return the asset entry finder
1003             */
1004            public AssetEntryFinder getAssetEntryFinder() {
1005                    return assetEntryFinder;
1006            }
1007    
1008            /**
1009             * Sets the asset entry finder.
1010             *
1011             * @param assetEntryFinder the asset entry finder
1012             */
1013            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
1014                    this.assetEntryFinder = assetEntryFinder;
1015            }
1016    
1017            public void afterPropertiesSet() {
1018                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.social.model.SocialActivityCounter",
1019                            socialActivityCounterLocalService);
1020            }
1021    
1022            public void destroy() {
1023                    persistedModelLocalServiceRegistry.unregister(
1024                            "com.liferay.portlet.social.model.SocialActivityCounter");
1025            }
1026    
1027            /**
1028             * Returns the Spring bean ID for this bean.
1029             *
1030             * @return the Spring bean ID for this bean
1031             */
1032            public String getBeanIdentifier() {
1033                    return _beanIdentifier;
1034            }
1035    
1036            /**
1037             * Sets the Spring bean ID for this bean.
1038             *
1039             * @param beanIdentifier the Spring bean ID for this bean
1040             */
1041            public void setBeanIdentifier(String beanIdentifier) {
1042                    _beanIdentifier = beanIdentifier;
1043            }
1044    
1045            protected Class<?> getModelClass() {
1046                    return SocialActivityCounter.class;
1047            }
1048    
1049            protected String getModelClassName() {
1050                    return SocialActivityCounter.class.getName();
1051            }
1052    
1053            /**
1054             * Performs an SQL query.
1055             *
1056             * @param sql the sql query
1057             */
1058            protected void runSQL(String sql) throws SystemException {
1059                    try {
1060                            DataSource dataSource = socialActivityCounterPersistence.getDataSource();
1061    
1062                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1063                                            sql, new int[0]);
1064    
1065                            sqlUpdate.update();
1066                    }
1067                    catch (Exception e) {
1068                            throw new SystemException(e);
1069                    }
1070            }
1071    
1072            @BeanReference(type = SocialActivityLocalService.class)
1073            protected SocialActivityLocalService socialActivityLocalService;
1074            @BeanReference(type = SocialActivityPersistence.class)
1075            protected SocialActivityPersistence socialActivityPersistence;
1076            @BeanReference(type = SocialActivityFinder.class)
1077            protected SocialActivityFinder socialActivityFinder;
1078            @BeanReference(type = SocialActivityAchievementLocalService.class)
1079            protected SocialActivityAchievementLocalService socialActivityAchievementLocalService;
1080            @BeanReference(type = SocialActivityAchievementPersistence.class)
1081            protected SocialActivityAchievementPersistence socialActivityAchievementPersistence;
1082            @BeanReference(type = SocialActivityCounterLocalService.class)
1083            protected SocialActivityCounterLocalService socialActivityCounterLocalService;
1084            @BeanReference(type = SocialActivityCounterPersistence.class)
1085            protected SocialActivityCounterPersistence socialActivityCounterPersistence;
1086            @BeanReference(type = SocialActivityCounterFinder.class)
1087            protected SocialActivityCounterFinder socialActivityCounterFinder;
1088            @BeanReference(type = SocialActivityInterpreterLocalService.class)
1089            protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
1090            @BeanReference(type = SocialActivityLimitLocalService.class)
1091            protected SocialActivityLimitLocalService socialActivityLimitLocalService;
1092            @BeanReference(type = SocialActivityLimitPersistence.class)
1093            protected SocialActivityLimitPersistence socialActivityLimitPersistence;
1094            @BeanReference(type = SocialActivitySetLocalService.class)
1095            protected SocialActivitySetLocalService socialActivitySetLocalService;
1096            @BeanReference(type = SocialActivitySetPersistence.class)
1097            protected SocialActivitySetPersistence socialActivitySetPersistence;
1098            @BeanReference(type = SocialActivitySettingLocalService.class)
1099            protected SocialActivitySettingLocalService socialActivitySettingLocalService;
1100            @BeanReference(type = SocialActivitySettingService.class)
1101            protected SocialActivitySettingService socialActivitySettingService;
1102            @BeanReference(type = SocialActivitySettingPersistence.class)
1103            protected SocialActivitySettingPersistence socialActivitySettingPersistence;
1104            @BeanReference(type = SocialRelationLocalService.class)
1105            protected SocialRelationLocalService socialRelationLocalService;
1106            @BeanReference(type = SocialRelationPersistence.class)
1107            protected SocialRelationPersistence socialRelationPersistence;
1108            @BeanReference(type = SocialRequestLocalService.class)
1109            protected SocialRequestLocalService socialRequestLocalService;
1110            @BeanReference(type = SocialRequestService.class)
1111            protected SocialRequestService socialRequestService;
1112            @BeanReference(type = SocialRequestPersistence.class)
1113            protected SocialRequestPersistence socialRequestPersistence;
1114            @BeanReference(type = SocialRequestInterpreterLocalService.class)
1115            protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
1116            @BeanReference(type = CounterLocalService.class)
1117            protected CounterLocalService counterLocalService;
1118            @BeanReference(type = GroupLocalService.class)
1119            protected GroupLocalService groupLocalService;
1120            @BeanReference(type = GroupService.class)
1121            protected GroupService groupService;
1122            @BeanReference(type = GroupPersistence.class)
1123            protected GroupPersistence groupPersistence;
1124            @BeanReference(type = GroupFinder.class)
1125            protected GroupFinder groupFinder;
1126            @BeanReference(type = LockLocalService.class)
1127            protected LockLocalService lockLocalService;
1128            @BeanReference(type = LockPersistence.class)
1129            protected LockPersistence lockPersistence;
1130            @BeanReference(type = LockFinder.class)
1131            protected LockFinder lockFinder;
1132            @BeanReference(type = ResourceLocalService.class)
1133            protected ResourceLocalService resourceLocalService;
1134            @BeanReference(type = UserLocalService.class)
1135            protected UserLocalService userLocalService;
1136            @BeanReference(type = UserService.class)
1137            protected UserService userService;
1138            @BeanReference(type = UserPersistence.class)
1139            protected UserPersistence userPersistence;
1140            @BeanReference(type = UserFinder.class)
1141            protected UserFinder userFinder;
1142            @BeanReference(type = AssetEntryLocalService.class)
1143            protected AssetEntryLocalService assetEntryLocalService;
1144            @BeanReference(type = AssetEntryService.class)
1145            protected AssetEntryService assetEntryService;
1146            @BeanReference(type = AssetEntryPersistence.class)
1147            protected AssetEntryPersistence assetEntryPersistence;
1148            @BeanReference(type = AssetEntryFinder.class)
1149            protected AssetEntryFinder assetEntryFinder;
1150            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1151            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1152            private String _beanIdentifier;
1153    }