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