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