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