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