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