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