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