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