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.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 a range of all the message boards bans.
235             *
236             * <p>
237             * 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.
238             * </p>
239             *
240             * @param start the lower bound of the range of message boards bans
241             * @param end the upper bound of the range of message boards bans (not inclusive)
242             * @return the range of message boards bans
243             * @throws SystemException if a system exception occurred
244             */
245            public List<MBBan> getMBBans(int start, int end) throws SystemException {
246                    return mbBanPersistence.findAll(start, end);
247            }
248    
249            /**
250             * Returns the number of message boards bans.
251             *
252             * @return the number of message boards bans
253             * @throws SystemException if a system exception occurred
254             */
255            public int getMBBansCount() throws SystemException {
256                    return mbBanPersistence.countAll();
257            }
258    
259            /**
260             * Updates the message boards ban in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
261             *
262             * @param mbBan the message boards ban
263             * @return the message boards ban that was updated
264             * @throws SystemException if a system exception occurred
265             */
266            @Indexable(type = IndexableType.REINDEX)
267            public MBBan updateMBBan(MBBan mbBan) throws SystemException {
268                    return mbBanPersistence.update(mbBan);
269            }
270    
271            /**
272             * Returns the message boards ban local service.
273             *
274             * @return the message boards ban local service
275             */
276            public MBBanLocalService getMBBanLocalService() {
277                    return mbBanLocalService;
278            }
279    
280            /**
281             * Sets the message boards ban local service.
282             *
283             * @param mbBanLocalService the message boards ban local service
284             */
285            public void setMBBanLocalService(MBBanLocalService mbBanLocalService) {
286                    this.mbBanLocalService = mbBanLocalService;
287            }
288    
289            /**
290             * Returns the message boards ban remote service.
291             *
292             * @return the message boards ban remote service
293             */
294            public MBBanService getMBBanService() {
295                    return mbBanService;
296            }
297    
298            /**
299             * Sets the message boards ban remote service.
300             *
301             * @param mbBanService the message boards ban remote service
302             */
303            public void setMBBanService(MBBanService mbBanService) {
304                    this.mbBanService = mbBanService;
305            }
306    
307            /**
308             * Returns the message boards ban persistence.
309             *
310             * @return the message boards ban persistence
311             */
312            public MBBanPersistence getMBBanPersistence() {
313                    return mbBanPersistence;
314            }
315    
316            /**
317             * Sets the message boards ban persistence.
318             *
319             * @param mbBanPersistence the message boards ban persistence
320             */
321            public void setMBBanPersistence(MBBanPersistence mbBanPersistence) {
322                    this.mbBanPersistence = mbBanPersistence;
323            }
324    
325            /**
326             * Returns the message boards category local service.
327             *
328             * @return the message boards category local service
329             */
330            public MBCategoryLocalService getMBCategoryLocalService() {
331                    return mbCategoryLocalService;
332            }
333    
334            /**
335             * Sets the message boards category local service.
336             *
337             * @param mbCategoryLocalService the message boards category local service
338             */
339            public void setMBCategoryLocalService(
340                    MBCategoryLocalService mbCategoryLocalService) {
341                    this.mbCategoryLocalService = mbCategoryLocalService;
342            }
343    
344            /**
345             * Returns the message boards category remote service.
346             *
347             * @return the message boards category remote service
348             */
349            public MBCategoryService getMBCategoryService() {
350                    return mbCategoryService;
351            }
352    
353            /**
354             * Sets the message boards category remote service.
355             *
356             * @param mbCategoryService the message boards category remote service
357             */
358            public void setMBCategoryService(MBCategoryService mbCategoryService) {
359                    this.mbCategoryService = mbCategoryService;
360            }
361    
362            /**
363             * Returns the message boards category persistence.
364             *
365             * @return the message boards category persistence
366             */
367            public MBCategoryPersistence getMBCategoryPersistence() {
368                    return mbCategoryPersistence;
369            }
370    
371            /**
372             * Sets the message boards category persistence.
373             *
374             * @param mbCategoryPersistence the message boards category persistence
375             */
376            public void setMBCategoryPersistence(
377                    MBCategoryPersistence mbCategoryPersistence) {
378                    this.mbCategoryPersistence = mbCategoryPersistence;
379            }
380    
381            /**
382             * Returns the message boards category finder.
383             *
384             * @return the message boards category finder
385             */
386            public MBCategoryFinder getMBCategoryFinder() {
387                    return mbCategoryFinder;
388            }
389    
390            /**
391             * Sets the message boards category finder.
392             *
393             * @param mbCategoryFinder the message boards category finder
394             */
395            public void setMBCategoryFinder(MBCategoryFinder mbCategoryFinder) {
396                    this.mbCategoryFinder = mbCategoryFinder;
397            }
398    
399            /**
400             * Returns the message boards discussion local service.
401             *
402             * @return the message boards discussion local service
403             */
404            public MBDiscussionLocalService getMBDiscussionLocalService() {
405                    return mbDiscussionLocalService;
406            }
407    
408            /**
409             * Sets the message boards discussion local service.
410             *
411             * @param mbDiscussionLocalService the message boards discussion local service
412             */
413            public void setMBDiscussionLocalService(
414                    MBDiscussionLocalService mbDiscussionLocalService) {
415                    this.mbDiscussionLocalService = mbDiscussionLocalService;
416            }
417    
418            /**
419             * Returns the message boards discussion persistence.
420             *
421             * @return the message boards discussion persistence
422             */
423            public MBDiscussionPersistence getMBDiscussionPersistence() {
424                    return mbDiscussionPersistence;
425            }
426    
427            /**
428             * Sets the message boards discussion persistence.
429             *
430             * @param mbDiscussionPersistence the message boards discussion persistence
431             */
432            public void setMBDiscussionPersistence(
433                    MBDiscussionPersistence mbDiscussionPersistence) {
434                    this.mbDiscussionPersistence = mbDiscussionPersistence;
435            }
436    
437            /**
438             * Returns the message boards mailing list local service.
439             *
440             * @return the message boards mailing list local service
441             */
442            public MBMailingListLocalService getMBMailingListLocalService() {
443                    return mbMailingListLocalService;
444            }
445    
446            /**
447             * Sets the message boards mailing list local service.
448             *
449             * @param mbMailingListLocalService the message boards mailing list local service
450             */
451            public void setMBMailingListLocalService(
452                    MBMailingListLocalService mbMailingListLocalService) {
453                    this.mbMailingListLocalService = mbMailingListLocalService;
454            }
455    
456            /**
457             * Returns the message boards mailing list persistence.
458             *
459             * @return the message boards mailing list persistence
460             */
461            public MBMailingListPersistence getMBMailingListPersistence() {
462                    return mbMailingListPersistence;
463            }
464    
465            /**
466             * Sets the message boards mailing list persistence.
467             *
468             * @param mbMailingListPersistence the message boards mailing list persistence
469             */
470            public void setMBMailingListPersistence(
471                    MBMailingListPersistence mbMailingListPersistence) {
472                    this.mbMailingListPersistence = mbMailingListPersistence;
473            }
474    
475            /**
476             * Returns the message-boards message local service.
477             *
478             * @return the message-boards message local service
479             */
480            public MBMessageLocalService getMBMessageLocalService() {
481                    return mbMessageLocalService;
482            }
483    
484            /**
485             * Sets the message-boards message local service.
486             *
487             * @param mbMessageLocalService the message-boards message local service
488             */
489            public void setMBMessageLocalService(
490                    MBMessageLocalService mbMessageLocalService) {
491                    this.mbMessageLocalService = mbMessageLocalService;
492            }
493    
494            /**
495             * Returns the message-boards message remote service.
496             *
497             * @return the message-boards message remote service
498             */
499            public MBMessageService getMBMessageService() {
500                    return mbMessageService;
501            }
502    
503            /**
504             * Sets the message-boards message remote service.
505             *
506             * @param mbMessageService the message-boards message remote service
507             */
508            public void setMBMessageService(MBMessageService mbMessageService) {
509                    this.mbMessageService = mbMessageService;
510            }
511    
512            /**
513             * Returns the message-boards message persistence.
514             *
515             * @return the message-boards message persistence
516             */
517            public MBMessagePersistence getMBMessagePersistence() {
518                    return mbMessagePersistence;
519            }
520    
521            /**
522             * Sets the message-boards message persistence.
523             *
524             * @param mbMessagePersistence the message-boards message persistence
525             */
526            public void setMBMessagePersistence(
527                    MBMessagePersistence mbMessagePersistence) {
528                    this.mbMessagePersistence = mbMessagePersistence;
529            }
530    
531            /**
532             * Returns the message-boards message finder.
533             *
534             * @return the message-boards message finder
535             */
536            public MBMessageFinder getMBMessageFinder() {
537                    return mbMessageFinder;
538            }
539    
540            /**
541             * Sets the message-boards message finder.
542             *
543             * @param mbMessageFinder the message-boards message finder
544             */
545            public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
546                    this.mbMessageFinder = mbMessageFinder;
547            }
548    
549            /**
550             * Returns the message boards stats user local service.
551             *
552             * @return the message boards stats user local service
553             */
554            public MBStatsUserLocalService getMBStatsUserLocalService() {
555                    return mbStatsUserLocalService;
556            }
557    
558            /**
559             * Sets the message boards stats user local service.
560             *
561             * @param mbStatsUserLocalService the message boards stats user local service
562             */
563            public void setMBStatsUserLocalService(
564                    MBStatsUserLocalService mbStatsUserLocalService) {
565                    this.mbStatsUserLocalService = mbStatsUserLocalService;
566            }
567    
568            /**
569             * Returns the message boards stats user persistence.
570             *
571             * @return the message boards stats user persistence
572             */
573            public MBStatsUserPersistence getMBStatsUserPersistence() {
574                    return mbStatsUserPersistence;
575            }
576    
577            /**
578             * Sets the message boards stats user persistence.
579             *
580             * @param mbStatsUserPersistence the message boards stats user persistence
581             */
582            public void setMBStatsUserPersistence(
583                    MBStatsUserPersistence mbStatsUserPersistence) {
584                    this.mbStatsUserPersistence = mbStatsUserPersistence;
585            }
586    
587            /**
588             * Returns the message boards thread local service.
589             *
590             * @return the message boards thread local service
591             */
592            public MBThreadLocalService getMBThreadLocalService() {
593                    return mbThreadLocalService;
594            }
595    
596            /**
597             * Sets the message boards thread local service.
598             *
599             * @param mbThreadLocalService the message boards thread local service
600             */
601            public void setMBThreadLocalService(
602                    MBThreadLocalService mbThreadLocalService) {
603                    this.mbThreadLocalService = mbThreadLocalService;
604            }
605    
606            /**
607             * Returns the message boards thread remote service.
608             *
609             * @return the message boards thread remote service
610             */
611            public MBThreadService getMBThreadService() {
612                    return mbThreadService;
613            }
614    
615            /**
616             * Sets the message boards thread remote service.
617             *
618             * @param mbThreadService the message boards thread remote service
619             */
620            public void setMBThreadService(MBThreadService mbThreadService) {
621                    this.mbThreadService = mbThreadService;
622            }
623    
624            /**
625             * Returns the message boards thread persistence.
626             *
627             * @return the message boards thread persistence
628             */
629            public MBThreadPersistence getMBThreadPersistence() {
630                    return mbThreadPersistence;
631            }
632    
633            /**
634             * Sets the message boards thread persistence.
635             *
636             * @param mbThreadPersistence the message boards thread persistence
637             */
638            public void setMBThreadPersistence(MBThreadPersistence mbThreadPersistence) {
639                    this.mbThreadPersistence = mbThreadPersistence;
640            }
641    
642            /**
643             * Returns the message boards thread finder.
644             *
645             * @return the message boards thread finder
646             */
647            public MBThreadFinder getMBThreadFinder() {
648                    return mbThreadFinder;
649            }
650    
651            /**
652             * Sets the message boards thread finder.
653             *
654             * @param mbThreadFinder the message boards thread finder
655             */
656            public void setMBThreadFinder(MBThreadFinder mbThreadFinder) {
657                    this.mbThreadFinder = mbThreadFinder;
658            }
659    
660            /**
661             * Returns the message boards thread flag local service.
662             *
663             * @return the message boards thread flag local service
664             */
665            public MBThreadFlagLocalService getMBThreadFlagLocalService() {
666                    return mbThreadFlagLocalService;
667            }
668    
669            /**
670             * Sets the message boards thread flag local service.
671             *
672             * @param mbThreadFlagLocalService the message boards thread flag local service
673             */
674            public void setMBThreadFlagLocalService(
675                    MBThreadFlagLocalService mbThreadFlagLocalService) {
676                    this.mbThreadFlagLocalService = mbThreadFlagLocalService;
677            }
678    
679            /**
680             * Returns the message boards thread flag persistence.
681             *
682             * @return the message boards thread flag persistence
683             */
684            public MBThreadFlagPersistence getMBThreadFlagPersistence() {
685                    return mbThreadFlagPersistence;
686            }
687    
688            /**
689             * Sets the message boards thread flag persistence.
690             *
691             * @param mbThreadFlagPersistence the message boards thread flag persistence
692             */
693            public void setMBThreadFlagPersistence(
694                    MBThreadFlagPersistence mbThreadFlagPersistence) {
695                    this.mbThreadFlagPersistence = mbThreadFlagPersistence;
696            }
697    
698            /**
699             * Returns the counter local service.
700             *
701             * @return the counter local service
702             */
703            public CounterLocalService getCounterLocalService() {
704                    return counterLocalService;
705            }
706    
707            /**
708             * Sets the counter local service.
709             *
710             * @param counterLocalService the counter local service
711             */
712            public void setCounterLocalService(CounterLocalService counterLocalService) {
713                    this.counterLocalService = counterLocalService;
714            }
715    
716            /**
717             * Returns the resource local service.
718             *
719             * @return the resource local service
720             */
721            public ResourceLocalService getResourceLocalService() {
722                    return resourceLocalService;
723            }
724    
725            /**
726             * Sets the resource local service.
727             *
728             * @param resourceLocalService the resource local service
729             */
730            public void setResourceLocalService(
731                    ResourceLocalService resourceLocalService) {
732                    this.resourceLocalService = resourceLocalService;
733            }
734    
735            /**
736             * Returns the user local service.
737             *
738             * @return the user local service
739             */
740            public UserLocalService getUserLocalService() {
741                    return userLocalService;
742            }
743    
744            /**
745             * Sets the user local service.
746             *
747             * @param userLocalService the user local service
748             */
749            public void setUserLocalService(UserLocalService userLocalService) {
750                    this.userLocalService = userLocalService;
751            }
752    
753            /**
754             * Returns the user remote service.
755             *
756             * @return the user remote service
757             */
758            public UserService getUserService() {
759                    return userService;
760            }
761    
762            /**
763             * Sets the user remote service.
764             *
765             * @param userService the user remote service
766             */
767            public void setUserService(UserService userService) {
768                    this.userService = userService;
769            }
770    
771            /**
772             * Returns the user persistence.
773             *
774             * @return the user persistence
775             */
776            public UserPersistence getUserPersistence() {
777                    return userPersistence;
778            }
779    
780            /**
781             * Sets the user persistence.
782             *
783             * @param userPersistence the user persistence
784             */
785            public void setUserPersistence(UserPersistence userPersistence) {
786                    this.userPersistence = userPersistence;
787            }
788    
789            /**
790             * Returns the user finder.
791             *
792             * @return the user finder
793             */
794            public UserFinder getUserFinder() {
795                    return userFinder;
796            }
797    
798            /**
799             * Sets the user finder.
800             *
801             * @param userFinder the user finder
802             */
803            public void setUserFinder(UserFinder userFinder) {
804                    this.userFinder = userFinder;
805            }
806    
807            public void afterPropertiesSet() {
808                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.messageboards.model.MBBan",
809                            mbBanLocalService);
810            }
811    
812            public void destroy() {
813                    persistedModelLocalServiceRegistry.unregister(
814                            "com.liferay.portlet.messageboards.model.MBBan");
815            }
816    
817            /**
818             * Returns the Spring bean ID for this bean.
819             *
820             * @return the Spring bean ID for this bean
821             */
822            public String getBeanIdentifier() {
823                    return _beanIdentifier;
824            }
825    
826            /**
827             * Sets the Spring bean ID for this bean.
828             *
829             * @param beanIdentifier the Spring bean ID for this bean
830             */
831            public void setBeanIdentifier(String beanIdentifier) {
832                    _beanIdentifier = beanIdentifier;
833            }
834    
835            protected Class<?> getModelClass() {
836                    return MBBan.class;
837            }
838    
839            protected String getModelClassName() {
840                    return MBBan.class.getName();
841            }
842    
843            /**
844             * Performs an SQL query.
845             *
846             * @param sql the sql query
847             */
848            protected void runSQL(String sql) throws SystemException {
849                    try {
850                            DataSource dataSource = mbBanPersistence.getDataSource();
851    
852                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
853                                            sql, new int[0]);
854    
855                            sqlUpdate.update();
856                    }
857                    catch (Exception e) {
858                            throw new SystemException(e);
859                    }
860            }
861    
862            @BeanReference(type = MBBanLocalService.class)
863            protected MBBanLocalService mbBanLocalService;
864            @BeanReference(type = MBBanService.class)
865            protected MBBanService mbBanService;
866            @BeanReference(type = MBBanPersistence.class)
867            protected MBBanPersistence mbBanPersistence;
868            @BeanReference(type = MBCategoryLocalService.class)
869            protected MBCategoryLocalService mbCategoryLocalService;
870            @BeanReference(type = MBCategoryService.class)
871            protected MBCategoryService mbCategoryService;
872            @BeanReference(type = MBCategoryPersistence.class)
873            protected MBCategoryPersistence mbCategoryPersistence;
874            @BeanReference(type = MBCategoryFinder.class)
875            protected MBCategoryFinder mbCategoryFinder;
876            @BeanReference(type = MBDiscussionLocalService.class)
877            protected MBDiscussionLocalService mbDiscussionLocalService;
878            @BeanReference(type = MBDiscussionPersistence.class)
879            protected MBDiscussionPersistence mbDiscussionPersistence;
880            @BeanReference(type = MBMailingListLocalService.class)
881            protected MBMailingListLocalService mbMailingListLocalService;
882            @BeanReference(type = MBMailingListPersistence.class)
883            protected MBMailingListPersistence mbMailingListPersistence;
884            @BeanReference(type = MBMessageLocalService.class)
885            protected MBMessageLocalService mbMessageLocalService;
886            @BeanReference(type = MBMessageService.class)
887            protected MBMessageService mbMessageService;
888            @BeanReference(type = MBMessagePersistence.class)
889            protected MBMessagePersistence mbMessagePersistence;
890            @BeanReference(type = MBMessageFinder.class)
891            protected MBMessageFinder mbMessageFinder;
892            @BeanReference(type = MBStatsUserLocalService.class)
893            protected MBStatsUserLocalService mbStatsUserLocalService;
894            @BeanReference(type = MBStatsUserPersistence.class)
895            protected MBStatsUserPersistence mbStatsUserPersistence;
896            @BeanReference(type = MBThreadLocalService.class)
897            protected MBThreadLocalService mbThreadLocalService;
898            @BeanReference(type = MBThreadService.class)
899            protected MBThreadService mbThreadService;
900            @BeanReference(type = MBThreadPersistence.class)
901            protected MBThreadPersistence mbThreadPersistence;
902            @BeanReference(type = MBThreadFinder.class)
903            protected MBThreadFinder mbThreadFinder;
904            @BeanReference(type = MBThreadFlagLocalService.class)
905            protected MBThreadFlagLocalService mbThreadFlagLocalService;
906            @BeanReference(type = MBThreadFlagPersistence.class)
907            protected MBThreadFlagPersistence mbThreadFlagPersistence;
908            @BeanReference(type = CounterLocalService.class)
909            protected CounterLocalService counterLocalService;
910            @BeanReference(type = ResourceLocalService.class)
911            protected ResourceLocalService resourceLocalService;
912            @BeanReference(type = UserLocalService.class)
913            protected UserLocalService userLocalService;
914            @BeanReference(type = UserService.class)
915            protected UserService userService;
916            @BeanReference(type = UserPersistence.class)
917            protected UserPersistence userPersistence;
918            @BeanReference(type = UserFinder.class)
919            protected UserFinder userFinder;
920            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
921            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
922            private String _beanIdentifier;
923    }