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