001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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.annotation.BeanReference;
020    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
023    import com.liferay.portal.kernel.exception.PortalException;
024    import com.liferay.portal.kernel.exception.SystemException;
025    import com.liferay.portal.kernel.util.OrderByComparator;
026    import com.liferay.portal.service.ResourceLocalService;
027    import com.liferay.portal.service.ResourceService;
028    import com.liferay.portal.service.UserLocalService;
029    import com.liferay.portal.service.UserService;
030    import com.liferay.portal.service.persistence.ResourceFinder;
031    import com.liferay.portal.service.persistence.ResourcePersistence;
032    import com.liferay.portal.service.persistence.UserFinder;
033    import com.liferay.portal.service.persistence.UserPersistence;
034    
035    import com.liferay.portlet.messageboards.model.MBMailingList;
036    import com.liferay.portlet.messageboards.service.MBBanLocalService;
037    import com.liferay.portlet.messageboards.service.MBBanService;
038    import com.liferay.portlet.messageboards.service.MBCategoryLocalService;
039    import com.liferay.portlet.messageboards.service.MBCategoryService;
040    import com.liferay.portlet.messageboards.service.MBDiscussionLocalService;
041    import com.liferay.portlet.messageboards.service.MBMailingListLocalService;
042    import com.liferay.portlet.messageboards.service.MBMessageFlagLocalService;
043    import com.liferay.portlet.messageboards.service.MBMessageFlagService;
044    import com.liferay.portlet.messageboards.service.MBMessageLocalService;
045    import com.liferay.portlet.messageboards.service.MBMessageService;
046    import com.liferay.portlet.messageboards.service.MBStatsUserLocalService;
047    import com.liferay.portlet.messageboards.service.MBThreadLocalService;
048    import com.liferay.portlet.messageboards.service.MBThreadService;
049    import com.liferay.portlet.messageboards.service.persistence.MBBanPersistence;
050    import com.liferay.portlet.messageboards.service.persistence.MBCategoryFinder;
051    import com.liferay.portlet.messageboards.service.persistence.MBCategoryPersistence;
052    import com.liferay.portlet.messageboards.service.persistence.MBDiscussionPersistence;
053    import com.liferay.portlet.messageboards.service.persistence.MBMailingListPersistence;
054    import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
055    import com.liferay.portlet.messageboards.service.persistence.MBMessageFlagPersistence;
056    import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
057    import com.liferay.portlet.messageboards.service.persistence.MBStatsUserPersistence;
058    import com.liferay.portlet.messageboards.service.persistence.MBThreadFinder;
059    import com.liferay.portlet.messageboards.service.persistence.MBThreadPersistence;
060    
061    import java.util.List;
062    
063    import javax.sql.DataSource;
064    
065    /**
066     * The base implementation of the message boards mailing list local service.
067     *
068     * <p>
069     * 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.MBMailingListLocalServiceImpl}.
070     * </p>
071     *
072     * <p>
073     * Never modify or reference this class directly. Always use {@link com.liferay.portlet.messageboards.service.MBMailingListLocalServiceUtil} to access the message boards mailing list local service.
074     * </p>
075     *
076     * @author Brian Wing Shun Chan
077     * @see com.liferay.portlet.messageboards.service.impl.MBMailingListLocalServiceImpl
078     * @see com.liferay.portlet.messageboards.service.MBMailingListLocalServiceUtil
079     * @generated
080     */
081    public abstract class MBMailingListLocalServiceBaseImpl
082            implements MBMailingListLocalService {
083            /**
084             * Adds the message boards mailing list to the database. Also notifies the appropriate model listeners.
085             *
086             * @param mbMailingList the message boards mailing list to add
087             * @return the message boards mailing list that was added
088             * @throws SystemException if a system exception occurred
089             */
090            public MBMailingList addMBMailingList(MBMailingList mbMailingList)
091                    throws SystemException {
092                    mbMailingList.setNew(true);
093    
094                    return mbMailingListPersistence.update(mbMailingList, false);
095            }
096    
097            /**
098             * Creates a new message boards mailing list with the primary key. Does not add the message boards mailing list to the database.
099             *
100             * @param mailingListId the primary key for the new message boards mailing list
101             * @return the new message boards mailing list
102             */
103            public MBMailingList createMBMailingList(long mailingListId) {
104                    return mbMailingListPersistence.create(mailingListId);
105            }
106    
107            /**
108             * Deletes the message boards mailing list with the primary key from the database. Also notifies the appropriate model listeners.
109             *
110             * @param mailingListId the primary key of the message boards mailing list to delete
111             * @throws PortalException if a message boards mailing list with the primary key could not be found
112             * @throws SystemException if a system exception occurred
113             */
114            public void deleteMBMailingList(long mailingListId)
115                    throws PortalException, SystemException {
116                    mbMailingListPersistence.remove(mailingListId);
117            }
118    
119            /**
120             * Deletes the message boards mailing list from the database. Also notifies the appropriate model listeners.
121             *
122             * @param mbMailingList the message boards mailing list to delete
123             * @throws SystemException if a system exception occurred
124             */
125            public void deleteMBMailingList(MBMailingList mbMailingList)
126                    throws SystemException {
127                    mbMailingListPersistence.remove(mbMailingList);
128            }
129    
130            /**
131             * Performs a dynamic query on the database and returns the matching rows.
132             *
133             * @param dynamicQuery the dynamic query to search with
134             * @return the matching rows
135             * @throws SystemException if a system exception occurred
136             */
137            @SuppressWarnings("rawtypes")
138            public List dynamicQuery(DynamicQuery dynamicQuery)
139                    throws SystemException {
140                    return mbMailingListPersistence.findWithDynamicQuery(dynamicQuery);
141            }
142    
143            /**
144             * Performs a dynamic query on the database and returns a range of the matching rows.
145             *
146             * <p>
147             * 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.
148             * </p>
149             *
150             * @param dynamicQuery the dynamic query to search with
151             * @param start the lower bound of the range of model instances to return
152             * @param end the upper bound of the range of model instances to return (not inclusive)
153             * @return the range of matching rows
154             * @throws SystemException if a system exception occurred
155             */
156            @SuppressWarnings("rawtypes")
157            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
158                    throws SystemException {
159                    return mbMailingListPersistence.findWithDynamicQuery(dynamicQuery,
160                            start, end);
161            }
162    
163            /**
164             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
165             *
166             * <p>
167             * 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.
168             * </p>
169             *
170             * @param dynamicQuery the dynamic query to search with
171             * @param start the lower bound of the range of model instances to return
172             * @param end the upper bound of the range of model instances to return (not inclusive)
173             * @param orderByComparator the comparator to order the results by
174             * @return the ordered range of matching rows
175             * @throws SystemException if a system exception occurred
176             */
177            @SuppressWarnings("rawtypes")
178            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
179                    OrderByComparator orderByComparator) throws SystemException {
180                    return mbMailingListPersistence.findWithDynamicQuery(dynamicQuery,
181                            start, end, orderByComparator);
182            }
183    
184            /**
185             * Counts the number of rows that match the dynamic query.
186             *
187             * @param dynamicQuery the dynamic query to search with
188             * @return the number of rows that match the dynamic query
189             * @throws SystemException if a system exception occurred
190             */
191            public long dynamicQueryCount(DynamicQuery dynamicQuery)
192                    throws SystemException {
193                    return mbMailingListPersistence.countWithDynamicQuery(dynamicQuery);
194            }
195    
196            /**
197             * Gets the message boards mailing list with the primary key.
198             *
199             * @param mailingListId the primary key of the message boards mailing list to get
200             * @return the message boards mailing list
201             * @throws PortalException if a message boards mailing list with the primary key could not be found
202             * @throws SystemException if a system exception occurred
203             */
204            public MBMailingList getMBMailingList(long mailingListId)
205                    throws PortalException, SystemException {
206                    return mbMailingListPersistence.findByPrimaryKey(mailingListId);
207            }
208    
209            /**
210             * Gets the message boards mailing list with the UUID and group id.
211             *
212             * @param uuid the UUID of message boards mailing list to get
213             * @param groupId the group id of the message boards mailing list to get
214             * @return the message boards mailing list
215             * @throws PortalException if a message boards mailing list with the UUID and group id could not be found
216             * @throws SystemException if a system exception occurred
217             */
218            public MBMailingList getMBMailingListByUuidAndGroupId(String uuid,
219                    long groupId) throws PortalException, SystemException {
220                    return mbMailingListPersistence.findByUUID_G(uuid, groupId);
221            }
222    
223            /**
224             * Gets a range of all the message boards mailing lists.
225             *
226             * <p>
227             * 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.
228             * </p>
229             *
230             * @param start the lower bound of the range of message boards mailing lists to return
231             * @param end the upper bound of the range of message boards mailing lists to return (not inclusive)
232             * @return the range of message boards mailing lists
233             * @throws SystemException if a system exception occurred
234             */
235            public List<MBMailingList> getMBMailingLists(int start, int end)
236                    throws SystemException {
237                    return mbMailingListPersistence.findAll(start, end);
238            }
239    
240            /**
241             * Gets the number of message boards mailing lists.
242             *
243             * @return the number of message boards mailing lists
244             * @throws SystemException if a system exception occurred
245             */
246            public int getMBMailingListsCount() throws SystemException {
247                    return mbMailingListPersistence.countAll();
248            }
249    
250            /**
251             * Updates the message boards mailing list in the database. Also notifies the appropriate model listeners.
252             *
253             * @param mbMailingList the message boards mailing list to update
254             * @return the message boards mailing list that was updated
255             * @throws SystemException if a system exception occurred
256             */
257            public MBMailingList updateMBMailingList(MBMailingList mbMailingList)
258                    throws SystemException {
259                    mbMailingList.setNew(false);
260    
261                    return mbMailingListPersistence.update(mbMailingList, true);
262            }
263    
264            /**
265             * Updates the message boards mailing list in the database. Also notifies the appropriate model listeners.
266             *
267             * @param mbMailingList the message boards mailing list to update
268             * @param merge whether to merge the message boards mailing list 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.
269             * @return the message boards mailing list that was updated
270             * @throws SystemException if a system exception occurred
271             */
272            public MBMailingList updateMBMailingList(MBMailingList mbMailingList,
273                    boolean merge) throws SystemException {
274                    mbMailingList.setNew(false);
275    
276                    return mbMailingListPersistence.update(mbMailingList, merge);
277            }
278    
279            /**
280             * Gets the message boards ban local service.
281             *
282             * @return the message boards ban local service
283             */
284            public MBBanLocalService getMBBanLocalService() {
285                    return mbBanLocalService;
286            }
287    
288            /**
289             * Sets the message boards ban local service.
290             *
291             * @param mbBanLocalService the message boards ban local service
292             */
293            public void setMBBanLocalService(MBBanLocalService mbBanLocalService) {
294                    this.mbBanLocalService = mbBanLocalService;
295            }
296    
297            /**
298             * Gets the message boards ban remote service.
299             *
300             * @return the message boards ban remote service
301             */
302            public MBBanService getMBBanService() {
303                    return mbBanService;
304            }
305    
306            /**
307             * Sets the message boards ban remote service.
308             *
309             * @param mbBanService the message boards ban remote service
310             */
311            public void setMBBanService(MBBanService mbBanService) {
312                    this.mbBanService = mbBanService;
313            }
314    
315            /**
316             * Gets the message boards ban persistence.
317             *
318             * @return the message boards ban persistence
319             */
320            public MBBanPersistence getMBBanPersistence() {
321                    return mbBanPersistence;
322            }
323    
324            /**
325             * Sets the message boards ban persistence.
326             *
327             * @param mbBanPersistence the message boards ban persistence
328             */
329            public void setMBBanPersistence(MBBanPersistence mbBanPersistence) {
330                    this.mbBanPersistence = mbBanPersistence;
331            }
332    
333            /**
334             * Gets the message boards category local service.
335             *
336             * @return the message boards category local service
337             */
338            public MBCategoryLocalService getMBCategoryLocalService() {
339                    return mbCategoryLocalService;
340            }
341    
342            /**
343             * Sets the message boards category local service.
344             *
345             * @param mbCategoryLocalService the message boards category local service
346             */
347            public void setMBCategoryLocalService(
348                    MBCategoryLocalService mbCategoryLocalService) {
349                    this.mbCategoryLocalService = mbCategoryLocalService;
350            }
351    
352            /**
353             * Gets the message boards category remote service.
354             *
355             * @return the message boards category remote service
356             */
357            public MBCategoryService getMBCategoryService() {
358                    return mbCategoryService;
359            }
360    
361            /**
362             * Sets the message boards category remote service.
363             *
364             * @param mbCategoryService the message boards category remote service
365             */
366            public void setMBCategoryService(MBCategoryService mbCategoryService) {
367                    this.mbCategoryService = mbCategoryService;
368            }
369    
370            /**
371             * Gets the message boards category persistence.
372             *
373             * @return the message boards category persistence
374             */
375            public MBCategoryPersistence getMBCategoryPersistence() {
376                    return mbCategoryPersistence;
377            }
378    
379            /**
380             * Sets the message boards category persistence.
381             *
382             * @param mbCategoryPersistence the message boards category persistence
383             */
384            public void setMBCategoryPersistence(
385                    MBCategoryPersistence mbCategoryPersistence) {
386                    this.mbCategoryPersistence = mbCategoryPersistence;
387            }
388    
389            /**
390             * Gets the message boards category finder.
391             *
392             * @return the message boards category finder
393             */
394            public MBCategoryFinder getMBCategoryFinder() {
395                    return mbCategoryFinder;
396            }
397    
398            /**
399             * Sets the message boards category finder.
400             *
401             * @param mbCategoryFinder the message boards category finder
402             */
403            public void setMBCategoryFinder(MBCategoryFinder mbCategoryFinder) {
404                    this.mbCategoryFinder = mbCategoryFinder;
405            }
406    
407            /**
408             * Gets the message boards discussion local service.
409             *
410             * @return the message boards discussion local service
411             */
412            public MBDiscussionLocalService getMBDiscussionLocalService() {
413                    return mbDiscussionLocalService;
414            }
415    
416            /**
417             * Sets the message boards discussion local service.
418             *
419             * @param mbDiscussionLocalService the message boards discussion local service
420             */
421            public void setMBDiscussionLocalService(
422                    MBDiscussionLocalService mbDiscussionLocalService) {
423                    this.mbDiscussionLocalService = mbDiscussionLocalService;
424            }
425    
426            /**
427             * Gets the message boards discussion persistence.
428             *
429             * @return the message boards discussion persistence
430             */
431            public MBDiscussionPersistence getMBDiscussionPersistence() {
432                    return mbDiscussionPersistence;
433            }
434    
435            /**
436             * Sets the message boards discussion persistence.
437             *
438             * @param mbDiscussionPersistence the message boards discussion persistence
439             */
440            public void setMBDiscussionPersistence(
441                    MBDiscussionPersistence mbDiscussionPersistence) {
442                    this.mbDiscussionPersistence = mbDiscussionPersistence;
443            }
444    
445            /**
446             * Gets the message boards mailing list local service.
447             *
448             * @return the message boards mailing list local service
449             */
450            public MBMailingListLocalService getMBMailingListLocalService() {
451                    return mbMailingListLocalService;
452            }
453    
454            /**
455             * Sets the message boards mailing list local service.
456             *
457             * @param mbMailingListLocalService the message boards mailing list local service
458             */
459            public void setMBMailingListLocalService(
460                    MBMailingListLocalService mbMailingListLocalService) {
461                    this.mbMailingListLocalService = mbMailingListLocalService;
462            }
463    
464            /**
465             * Gets the message boards mailing list persistence.
466             *
467             * @return the message boards mailing list persistence
468             */
469            public MBMailingListPersistence getMBMailingListPersistence() {
470                    return mbMailingListPersistence;
471            }
472    
473            /**
474             * Sets the message boards mailing list persistence.
475             *
476             * @param mbMailingListPersistence the message boards mailing list persistence
477             */
478            public void setMBMailingListPersistence(
479                    MBMailingListPersistence mbMailingListPersistence) {
480                    this.mbMailingListPersistence = mbMailingListPersistence;
481            }
482    
483            /**
484             * Gets the message-boards message local service.
485             *
486             * @return the message-boards message local service
487             */
488            public MBMessageLocalService getMBMessageLocalService() {
489                    return mbMessageLocalService;
490            }
491    
492            /**
493             * Sets the message-boards message local service.
494             *
495             * @param mbMessageLocalService the message-boards message local service
496             */
497            public void setMBMessageLocalService(
498                    MBMessageLocalService mbMessageLocalService) {
499                    this.mbMessageLocalService = mbMessageLocalService;
500            }
501    
502            /**
503             * Gets the message-boards message remote service.
504             *
505             * @return the message-boards message remote service
506             */
507            public MBMessageService getMBMessageService() {
508                    return mbMessageService;
509            }
510    
511            /**
512             * Sets the message-boards message remote service.
513             *
514             * @param mbMessageService the message-boards message remote service
515             */
516            public void setMBMessageService(MBMessageService mbMessageService) {
517                    this.mbMessageService = mbMessageService;
518            }
519    
520            /**
521             * Gets the message-boards message persistence.
522             *
523             * @return the message-boards message persistence
524             */
525            public MBMessagePersistence getMBMessagePersistence() {
526                    return mbMessagePersistence;
527            }
528    
529            /**
530             * Sets the message-boards message persistence.
531             *
532             * @param mbMessagePersistence the message-boards message persistence
533             */
534            public void setMBMessagePersistence(
535                    MBMessagePersistence mbMessagePersistence) {
536                    this.mbMessagePersistence = mbMessagePersistence;
537            }
538    
539            /**
540             * Gets the message-boards message finder.
541             *
542             * @return the message-boards message finder
543             */
544            public MBMessageFinder getMBMessageFinder() {
545                    return mbMessageFinder;
546            }
547    
548            /**
549             * Sets the message-boards message finder.
550             *
551             * @param mbMessageFinder the message-boards message finder
552             */
553            public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
554                    this.mbMessageFinder = mbMessageFinder;
555            }
556    
557            /**
558             * Gets the message boards message flag local service.
559             *
560             * @return the message boards message flag local service
561             */
562            public MBMessageFlagLocalService getMBMessageFlagLocalService() {
563                    return mbMessageFlagLocalService;
564            }
565    
566            /**
567             * Sets the message boards message flag local service.
568             *
569             * @param mbMessageFlagLocalService the message boards message flag local service
570             */
571            public void setMBMessageFlagLocalService(
572                    MBMessageFlagLocalService mbMessageFlagLocalService) {
573                    this.mbMessageFlagLocalService = mbMessageFlagLocalService;
574            }
575    
576            /**
577             * Gets the message boards message flag remote service.
578             *
579             * @return the message boards message flag remote service
580             */
581            public MBMessageFlagService getMBMessageFlagService() {
582                    return mbMessageFlagService;
583            }
584    
585            /**
586             * Sets the message boards message flag remote service.
587             *
588             * @param mbMessageFlagService the message boards message flag remote service
589             */
590            public void setMBMessageFlagService(
591                    MBMessageFlagService mbMessageFlagService) {
592                    this.mbMessageFlagService = mbMessageFlagService;
593            }
594    
595            /**
596             * Gets the message boards message flag persistence.
597             *
598             * @return the message boards message flag persistence
599             */
600            public MBMessageFlagPersistence getMBMessageFlagPersistence() {
601                    return mbMessageFlagPersistence;
602            }
603    
604            /**
605             * Sets the message boards message flag persistence.
606             *
607             * @param mbMessageFlagPersistence the message boards message flag persistence
608             */
609            public void setMBMessageFlagPersistence(
610                    MBMessageFlagPersistence mbMessageFlagPersistence) {
611                    this.mbMessageFlagPersistence = mbMessageFlagPersistence;
612            }
613    
614            /**
615             * Gets the message boards stats user local service.
616             *
617             * @return the message boards stats user local service
618             */
619            public MBStatsUserLocalService getMBStatsUserLocalService() {
620                    return mbStatsUserLocalService;
621            }
622    
623            /**
624             * Sets the message boards stats user local service.
625             *
626             * @param mbStatsUserLocalService the message boards stats user local service
627             */
628            public void setMBStatsUserLocalService(
629                    MBStatsUserLocalService mbStatsUserLocalService) {
630                    this.mbStatsUserLocalService = mbStatsUserLocalService;
631            }
632    
633            /**
634             * Gets the message boards stats user persistence.
635             *
636             * @return the message boards stats user persistence
637             */
638            public MBStatsUserPersistence getMBStatsUserPersistence() {
639                    return mbStatsUserPersistence;
640            }
641    
642            /**
643             * Sets the message boards stats user persistence.
644             *
645             * @param mbStatsUserPersistence the message boards stats user persistence
646             */
647            public void setMBStatsUserPersistence(
648                    MBStatsUserPersistence mbStatsUserPersistence) {
649                    this.mbStatsUserPersistence = mbStatsUserPersistence;
650            }
651    
652            /**
653             * Gets the message boards thread local service.
654             *
655             * @return the message boards thread local service
656             */
657            public MBThreadLocalService getMBThreadLocalService() {
658                    return mbThreadLocalService;
659            }
660    
661            /**
662             * Sets the message boards thread local service.
663             *
664             * @param mbThreadLocalService the message boards thread local service
665             */
666            public void setMBThreadLocalService(
667                    MBThreadLocalService mbThreadLocalService) {
668                    this.mbThreadLocalService = mbThreadLocalService;
669            }
670    
671            /**
672             * Gets the message boards thread remote service.
673             *
674             * @return the message boards thread remote service
675             */
676            public MBThreadService getMBThreadService() {
677                    return mbThreadService;
678            }
679    
680            /**
681             * Sets the message boards thread remote service.
682             *
683             * @param mbThreadService the message boards thread remote service
684             */
685            public void setMBThreadService(MBThreadService mbThreadService) {
686                    this.mbThreadService = mbThreadService;
687            }
688    
689            /**
690             * Gets the message boards thread persistence.
691             *
692             * @return the message boards thread persistence
693             */
694            public MBThreadPersistence getMBThreadPersistence() {
695                    return mbThreadPersistence;
696            }
697    
698            /**
699             * Sets the message boards thread persistence.
700             *
701             * @param mbThreadPersistence the message boards thread persistence
702             */
703            public void setMBThreadPersistence(MBThreadPersistence mbThreadPersistence) {
704                    this.mbThreadPersistence = mbThreadPersistence;
705            }
706    
707            /**
708             * Gets the message boards thread finder.
709             *
710             * @return the message boards thread finder
711             */
712            public MBThreadFinder getMBThreadFinder() {
713                    return mbThreadFinder;
714            }
715    
716            /**
717             * Sets the message boards thread finder.
718             *
719             * @param mbThreadFinder the message boards thread finder
720             */
721            public void setMBThreadFinder(MBThreadFinder mbThreadFinder) {
722                    this.mbThreadFinder = mbThreadFinder;
723            }
724    
725            /**
726             * Gets the counter local service.
727             *
728             * @return the counter local service
729             */
730            public CounterLocalService getCounterLocalService() {
731                    return counterLocalService;
732            }
733    
734            /**
735             * Sets the counter local service.
736             *
737             * @param counterLocalService the counter local service
738             */
739            public void setCounterLocalService(CounterLocalService counterLocalService) {
740                    this.counterLocalService = counterLocalService;
741            }
742    
743            /**
744             * Gets the resource local service.
745             *
746             * @return the resource local service
747             */
748            public ResourceLocalService getResourceLocalService() {
749                    return resourceLocalService;
750            }
751    
752            /**
753             * Sets the resource local service.
754             *
755             * @param resourceLocalService the resource local service
756             */
757            public void setResourceLocalService(
758                    ResourceLocalService resourceLocalService) {
759                    this.resourceLocalService = resourceLocalService;
760            }
761    
762            /**
763             * Gets the resource remote service.
764             *
765             * @return the resource remote service
766             */
767            public ResourceService getResourceService() {
768                    return resourceService;
769            }
770    
771            /**
772             * Sets the resource remote service.
773             *
774             * @param resourceService the resource remote service
775             */
776            public void setResourceService(ResourceService resourceService) {
777                    this.resourceService = resourceService;
778            }
779    
780            /**
781             * Gets the resource persistence.
782             *
783             * @return the resource persistence
784             */
785            public ResourcePersistence getResourcePersistence() {
786                    return resourcePersistence;
787            }
788    
789            /**
790             * Sets the resource persistence.
791             *
792             * @param resourcePersistence the resource persistence
793             */
794            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
795                    this.resourcePersistence = resourcePersistence;
796            }
797    
798            /**
799             * Gets the resource finder.
800             *
801             * @return the resource finder
802             */
803            public ResourceFinder getResourceFinder() {
804                    return resourceFinder;
805            }
806    
807            /**
808             * Sets the resource finder.
809             *
810             * @param resourceFinder the resource finder
811             */
812            public void setResourceFinder(ResourceFinder resourceFinder) {
813                    this.resourceFinder = resourceFinder;
814            }
815    
816            /**
817             * Gets the user local service.
818             *
819             * @return the user local service
820             */
821            public UserLocalService getUserLocalService() {
822                    return userLocalService;
823            }
824    
825            /**
826             * Sets the user local service.
827             *
828             * @param userLocalService the user local service
829             */
830            public void setUserLocalService(UserLocalService userLocalService) {
831                    this.userLocalService = userLocalService;
832            }
833    
834            /**
835             * Gets the user remote service.
836             *
837             * @return the user remote service
838             */
839            public UserService getUserService() {
840                    return userService;
841            }
842    
843            /**
844             * Sets the user remote service.
845             *
846             * @param userService the user remote service
847             */
848            public void setUserService(UserService userService) {
849                    this.userService = userService;
850            }
851    
852            /**
853             * Gets the user persistence.
854             *
855             * @return the user persistence
856             */
857            public UserPersistence getUserPersistence() {
858                    return userPersistence;
859            }
860    
861            /**
862             * Sets the user persistence.
863             *
864             * @param userPersistence the user persistence
865             */
866            public void setUserPersistence(UserPersistence userPersistence) {
867                    this.userPersistence = userPersistence;
868            }
869    
870            /**
871             * Gets the user finder.
872             *
873             * @return the user finder
874             */
875            public UserFinder getUserFinder() {
876                    return userFinder;
877            }
878    
879            /**
880             * Sets the user finder.
881             *
882             * @param userFinder the user finder
883             */
884            public void setUserFinder(UserFinder userFinder) {
885                    this.userFinder = userFinder;
886            }
887    
888            /**
889             * Performs an SQL query.
890             *
891             * @param sql the sql query to perform
892             */
893            protected void runSQL(String sql) throws SystemException {
894                    try {
895                            DataSource dataSource = mbMailingListPersistence.getDataSource();
896    
897                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
898                                            sql, new int[0]);
899    
900                            sqlUpdate.update();
901                    }
902                    catch (Exception e) {
903                            throw new SystemException(e);
904                    }
905            }
906    
907            @BeanReference(type = MBBanLocalService.class)
908            protected MBBanLocalService mbBanLocalService;
909            @BeanReference(type = MBBanService.class)
910            protected MBBanService mbBanService;
911            @BeanReference(type = MBBanPersistence.class)
912            protected MBBanPersistence mbBanPersistence;
913            @BeanReference(type = MBCategoryLocalService.class)
914            protected MBCategoryLocalService mbCategoryLocalService;
915            @BeanReference(type = MBCategoryService.class)
916            protected MBCategoryService mbCategoryService;
917            @BeanReference(type = MBCategoryPersistence.class)
918            protected MBCategoryPersistence mbCategoryPersistence;
919            @BeanReference(type = MBCategoryFinder.class)
920            protected MBCategoryFinder mbCategoryFinder;
921            @BeanReference(type = MBDiscussionLocalService.class)
922            protected MBDiscussionLocalService mbDiscussionLocalService;
923            @BeanReference(type = MBDiscussionPersistence.class)
924            protected MBDiscussionPersistence mbDiscussionPersistence;
925            @BeanReference(type = MBMailingListLocalService.class)
926            protected MBMailingListLocalService mbMailingListLocalService;
927            @BeanReference(type = MBMailingListPersistence.class)
928            protected MBMailingListPersistence mbMailingListPersistence;
929            @BeanReference(type = MBMessageLocalService.class)
930            protected MBMessageLocalService mbMessageLocalService;
931            @BeanReference(type = MBMessageService.class)
932            protected MBMessageService mbMessageService;
933            @BeanReference(type = MBMessagePersistence.class)
934            protected MBMessagePersistence mbMessagePersistence;
935            @BeanReference(type = MBMessageFinder.class)
936            protected MBMessageFinder mbMessageFinder;
937            @BeanReference(type = MBMessageFlagLocalService.class)
938            protected MBMessageFlagLocalService mbMessageFlagLocalService;
939            @BeanReference(type = MBMessageFlagService.class)
940            protected MBMessageFlagService mbMessageFlagService;
941            @BeanReference(type = MBMessageFlagPersistence.class)
942            protected MBMessageFlagPersistence mbMessageFlagPersistence;
943            @BeanReference(type = MBStatsUserLocalService.class)
944            protected MBStatsUserLocalService mbStatsUserLocalService;
945            @BeanReference(type = MBStatsUserPersistence.class)
946            protected MBStatsUserPersistence mbStatsUserPersistence;
947            @BeanReference(type = MBThreadLocalService.class)
948            protected MBThreadLocalService mbThreadLocalService;
949            @BeanReference(type = MBThreadService.class)
950            protected MBThreadService mbThreadService;
951            @BeanReference(type = MBThreadPersistence.class)
952            protected MBThreadPersistence mbThreadPersistence;
953            @BeanReference(type = MBThreadFinder.class)
954            protected MBThreadFinder mbThreadFinder;
955            @BeanReference(type = CounterLocalService.class)
956            protected CounterLocalService counterLocalService;
957            @BeanReference(type = ResourceLocalService.class)
958            protected ResourceLocalService resourceLocalService;
959            @BeanReference(type = ResourceService.class)
960            protected ResourceService resourceService;
961            @BeanReference(type = ResourcePersistence.class)
962            protected ResourcePersistence resourcePersistence;
963            @BeanReference(type = ResourceFinder.class)
964            protected ResourceFinder resourceFinder;
965            @BeanReference(type = UserLocalService.class)
966            protected UserLocalService userLocalService;
967            @BeanReference(type = UserService.class)
968            protected UserService userService;
969            @BeanReference(type = UserPersistence.class)
970            protected UserPersistence userPersistence;
971            @BeanReference(type = UserFinder.class)
972            protected UserFinder userFinder;
973    }