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