001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.messageboards.service.base;
016    
017    import com.liferay.counter.service.CounterLocalService;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024    import com.liferay.portal.kernel.exception.PortalException;
025    import com.liferay.portal.kernel.exception.SystemException;
026    import com.liferay.portal.kernel.log.Log;
027    import com.liferay.portal.kernel.log.LogFactoryUtil;
028    import com.liferay.portal.kernel.search.Indexer;
029    import com.liferay.portal.kernel.search.IndexerRegistryUtil;
030    import com.liferay.portal.kernel.search.SearchException;
031    import com.liferay.portal.kernel.util.OrderByComparator;
032    import com.liferay.portal.model.PersistedModel;
033    import com.liferay.portal.service.GroupLocalService;
034    import com.liferay.portal.service.GroupService;
035    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
036    import com.liferay.portal.service.ResourceLocalService;
037    import com.liferay.portal.service.ResourceService;
038    import com.liferay.portal.service.UserLocalService;
039    import com.liferay.portal.service.UserService;
040    import com.liferay.portal.service.persistence.GroupFinder;
041    import com.liferay.portal.service.persistence.GroupPersistence;
042    import com.liferay.portal.service.persistence.ResourceFinder;
043    import com.liferay.portal.service.persistence.ResourcePersistence;
044    import com.liferay.portal.service.persistence.UserFinder;
045    import com.liferay.portal.service.persistence.UserPersistence;
046    
047    import com.liferay.portlet.messageboards.model.MBStatsUser;
048    import com.liferay.portlet.messageboards.service.MBBanLocalService;
049    import com.liferay.portlet.messageboards.service.MBBanService;
050    import com.liferay.portlet.messageboards.service.MBCategoryLocalService;
051    import com.liferay.portlet.messageboards.service.MBCategoryService;
052    import com.liferay.portlet.messageboards.service.MBDiscussionLocalService;
053    import com.liferay.portlet.messageboards.service.MBMailingListLocalService;
054    import com.liferay.portlet.messageboards.service.MBMessageLocalService;
055    import com.liferay.portlet.messageboards.service.MBMessageService;
056    import com.liferay.portlet.messageboards.service.MBStatsUserLocalService;
057    import com.liferay.portlet.messageboards.service.MBThreadFlagLocalService;
058    import com.liferay.portlet.messageboards.service.MBThreadLocalService;
059    import com.liferay.portlet.messageboards.service.MBThreadService;
060    import com.liferay.portlet.messageboards.service.persistence.MBBanPersistence;
061    import com.liferay.portlet.messageboards.service.persistence.MBCategoryFinder;
062    import com.liferay.portlet.messageboards.service.persistence.MBCategoryPersistence;
063    import com.liferay.portlet.messageboards.service.persistence.MBDiscussionPersistence;
064    import com.liferay.portlet.messageboards.service.persistence.MBMailingListPersistence;
065    import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
066    import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
067    import com.liferay.portlet.messageboards.service.persistence.MBStatsUserPersistence;
068    import com.liferay.portlet.messageboards.service.persistence.MBThreadFinder;
069    import com.liferay.portlet.messageboards.service.persistence.MBThreadFlagPersistence;
070    import com.liferay.portlet.messageboards.service.persistence.MBThreadPersistence;
071    
072    import java.io.Serializable;
073    
074    import java.util.List;
075    
076    import javax.sql.DataSource;
077    
078    /**
079     * The base implementation of the message boards stats user local service.
080     *
081     * <p>
082     * 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.messageboards.service.impl.MBStatsUserLocalServiceImpl}.
083     * </p>
084     *
085     * @author Brian Wing Shun Chan
086     * @see com.liferay.portlet.messageboards.service.impl.MBStatsUserLocalServiceImpl
087     * @see com.liferay.portlet.messageboards.service.MBStatsUserLocalServiceUtil
088     * @generated
089     */
090    public abstract class MBStatsUserLocalServiceBaseImpl
091            implements MBStatsUserLocalService, IdentifiableBean {
092            /*
093             * NOTE FOR DEVELOPERS:
094             *
095             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.messageboards.service.MBStatsUserLocalServiceUtil} to access the message boards stats user local service.
096             */
097    
098            /**
099             * Adds the message boards stats user to the database. Also notifies the appropriate model listeners.
100             *
101             * @param mbStatsUser the message boards stats user
102             * @return the message boards stats user that was added
103             * @throws SystemException if a system exception occurred
104             */
105            public MBStatsUser addMBStatsUser(MBStatsUser mbStatsUser)
106                    throws SystemException {
107                    mbStatsUser.setNew(true);
108    
109                    mbStatsUser = mbStatsUserPersistence.update(mbStatsUser, false);
110    
111                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
112    
113                    if (indexer != null) {
114                            try {
115                                    indexer.reindex(mbStatsUser);
116                            }
117                            catch (SearchException se) {
118                                    if (_log.isWarnEnabled()) {
119                                            _log.warn(se, se);
120                                    }
121                            }
122                    }
123    
124                    return mbStatsUser;
125            }
126    
127            /**
128             * Creates a new message boards stats user with the primary key. Does not add the message boards stats user to the database.
129             *
130             * @param statsUserId the primary key for the new message boards stats user
131             * @return the new message boards stats user
132             */
133            public MBStatsUser createMBStatsUser(long statsUserId) {
134                    return mbStatsUserPersistence.create(statsUserId);
135            }
136    
137            /**
138             * Deletes the message boards stats user with the primary key from the database. Also notifies the appropriate model listeners.
139             *
140             * @param statsUserId the primary key of the message boards stats user
141             * @throws PortalException if a message boards stats user with the primary key could not be found
142             * @throws SystemException if a system exception occurred
143             */
144            public void deleteMBStatsUser(long statsUserId)
145                    throws PortalException, SystemException {
146                    MBStatsUser mbStatsUser = mbStatsUserPersistence.remove(statsUserId);
147    
148                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
149    
150                    if (indexer != null) {
151                            try {
152                                    indexer.delete(mbStatsUser);
153                            }
154                            catch (SearchException se) {
155                                    if (_log.isWarnEnabled()) {
156                                            _log.warn(se, se);
157                                    }
158                            }
159                    }
160            }
161    
162            /**
163             * Deletes the message boards stats user from the database. Also notifies the appropriate model listeners.
164             *
165             * @param mbStatsUser the message boards stats user
166             * @throws SystemException if a system exception occurred
167             */
168            public void deleteMBStatsUser(MBStatsUser mbStatsUser)
169                    throws SystemException {
170                    mbStatsUserPersistence.remove(mbStatsUser);
171    
172                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
173    
174                    if (indexer != null) {
175                            try {
176                                    indexer.delete(mbStatsUser);
177                            }
178                            catch (SearchException se) {
179                                    if (_log.isWarnEnabled()) {
180                                            _log.warn(se, se);
181                                    }
182                            }
183                    }
184            }
185    
186            /**
187             * Performs a dynamic query on the database and returns the matching rows.
188             *
189             * @param dynamicQuery the dynamic query
190             * @return the matching rows
191             * @throws SystemException if a system exception occurred
192             */
193            @SuppressWarnings("rawtypes")
194            public List dynamicQuery(DynamicQuery dynamicQuery)
195                    throws SystemException {
196                    return mbStatsUserPersistence.findWithDynamicQuery(dynamicQuery);
197            }
198    
199            /**
200             * Performs a dynamic query on the database and returns a range of the matching rows.
201             *
202             * <p>
203             * 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.
204             * </p>
205             *
206             * @param dynamicQuery the dynamic query
207             * @param start the lower bound of the range of model instances
208             * @param end the upper bound of the range of model instances (not inclusive)
209             * @return the range of matching rows
210             * @throws SystemException if a system exception occurred
211             */
212            @SuppressWarnings("rawtypes")
213            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
214                    throws SystemException {
215                    return mbStatsUserPersistence.findWithDynamicQuery(dynamicQuery, start,
216                            end);
217            }
218    
219            /**
220             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
221             *
222             * <p>
223             * 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.
224             * </p>
225             *
226             * @param dynamicQuery the dynamic query
227             * @param start the lower bound of the range of model instances
228             * @param end the upper bound of the range of model instances (not inclusive)
229             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
230             * @return the ordered range of matching rows
231             * @throws SystemException if a system exception occurred
232             */
233            @SuppressWarnings("rawtypes")
234            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
235                    OrderByComparator orderByComparator) throws SystemException {
236                    return mbStatsUserPersistence.findWithDynamicQuery(dynamicQuery, start,
237                            end, orderByComparator);
238            }
239    
240            /**
241             * Returns the number of rows that match the dynamic query.
242             *
243             * @param dynamicQuery the dynamic query
244             * @return the number of rows that match the dynamic query
245             * @throws SystemException if a system exception occurred
246             */
247            public long dynamicQueryCount(DynamicQuery dynamicQuery)
248                    throws SystemException {
249                    return mbStatsUserPersistence.countWithDynamicQuery(dynamicQuery);
250            }
251    
252            public MBStatsUser fetchMBStatsUser(long statsUserId)
253                    throws SystemException {
254                    return mbStatsUserPersistence.fetchByPrimaryKey(statsUserId);
255            }
256    
257            /**
258             * Returns the message boards stats user with the primary key.
259             *
260             * @param statsUserId the primary key of the message boards stats user
261             * @return the message boards stats user
262             * @throws PortalException if a message boards stats user with the primary key could not be found
263             * @throws SystemException if a system exception occurred
264             */
265            public MBStatsUser getMBStatsUser(long statsUserId)
266                    throws PortalException, SystemException {
267                    return mbStatsUserPersistence.findByPrimaryKey(statsUserId);
268            }
269    
270            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
271                    throws PortalException, SystemException {
272                    return mbStatsUserPersistence.findByPrimaryKey(primaryKeyObj);
273            }
274    
275            /**
276             * Returns a range of all the message boards stats users.
277             *
278             * <p>
279             * 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.
280             * </p>
281             *
282             * @param start the lower bound of the range of message boards stats users
283             * @param end the upper bound of the range of message boards stats users (not inclusive)
284             * @return the range of message boards stats users
285             * @throws SystemException if a system exception occurred
286             */
287            public List<MBStatsUser> getMBStatsUsers(int start, int end)
288                    throws SystemException {
289                    return mbStatsUserPersistence.findAll(start, end);
290            }
291    
292            /**
293             * Returns the number of message boards stats users.
294             *
295             * @return the number of message boards stats users
296             * @throws SystemException if a system exception occurred
297             */
298            public int getMBStatsUsersCount() throws SystemException {
299                    return mbStatsUserPersistence.countAll();
300            }
301    
302            /**
303             * Updates the message boards stats user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
304             *
305             * @param mbStatsUser the message boards stats user
306             * @return the message boards stats user that was updated
307             * @throws SystemException if a system exception occurred
308             */
309            public MBStatsUser updateMBStatsUser(MBStatsUser mbStatsUser)
310                    throws SystemException {
311                    return updateMBStatsUser(mbStatsUser, true);
312            }
313    
314            /**
315             * Updates the message boards stats user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
316             *
317             * @param mbStatsUser the message boards stats user
318             * @param merge whether to merge the message boards stats user 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.
319             * @return the message boards stats user that was updated
320             * @throws SystemException if a system exception occurred
321             */
322            public MBStatsUser updateMBStatsUser(MBStatsUser mbStatsUser, boolean merge)
323                    throws SystemException {
324                    mbStatsUser.setNew(false);
325    
326                    mbStatsUser = mbStatsUserPersistence.update(mbStatsUser, merge);
327    
328                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
329    
330                    if (indexer != null) {
331                            try {
332                                    indexer.reindex(mbStatsUser);
333                            }
334                            catch (SearchException se) {
335                                    if (_log.isWarnEnabled()) {
336                                            _log.warn(se, se);
337                                    }
338                            }
339                    }
340    
341                    return mbStatsUser;
342            }
343    
344            /**
345             * Returns the message boards ban local service.
346             *
347             * @return the message boards ban local service
348             */
349            public MBBanLocalService getMBBanLocalService() {
350                    return mbBanLocalService;
351            }
352    
353            /**
354             * Sets the message boards ban local service.
355             *
356             * @param mbBanLocalService the message boards ban local service
357             */
358            public void setMBBanLocalService(MBBanLocalService mbBanLocalService) {
359                    this.mbBanLocalService = mbBanLocalService;
360            }
361    
362            /**
363             * Returns the message boards ban remote service.
364             *
365             * @return the message boards ban remote service
366             */
367            public MBBanService getMBBanService() {
368                    return mbBanService;
369            }
370    
371            /**
372             * Sets the message boards ban remote service.
373             *
374             * @param mbBanService the message boards ban remote service
375             */
376            public void setMBBanService(MBBanService mbBanService) {
377                    this.mbBanService = mbBanService;
378            }
379    
380            /**
381             * Returns the message boards ban persistence.
382             *
383             * @return the message boards ban persistence
384             */
385            public MBBanPersistence getMBBanPersistence() {
386                    return mbBanPersistence;
387            }
388    
389            /**
390             * Sets the message boards ban persistence.
391             *
392             * @param mbBanPersistence the message boards ban persistence
393             */
394            public void setMBBanPersistence(MBBanPersistence mbBanPersistence) {
395                    this.mbBanPersistence = mbBanPersistence;
396            }
397    
398            /**
399             * Returns the message boards category local service.
400             *
401             * @return the message boards category local service
402             */
403            public MBCategoryLocalService getMBCategoryLocalService() {
404                    return mbCategoryLocalService;
405            }
406    
407            /**
408             * Sets the message boards category local service.
409             *
410             * @param mbCategoryLocalService the message boards category local service
411             */
412            public void setMBCategoryLocalService(
413                    MBCategoryLocalService mbCategoryLocalService) {
414                    this.mbCategoryLocalService = mbCategoryLocalService;
415            }
416    
417            /**
418             * Returns the message boards category remote service.
419             *
420             * @return the message boards category remote service
421             */
422            public MBCategoryService getMBCategoryService() {
423                    return mbCategoryService;
424            }
425    
426            /**
427             * Sets the message boards category remote service.
428             *
429             * @param mbCategoryService the message boards category remote service
430             */
431            public void setMBCategoryService(MBCategoryService mbCategoryService) {
432                    this.mbCategoryService = mbCategoryService;
433            }
434    
435            /**
436             * Returns the message boards category persistence.
437             *
438             * @return the message boards category persistence
439             */
440            public MBCategoryPersistence getMBCategoryPersistence() {
441                    return mbCategoryPersistence;
442            }
443    
444            /**
445             * Sets the message boards category persistence.
446             *
447             * @param mbCategoryPersistence the message boards category persistence
448             */
449            public void setMBCategoryPersistence(
450                    MBCategoryPersistence mbCategoryPersistence) {
451                    this.mbCategoryPersistence = mbCategoryPersistence;
452            }
453    
454            /**
455             * Returns the message boards category finder.
456             *
457             * @return the message boards category finder
458             */
459            public MBCategoryFinder getMBCategoryFinder() {
460                    return mbCategoryFinder;
461            }
462    
463            /**
464             * Sets the message boards category finder.
465             *
466             * @param mbCategoryFinder the message boards category finder
467             */
468            public void setMBCategoryFinder(MBCategoryFinder mbCategoryFinder) {
469                    this.mbCategoryFinder = mbCategoryFinder;
470            }
471    
472            /**
473             * Returns the message boards discussion local service.
474             *
475             * @return the message boards discussion local service
476             */
477            public MBDiscussionLocalService getMBDiscussionLocalService() {
478                    return mbDiscussionLocalService;
479            }
480    
481            /**
482             * Sets the message boards discussion local service.
483             *
484             * @param mbDiscussionLocalService the message boards discussion local service
485             */
486            public void setMBDiscussionLocalService(
487                    MBDiscussionLocalService mbDiscussionLocalService) {
488                    this.mbDiscussionLocalService = mbDiscussionLocalService;
489            }
490    
491            /**
492             * Returns the message boards discussion persistence.
493             *
494             * @return the message boards discussion persistence
495             */
496            public MBDiscussionPersistence getMBDiscussionPersistence() {
497                    return mbDiscussionPersistence;
498            }
499    
500            /**
501             * Sets the message boards discussion persistence.
502             *
503             * @param mbDiscussionPersistence the message boards discussion persistence
504             */
505            public void setMBDiscussionPersistence(
506                    MBDiscussionPersistence mbDiscussionPersistence) {
507                    this.mbDiscussionPersistence = mbDiscussionPersistence;
508            }
509    
510            /**
511             * Returns the message boards mailing list local service.
512             *
513             * @return the message boards mailing list local service
514             */
515            public MBMailingListLocalService getMBMailingListLocalService() {
516                    return mbMailingListLocalService;
517            }
518    
519            /**
520             * Sets the message boards mailing list local service.
521             *
522             * @param mbMailingListLocalService the message boards mailing list local service
523             */
524            public void setMBMailingListLocalService(
525                    MBMailingListLocalService mbMailingListLocalService) {
526                    this.mbMailingListLocalService = mbMailingListLocalService;
527            }
528    
529            /**
530             * Returns the message boards mailing list persistence.
531             *
532             * @return the message boards mailing list persistence
533             */
534            public MBMailingListPersistence getMBMailingListPersistence() {
535                    return mbMailingListPersistence;
536            }
537    
538            /**
539             * Sets the message boards mailing list persistence.
540             *
541             * @param mbMailingListPersistence the message boards mailing list persistence
542             */
543            public void setMBMailingListPersistence(
544                    MBMailingListPersistence mbMailingListPersistence) {
545                    this.mbMailingListPersistence = mbMailingListPersistence;
546            }
547    
548            /**
549             * Returns the message-boards message local service.
550             *
551             * @return the message-boards message local service
552             */
553            public MBMessageLocalService getMBMessageLocalService() {
554                    return mbMessageLocalService;
555            }
556    
557            /**
558             * Sets the message-boards message local service.
559             *
560             * @param mbMessageLocalService the message-boards message local service
561             */
562            public void setMBMessageLocalService(
563                    MBMessageLocalService mbMessageLocalService) {
564                    this.mbMessageLocalService = mbMessageLocalService;
565            }
566    
567            /**
568             * Returns the message-boards message remote service.
569             *
570             * @return the message-boards message remote service
571             */
572            public MBMessageService getMBMessageService() {
573                    return mbMessageService;
574            }
575    
576            /**
577             * Sets the message-boards message remote service.
578             *
579             * @param mbMessageService the message-boards message remote service
580             */
581            public void setMBMessageService(MBMessageService mbMessageService) {
582                    this.mbMessageService = mbMessageService;
583            }
584    
585            /**
586             * Returns the message-boards message persistence.
587             *
588             * @return the message-boards message persistence
589             */
590            public MBMessagePersistence getMBMessagePersistence() {
591                    return mbMessagePersistence;
592            }
593    
594            /**
595             * Sets the message-boards message persistence.
596             *
597             * @param mbMessagePersistence the message-boards message persistence
598             */
599            public void setMBMessagePersistence(
600                    MBMessagePersistence mbMessagePersistence) {
601                    this.mbMessagePersistence = mbMessagePersistence;
602            }
603    
604            /**
605             * Returns the message-boards message finder.
606             *
607             * @return the message-boards message finder
608             */
609            public MBMessageFinder getMBMessageFinder() {
610                    return mbMessageFinder;
611            }
612    
613            /**
614             * Sets the message-boards message finder.
615             *
616             * @param mbMessageFinder the message-boards message finder
617             */
618            public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
619                    this.mbMessageFinder = mbMessageFinder;
620            }
621    
622            /**
623             * Returns the message boards stats user local service.
624             *
625             * @return the message boards stats user local service
626             */
627            public MBStatsUserLocalService getMBStatsUserLocalService() {
628                    return mbStatsUserLocalService;
629            }
630    
631            /**
632             * Sets the message boards stats user local service.
633             *
634             * @param mbStatsUserLocalService the message boards stats user local service
635             */
636            public void setMBStatsUserLocalService(
637                    MBStatsUserLocalService mbStatsUserLocalService) {
638                    this.mbStatsUserLocalService = mbStatsUserLocalService;
639            }
640    
641            /**
642             * Returns the message boards stats user persistence.
643             *
644             * @return the message boards stats user persistence
645             */
646            public MBStatsUserPersistence getMBStatsUserPersistence() {
647                    return mbStatsUserPersistence;
648            }
649    
650            /**
651             * Sets the message boards stats user persistence.
652             *
653             * @param mbStatsUserPersistence the message boards stats user persistence
654             */
655            public void setMBStatsUserPersistence(
656                    MBStatsUserPersistence mbStatsUserPersistence) {
657                    this.mbStatsUserPersistence = mbStatsUserPersistence;
658            }
659    
660            /**
661             * Returns the message boards thread local service.
662             *
663             * @return the message boards thread local service
664             */
665            public MBThreadLocalService getMBThreadLocalService() {
666                    return mbThreadLocalService;
667            }
668    
669            /**
670             * Sets the message boards thread local service.
671             *
672             * @param mbThreadLocalService the message boards thread local service
673             */
674            public void setMBThreadLocalService(
675                    MBThreadLocalService mbThreadLocalService) {
676                    this.mbThreadLocalService = mbThreadLocalService;
677            }
678    
679            /**
680             * Returns the message boards thread remote service.
681             *
682             * @return the message boards thread remote service
683             */
684            public MBThreadService getMBThreadService() {
685                    return mbThreadService;
686            }
687    
688            /**
689             * Sets the message boards thread remote service.
690             *
691             * @param mbThreadService the message boards thread remote service
692             */
693            public void setMBThreadService(MBThreadService mbThreadService) {
694                    this.mbThreadService = mbThreadService;
695            }
696    
697            /**
698             * Returns the message boards thread persistence.
699             *
700             * @return the message boards thread persistence
701             */
702            public MBThreadPersistence getMBThreadPersistence() {
703                    return mbThreadPersistence;
704            }
705    
706            /**
707             * Sets the message boards thread persistence.
708             *
709             * @param mbThreadPersistence the message boards thread persistence
710             */
711            public void setMBThreadPersistence(MBThreadPersistence mbThreadPersistence) {
712                    this.mbThreadPersistence = mbThreadPersistence;
713            }
714    
715            /**
716             * Returns the message boards thread finder.
717             *
718             * @return the message boards thread finder
719             */
720            public MBThreadFinder getMBThreadFinder() {
721                    return mbThreadFinder;
722            }
723    
724            /**
725             * Sets the message boards thread finder.
726             *
727             * @param mbThreadFinder the message boards thread finder
728             */
729            public void setMBThreadFinder(MBThreadFinder mbThreadFinder) {
730                    this.mbThreadFinder = mbThreadFinder;
731            }
732    
733            /**
734             * Returns the message boards thread flag local service.
735             *
736             * @return the message boards thread flag local service
737             */
738            public MBThreadFlagLocalService getMBThreadFlagLocalService() {
739                    return mbThreadFlagLocalService;
740            }
741    
742            /**
743             * Sets the message boards thread flag local service.
744             *
745             * @param mbThreadFlagLocalService the message boards thread flag local service
746             */
747            public void setMBThreadFlagLocalService(
748                    MBThreadFlagLocalService mbThreadFlagLocalService) {
749                    this.mbThreadFlagLocalService = mbThreadFlagLocalService;
750            }
751    
752            /**
753             * Returns the message boards thread flag persistence.
754             *
755             * @return the message boards thread flag persistence
756             */
757            public MBThreadFlagPersistence getMBThreadFlagPersistence() {
758                    return mbThreadFlagPersistence;
759            }
760    
761            /**
762             * Sets the message boards thread flag persistence.
763             *
764             * @param mbThreadFlagPersistence the message boards thread flag persistence
765             */
766            public void setMBThreadFlagPersistence(
767                    MBThreadFlagPersistence mbThreadFlagPersistence) {
768                    this.mbThreadFlagPersistence = mbThreadFlagPersistence;
769            }
770    
771            /**
772             * Returns the counter local service.
773             *
774             * @return the counter local service
775             */
776            public CounterLocalService getCounterLocalService() {
777                    return counterLocalService;
778            }
779    
780            /**
781             * Sets the counter local service.
782             *
783             * @param counterLocalService the counter local service
784             */
785            public void setCounterLocalService(CounterLocalService counterLocalService) {
786                    this.counterLocalService = counterLocalService;
787            }
788    
789            /**
790             * Returns the group local service.
791             *
792             * @return the group local service
793             */
794            public GroupLocalService getGroupLocalService() {
795                    return groupLocalService;
796            }
797    
798            /**
799             * Sets the group local service.
800             *
801             * @param groupLocalService the group local service
802             */
803            public void setGroupLocalService(GroupLocalService groupLocalService) {
804                    this.groupLocalService = groupLocalService;
805            }
806    
807            /**
808             * Returns the group remote service.
809             *
810             * @return the group remote service
811             */
812            public GroupService getGroupService() {
813                    return groupService;
814            }
815    
816            /**
817             * Sets the group remote service.
818             *
819             * @param groupService the group remote service
820             */
821            public void setGroupService(GroupService groupService) {
822                    this.groupService = groupService;
823            }
824    
825            /**
826             * Returns the group persistence.
827             *
828             * @return the group persistence
829             */
830            public GroupPersistence getGroupPersistence() {
831                    return groupPersistence;
832            }
833    
834            /**
835             * Sets the group persistence.
836             *
837             * @param groupPersistence the group persistence
838             */
839            public void setGroupPersistence(GroupPersistence groupPersistence) {
840                    this.groupPersistence = groupPersistence;
841            }
842    
843            /**
844             * Returns the group finder.
845             *
846             * @return the group finder
847             */
848            public GroupFinder getGroupFinder() {
849                    return groupFinder;
850            }
851    
852            /**
853             * Sets the group finder.
854             *
855             * @param groupFinder the group finder
856             */
857            public void setGroupFinder(GroupFinder groupFinder) {
858                    this.groupFinder = groupFinder;
859            }
860    
861            /**
862             * Returns the resource local service.
863             *
864             * @return the resource local service
865             */
866            public ResourceLocalService getResourceLocalService() {
867                    return resourceLocalService;
868            }
869    
870            /**
871             * Sets the resource local service.
872             *
873             * @param resourceLocalService the resource local service
874             */
875            public void setResourceLocalService(
876                    ResourceLocalService resourceLocalService) {
877                    this.resourceLocalService = resourceLocalService;
878            }
879    
880            /**
881             * Returns the resource remote service.
882             *
883             * @return the resource remote service
884             */
885            public ResourceService getResourceService() {
886                    return resourceService;
887            }
888    
889            /**
890             * Sets the resource remote service.
891             *
892             * @param resourceService the resource remote service
893             */
894            public void setResourceService(ResourceService resourceService) {
895                    this.resourceService = resourceService;
896            }
897    
898            /**
899             * Returns the resource persistence.
900             *
901             * @return the resource persistence
902             */
903            public ResourcePersistence getResourcePersistence() {
904                    return resourcePersistence;
905            }
906    
907            /**
908             * Sets the resource persistence.
909             *
910             * @param resourcePersistence the resource persistence
911             */
912            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
913                    this.resourcePersistence = resourcePersistence;
914            }
915    
916            /**
917             * Returns the resource finder.
918             *
919             * @return the resource finder
920             */
921            public ResourceFinder getResourceFinder() {
922                    return resourceFinder;
923            }
924    
925            /**
926             * Sets the resource finder.
927             *
928             * @param resourceFinder the resource finder
929             */
930            public void setResourceFinder(ResourceFinder resourceFinder) {
931                    this.resourceFinder = resourceFinder;
932            }
933    
934            /**
935             * Returns the user local service.
936             *
937             * @return the user local service
938             */
939            public UserLocalService getUserLocalService() {
940                    return userLocalService;
941            }
942    
943            /**
944             * Sets the user local service.
945             *
946             * @param userLocalService the user local service
947             */
948            public void setUserLocalService(UserLocalService userLocalService) {
949                    this.userLocalService = userLocalService;
950            }
951    
952            /**
953             * Returns the user remote service.
954             *
955             * @return the user remote service
956             */
957            public UserService getUserService() {
958                    return userService;
959            }
960    
961            /**
962             * Sets the user remote service.
963             *
964             * @param userService the user remote service
965             */
966            public void setUserService(UserService userService) {
967                    this.userService = userService;
968            }
969    
970            /**
971             * Returns the user persistence.
972             *
973             * @return the user persistence
974             */
975            public UserPersistence getUserPersistence() {
976                    return userPersistence;
977            }
978    
979            /**
980             * Sets the user persistence.
981             *
982             * @param userPersistence the user persistence
983             */
984            public void setUserPersistence(UserPersistence userPersistence) {
985                    this.userPersistence = userPersistence;
986            }
987    
988            /**
989             * Returns the user finder.
990             *
991             * @return the user finder
992             */
993            public UserFinder getUserFinder() {
994                    return userFinder;
995            }
996    
997            /**
998             * Sets the user finder.
999             *
1000             * @param userFinder the user finder
1001             */
1002            public void setUserFinder(UserFinder userFinder) {
1003                    this.userFinder = userFinder;
1004            }
1005    
1006            public void afterPropertiesSet() {
1007                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.messageboards.model.MBStatsUser",
1008                            mbStatsUserLocalService);
1009            }
1010    
1011            public void destroy() {
1012                    persistedModelLocalServiceRegistry.unregister(
1013                            "com.liferay.portlet.messageboards.model.MBStatsUser");
1014            }
1015    
1016            /**
1017             * Returns the Spring bean ID for this bean.
1018             *
1019             * @return the Spring bean ID for this bean
1020             */
1021            public String getBeanIdentifier() {
1022                    return _beanIdentifier;
1023            }
1024    
1025            /**
1026             * Sets the Spring bean ID for this bean.
1027             *
1028             * @param beanIdentifier the Spring bean ID for this bean
1029             */
1030            public void setBeanIdentifier(String beanIdentifier) {
1031                    _beanIdentifier = beanIdentifier;
1032            }
1033    
1034            protected ClassLoader getClassLoader() {
1035                    Class<?> clazz = getClass();
1036    
1037                    return clazz.getClassLoader();
1038            }
1039    
1040            protected Class<?> getModelClass() {
1041                    return MBStatsUser.class;
1042            }
1043    
1044            protected String getModelClassName() {
1045                    return MBStatsUser.class.getName();
1046            }
1047    
1048            /**
1049             * Performs an SQL query.
1050             *
1051             * @param sql the sql query
1052             */
1053            protected void runSQL(String sql) throws SystemException {
1054                    try {
1055                            DataSource dataSource = mbStatsUserPersistence.getDataSource();
1056    
1057                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1058                                            sql, new int[0]);
1059    
1060                            sqlUpdate.update();
1061                    }
1062                    catch (Exception e) {
1063                            throw new SystemException(e);
1064                    }
1065            }
1066    
1067            @BeanReference(type = MBBanLocalService.class)
1068            protected MBBanLocalService mbBanLocalService;
1069            @BeanReference(type = MBBanService.class)
1070            protected MBBanService mbBanService;
1071            @BeanReference(type = MBBanPersistence.class)
1072            protected MBBanPersistence mbBanPersistence;
1073            @BeanReference(type = MBCategoryLocalService.class)
1074            protected MBCategoryLocalService mbCategoryLocalService;
1075            @BeanReference(type = MBCategoryService.class)
1076            protected MBCategoryService mbCategoryService;
1077            @BeanReference(type = MBCategoryPersistence.class)
1078            protected MBCategoryPersistence mbCategoryPersistence;
1079            @BeanReference(type = MBCategoryFinder.class)
1080            protected MBCategoryFinder mbCategoryFinder;
1081            @BeanReference(type = MBDiscussionLocalService.class)
1082            protected MBDiscussionLocalService mbDiscussionLocalService;
1083            @BeanReference(type = MBDiscussionPersistence.class)
1084            protected MBDiscussionPersistence mbDiscussionPersistence;
1085            @BeanReference(type = MBMailingListLocalService.class)
1086            protected MBMailingListLocalService mbMailingListLocalService;
1087            @BeanReference(type = MBMailingListPersistence.class)
1088            protected MBMailingListPersistence mbMailingListPersistence;
1089            @BeanReference(type = MBMessageLocalService.class)
1090            protected MBMessageLocalService mbMessageLocalService;
1091            @BeanReference(type = MBMessageService.class)
1092            protected MBMessageService mbMessageService;
1093            @BeanReference(type = MBMessagePersistence.class)
1094            protected MBMessagePersistence mbMessagePersistence;
1095            @BeanReference(type = MBMessageFinder.class)
1096            protected MBMessageFinder mbMessageFinder;
1097            @BeanReference(type = MBStatsUserLocalService.class)
1098            protected MBStatsUserLocalService mbStatsUserLocalService;
1099            @BeanReference(type = MBStatsUserPersistence.class)
1100            protected MBStatsUserPersistence mbStatsUserPersistence;
1101            @BeanReference(type = MBThreadLocalService.class)
1102            protected MBThreadLocalService mbThreadLocalService;
1103            @BeanReference(type = MBThreadService.class)
1104            protected MBThreadService mbThreadService;
1105            @BeanReference(type = MBThreadPersistence.class)
1106            protected MBThreadPersistence mbThreadPersistence;
1107            @BeanReference(type = MBThreadFinder.class)
1108            protected MBThreadFinder mbThreadFinder;
1109            @BeanReference(type = MBThreadFlagLocalService.class)
1110            protected MBThreadFlagLocalService mbThreadFlagLocalService;
1111            @BeanReference(type = MBThreadFlagPersistence.class)
1112            protected MBThreadFlagPersistence mbThreadFlagPersistence;
1113            @BeanReference(type = CounterLocalService.class)
1114            protected CounterLocalService counterLocalService;
1115            @BeanReference(type = GroupLocalService.class)
1116            protected GroupLocalService groupLocalService;
1117            @BeanReference(type = GroupService.class)
1118            protected GroupService groupService;
1119            @BeanReference(type = GroupPersistence.class)
1120            protected GroupPersistence groupPersistence;
1121            @BeanReference(type = GroupFinder.class)
1122            protected GroupFinder groupFinder;
1123            @BeanReference(type = ResourceLocalService.class)
1124            protected ResourceLocalService resourceLocalService;
1125            @BeanReference(type = ResourceService.class)
1126            protected ResourceService resourceService;
1127            @BeanReference(type = ResourcePersistence.class)
1128            protected ResourcePersistence resourcePersistence;
1129            @BeanReference(type = ResourceFinder.class)
1130            protected ResourceFinder resourceFinder;
1131            @BeanReference(type = UserLocalService.class)
1132            protected UserLocalService userLocalService;
1133            @BeanReference(type = UserService.class)
1134            protected UserService userService;
1135            @BeanReference(type = UserPersistence.class)
1136            protected UserPersistence userPersistence;
1137            @BeanReference(type = UserFinder.class)
1138            protected UserFinder userFinder;
1139            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1140            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1141            private static Log _log = LogFactoryUtil.getLog(MBStatsUserLocalServiceBaseImpl.class);
1142            private String _beanIdentifier;
1143    }