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.LockLocalService;
034    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
035    import com.liferay.portal.service.ResourceLocalService;
036    import com.liferay.portal.service.ResourceService;
037    import com.liferay.portal.service.UserLocalService;
038    import com.liferay.portal.service.UserService;
039    import com.liferay.portal.service.WorkflowInstanceLinkLocalService;
040    import com.liferay.portal.service.persistence.LockFinder;
041    import com.liferay.portal.service.persistence.LockPersistence;
042    import com.liferay.portal.service.persistence.ResourceFinder;
043    import com.liferay.portal.service.persistence.ResourcePersistence;
044    import com.liferay.portal.service.persistence.UserFinder;
045    import com.liferay.portal.service.persistence.UserPersistence;
046    import com.liferay.portal.service.persistence.WorkflowInstanceLinkPersistence;
047    
048    import com.liferay.portlet.asset.service.AssetEntryLocalService;
049    import com.liferay.portlet.asset.service.AssetEntryService;
050    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
051    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
052    import com.liferay.portlet.messageboards.model.MBThread;
053    import com.liferay.portlet.messageboards.service.MBBanLocalService;
054    import com.liferay.portlet.messageboards.service.MBBanService;
055    import com.liferay.portlet.messageboards.service.MBCategoryLocalService;
056    import com.liferay.portlet.messageboards.service.MBCategoryService;
057    import com.liferay.portlet.messageboards.service.MBDiscussionLocalService;
058    import com.liferay.portlet.messageboards.service.MBMailingListLocalService;
059    import com.liferay.portlet.messageboards.service.MBMessageLocalService;
060    import com.liferay.portlet.messageboards.service.MBMessageService;
061    import com.liferay.portlet.messageboards.service.MBStatsUserLocalService;
062    import com.liferay.portlet.messageboards.service.MBThreadFlagLocalService;
063    import com.liferay.portlet.messageboards.service.MBThreadLocalService;
064    import com.liferay.portlet.messageboards.service.MBThreadService;
065    import com.liferay.portlet.messageboards.service.persistence.MBBanPersistence;
066    import com.liferay.portlet.messageboards.service.persistence.MBCategoryFinder;
067    import com.liferay.portlet.messageboards.service.persistence.MBCategoryPersistence;
068    import com.liferay.portlet.messageboards.service.persistence.MBDiscussionPersistence;
069    import com.liferay.portlet.messageboards.service.persistence.MBMailingListPersistence;
070    import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
071    import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
072    import com.liferay.portlet.messageboards.service.persistence.MBStatsUserPersistence;
073    import com.liferay.portlet.messageboards.service.persistence.MBThreadFinder;
074    import com.liferay.portlet.messageboards.service.persistence.MBThreadFlagPersistence;
075    import com.liferay.portlet.messageboards.service.persistence.MBThreadPersistence;
076    import com.liferay.portlet.ratings.service.RatingsStatsLocalService;
077    import com.liferay.portlet.ratings.service.persistence.RatingsStatsFinder;
078    import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
079    import com.liferay.portlet.social.service.SocialActivityLocalService;
080    import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
081    import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
082    
083    import java.io.Serializable;
084    
085    import java.util.List;
086    
087    import javax.sql.DataSource;
088    
089    /**
090     * The base implementation of the message boards thread local service.
091     *
092     * <p>
093     * 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.MBThreadLocalServiceImpl}.
094     * </p>
095     *
096     * @author Brian Wing Shun Chan
097     * @see com.liferay.portlet.messageboards.service.impl.MBThreadLocalServiceImpl
098     * @see com.liferay.portlet.messageboards.service.MBThreadLocalServiceUtil
099     * @generated
100     */
101    public abstract class MBThreadLocalServiceBaseImpl
102            implements MBThreadLocalService, IdentifiableBean {
103            /*
104             * NOTE FOR DEVELOPERS:
105             *
106             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.messageboards.service.MBThreadLocalServiceUtil} to access the message boards thread local service.
107             */
108    
109            /**
110             * Adds the message boards thread to the database. Also notifies the appropriate model listeners.
111             *
112             * @param mbThread the message boards thread
113             * @return the message boards thread that was added
114             * @throws SystemException if a system exception occurred
115             */
116            public MBThread addMBThread(MBThread mbThread) throws SystemException {
117                    mbThread.setNew(true);
118    
119                    mbThread = mbThreadPersistence.update(mbThread, false);
120    
121                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
122    
123                    if (indexer != null) {
124                            try {
125                                    indexer.reindex(mbThread);
126                            }
127                            catch (SearchException se) {
128                                    if (_log.isWarnEnabled()) {
129                                            _log.warn(se, se);
130                                    }
131                            }
132                    }
133    
134                    return mbThread;
135            }
136    
137            /**
138             * Creates a new message boards thread with the primary key. Does not add the message boards thread to the database.
139             *
140             * @param threadId the primary key for the new message boards thread
141             * @return the new message boards thread
142             */
143            public MBThread createMBThread(long threadId) {
144                    return mbThreadPersistence.create(threadId);
145            }
146    
147            /**
148             * Deletes the message boards thread with the primary key from the database. Also notifies the appropriate model listeners.
149             *
150             * @param threadId the primary key of the message boards thread
151             * @throws PortalException if a message boards thread with the primary key could not be found
152             * @throws SystemException if a system exception occurred
153             */
154            public void deleteMBThread(long threadId)
155                    throws PortalException, SystemException {
156                    MBThread mbThread = mbThreadPersistence.remove(threadId);
157    
158                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
159    
160                    if (indexer != null) {
161                            try {
162                                    indexer.delete(mbThread);
163                            }
164                            catch (SearchException se) {
165                                    if (_log.isWarnEnabled()) {
166                                            _log.warn(se, se);
167                                    }
168                            }
169                    }
170            }
171    
172            /**
173             * Deletes the message boards thread from the database. Also notifies the appropriate model listeners.
174             *
175             * @param mbThread the message boards thread
176             * @throws SystemException if a system exception occurred
177             */
178            public void deleteMBThread(MBThread mbThread) throws SystemException {
179                    mbThreadPersistence.remove(mbThread);
180    
181                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
182    
183                    if (indexer != null) {
184                            try {
185                                    indexer.delete(mbThread);
186                            }
187                            catch (SearchException se) {
188                                    if (_log.isWarnEnabled()) {
189                                            _log.warn(se, se);
190                                    }
191                            }
192                    }
193            }
194    
195            /**
196             * Performs a dynamic query on the database and returns the matching rows.
197             *
198             * @param dynamicQuery the dynamic query
199             * @return the matching rows
200             * @throws SystemException if a system exception occurred
201             */
202            @SuppressWarnings("rawtypes")
203            public List dynamicQuery(DynamicQuery dynamicQuery)
204                    throws SystemException {
205                    return mbThreadPersistence.findWithDynamicQuery(dynamicQuery);
206            }
207    
208            /**
209             * Performs a dynamic query on the database and returns a range of the matching rows.
210             *
211             * <p>
212             * 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.
213             * </p>
214             *
215             * @param dynamicQuery the dynamic query
216             * @param start the lower bound of the range of model instances
217             * @param end the upper bound of the range of model instances (not inclusive)
218             * @return the range of matching rows
219             * @throws SystemException if a system exception occurred
220             */
221            @SuppressWarnings("rawtypes")
222            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
223                    throws SystemException {
224                    return mbThreadPersistence.findWithDynamicQuery(dynamicQuery, start, end);
225            }
226    
227            /**
228             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
229             *
230             * <p>
231             * 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.
232             * </p>
233             *
234             * @param dynamicQuery the dynamic query
235             * @param start the lower bound of the range of model instances
236             * @param end the upper bound of the range of model instances (not inclusive)
237             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
238             * @return the ordered range of matching rows
239             * @throws SystemException if a system exception occurred
240             */
241            @SuppressWarnings("rawtypes")
242            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
243                    OrderByComparator orderByComparator) throws SystemException {
244                    return mbThreadPersistence.findWithDynamicQuery(dynamicQuery, start,
245                            end, orderByComparator);
246            }
247    
248            /**
249             * Returns the number of rows that match the dynamic query.
250             *
251             * @param dynamicQuery the dynamic query
252             * @return the number of rows that match the dynamic query
253             * @throws SystemException if a system exception occurred
254             */
255            public long dynamicQueryCount(DynamicQuery dynamicQuery)
256                    throws SystemException {
257                    return mbThreadPersistence.countWithDynamicQuery(dynamicQuery);
258            }
259    
260            public MBThread fetchMBThread(long threadId) throws SystemException {
261                    return mbThreadPersistence.fetchByPrimaryKey(threadId);
262            }
263    
264            /**
265             * Returns the message boards thread with the primary key.
266             *
267             * @param threadId the primary key of the message boards thread
268             * @return the message boards thread
269             * @throws PortalException if a message boards thread with the primary key could not be found
270             * @throws SystemException if a system exception occurred
271             */
272            public MBThread getMBThread(long threadId)
273                    throws PortalException, SystemException {
274                    return mbThreadPersistence.findByPrimaryKey(threadId);
275            }
276    
277            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
278                    throws PortalException, SystemException {
279                    return mbThreadPersistence.findByPrimaryKey(primaryKeyObj);
280            }
281    
282            /**
283             * Returns a range of all the message boards threads.
284             *
285             * <p>
286             * 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.
287             * </p>
288             *
289             * @param start the lower bound of the range of message boards threads
290             * @param end the upper bound of the range of message boards threads (not inclusive)
291             * @return the range of message boards threads
292             * @throws SystemException if a system exception occurred
293             */
294            public List<MBThread> getMBThreads(int start, int end)
295                    throws SystemException {
296                    return mbThreadPersistence.findAll(start, end);
297            }
298    
299            /**
300             * Returns the number of message boards threads.
301             *
302             * @return the number of message boards threads
303             * @throws SystemException if a system exception occurred
304             */
305            public int getMBThreadsCount() throws SystemException {
306                    return mbThreadPersistence.countAll();
307            }
308    
309            /**
310             * Updates the message boards thread in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
311             *
312             * @param mbThread the message boards thread
313             * @return the message boards thread that was updated
314             * @throws SystemException if a system exception occurred
315             */
316            public MBThread updateMBThread(MBThread mbThread) throws SystemException {
317                    return updateMBThread(mbThread, true);
318            }
319    
320            /**
321             * Updates the message boards thread in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
322             *
323             * @param mbThread the message boards thread
324             * @param merge whether to merge the message boards thread 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.
325             * @return the message boards thread that was updated
326             * @throws SystemException if a system exception occurred
327             */
328            public MBThread updateMBThread(MBThread mbThread, boolean merge)
329                    throws SystemException {
330                    mbThread.setNew(false);
331    
332                    mbThread = mbThreadPersistence.update(mbThread, merge);
333    
334                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
335    
336                    if (indexer != null) {
337                            try {
338                                    indexer.reindex(mbThread);
339                            }
340                            catch (SearchException se) {
341                                    if (_log.isWarnEnabled()) {
342                                            _log.warn(se, se);
343                                    }
344                            }
345                    }
346    
347                    return mbThread;
348            }
349    
350            /**
351             * Returns the message boards ban local service.
352             *
353             * @return the message boards ban local service
354             */
355            public MBBanLocalService getMBBanLocalService() {
356                    return mbBanLocalService;
357            }
358    
359            /**
360             * Sets the message boards ban local service.
361             *
362             * @param mbBanLocalService the message boards ban local service
363             */
364            public void setMBBanLocalService(MBBanLocalService mbBanLocalService) {
365                    this.mbBanLocalService = mbBanLocalService;
366            }
367    
368            /**
369             * Returns the message boards ban remote service.
370             *
371             * @return the message boards ban remote service
372             */
373            public MBBanService getMBBanService() {
374                    return mbBanService;
375            }
376    
377            /**
378             * Sets the message boards ban remote service.
379             *
380             * @param mbBanService the message boards ban remote service
381             */
382            public void setMBBanService(MBBanService mbBanService) {
383                    this.mbBanService = mbBanService;
384            }
385    
386            /**
387             * Returns the message boards ban persistence.
388             *
389             * @return the message boards ban persistence
390             */
391            public MBBanPersistence getMBBanPersistence() {
392                    return mbBanPersistence;
393            }
394    
395            /**
396             * Sets the message boards ban persistence.
397             *
398             * @param mbBanPersistence the message boards ban persistence
399             */
400            public void setMBBanPersistence(MBBanPersistence mbBanPersistence) {
401                    this.mbBanPersistence = mbBanPersistence;
402            }
403    
404            /**
405             * Returns the message boards category local service.
406             *
407             * @return the message boards category local service
408             */
409            public MBCategoryLocalService getMBCategoryLocalService() {
410                    return mbCategoryLocalService;
411            }
412    
413            /**
414             * Sets the message boards category local service.
415             *
416             * @param mbCategoryLocalService the message boards category local service
417             */
418            public void setMBCategoryLocalService(
419                    MBCategoryLocalService mbCategoryLocalService) {
420                    this.mbCategoryLocalService = mbCategoryLocalService;
421            }
422    
423            /**
424             * Returns the message boards category remote service.
425             *
426             * @return the message boards category remote service
427             */
428            public MBCategoryService getMBCategoryService() {
429                    return mbCategoryService;
430            }
431    
432            /**
433             * Sets the message boards category remote service.
434             *
435             * @param mbCategoryService the message boards category remote service
436             */
437            public void setMBCategoryService(MBCategoryService mbCategoryService) {
438                    this.mbCategoryService = mbCategoryService;
439            }
440    
441            /**
442             * Returns the message boards category persistence.
443             *
444             * @return the message boards category persistence
445             */
446            public MBCategoryPersistence getMBCategoryPersistence() {
447                    return mbCategoryPersistence;
448            }
449    
450            /**
451             * Sets the message boards category persistence.
452             *
453             * @param mbCategoryPersistence the message boards category persistence
454             */
455            public void setMBCategoryPersistence(
456                    MBCategoryPersistence mbCategoryPersistence) {
457                    this.mbCategoryPersistence = mbCategoryPersistence;
458            }
459    
460            /**
461             * Returns the message boards category finder.
462             *
463             * @return the message boards category finder
464             */
465            public MBCategoryFinder getMBCategoryFinder() {
466                    return mbCategoryFinder;
467            }
468    
469            /**
470             * Sets the message boards category finder.
471             *
472             * @param mbCategoryFinder the message boards category finder
473             */
474            public void setMBCategoryFinder(MBCategoryFinder mbCategoryFinder) {
475                    this.mbCategoryFinder = mbCategoryFinder;
476            }
477    
478            /**
479             * Returns the message boards discussion local service.
480             *
481             * @return the message boards discussion local service
482             */
483            public MBDiscussionLocalService getMBDiscussionLocalService() {
484                    return mbDiscussionLocalService;
485            }
486    
487            /**
488             * Sets the message boards discussion local service.
489             *
490             * @param mbDiscussionLocalService the message boards discussion local service
491             */
492            public void setMBDiscussionLocalService(
493                    MBDiscussionLocalService mbDiscussionLocalService) {
494                    this.mbDiscussionLocalService = mbDiscussionLocalService;
495            }
496    
497            /**
498             * Returns the message boards discussion persistence.
499             *
500             * @return the message boards discussion persistence
501             */
502            public MBDiscussionPersistence getMBDiscussionPersistence() {
503                    return mbDiscussionPersistence;
504            }
505    
506            /**
507             * Sets the message boards discussion persistence.
508             *
509             * @param mbDiscussionPersistence the message boards discussion persistence
510             */
511            public void setMBDiscussionPersistence(
512                    MBDiscussionPersistence mbDiscussionPersistence) {
513                    this.mbDiscussionPersistence = mbDiscussionPersistence;
514            }
515    
516            /**
517             * Returns the message boards mailing list local service.
518             *
519             * @return the message boards mailing list local service
520             */
521            public MBMailingListLocalService getMBMailingListLocalService() {
522                    return mbMailingListLocalService;
523            }
524    
525            /**
526             * Sets the message boards mailing list local service.
527             *
528             * @param mbMailingListLocalService the message boards mailing list local service
529             */
530            public void setMBMailingListLocalService(
531                    MBMailingListLocalService mbMailingListLocalService) {
532                    this.mbMailingListLocalService = mbMailingListLocalService;
533            }
534    
535            /**
536             * Returns the message boards mailing list persistence.
537             *
538             * @return the message boards mailing list persistence
539             */
540            public MBMailingListPersistence getMBMailingListPersistence() {
541                    return mbMailingListPersistence;
542            }
543    
544            /**
545             * Sets the message boards mailing list persistence.
546             *
547             * @param mbMailingListPersistence the message boards mailing list persistence
548             */
549            public void setMBMailingListPersistence(
550                    MBMailingListPersistence mbMailingListPersistence) {
551                    this.mbMailingListPersistence = mbMailingListPersistence;
552            }
553    
554            /**
555             * Returns the message-boards message local service.
556             *
557             * @return the message-boards message local service
558             */
559            public MBMessageLocalService getMBMessageLocalService() {
560                    return mbMessageLocalService;
561            }
562    
563            /**
564             * Sets the message-boards message local service.
565             *
566             * @param mbMessageLocalService the message-boards message local service
567             */
568            public void setMBMessageLocalService(
569                    MBMessageLocalService mbMessageLocalService) {
570                    this.mbMessageLocalService = mbMessageLocalService;
571            }
572    
573            /**
574             * Returns the message-boards message remote service.
575             *
576             * @return the message-boards message remote service
577             */
578            public MBMessageService getMBMessageService() {
579                    return mbMessageService;
580            }
581    
582            /**
583             * Sets the message-boards message remote service.
584             *
585             * @param mbMessageService the message-boards message remote service
586             */
587            public void setMBMessageService(MBMessageService mbMessageService) {
588                    this.mbMessageService = mbMessageService;
589            }
590    
591            /**
592             * Returns the message-boards message persistence.
593             *
594             * @return the message-boards message persistence
595             */
596            public MBMessagePersistence getMBMessagePersistence() {
597                    return mbMessagePersistence;
598            }
599    
600            /**
601             * Sets the message-boards message persistence.
602             *
603             * @param mbMessagePersistence the message-boards message persistence
604             */
605            public void setMBMessagePersistence(
606                    MBMessagePersistence mbMessagePersistence) {
607                    this.mbMessagePersistence = mbMessagePersistence;
608            }
609    
610            /**
611             * Returns the message-boards message finder.
612             *
613             * @return the message-boards message finder
614             */
615            public MBMessageFinder getMBMessageFinder() {
616                    return mbMessageFinder;
617            }
618    
619            /**
620             * Sets the message-boards message finder.
621             *
622             * @param mbMessageFinder the message-boards message finder
623             */
624            public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
625                    this.mbMessageFinder = mbMessageFinder;
626            }
627    
628            /**
629             * Returns the message boards stats user local service.
630             *
631             * @return the message boards stats user local service
632             */
633            public MBStatsUserLocalService getMBStatsUserLocalService() {
634                    return mbStatsUserLocalService;
635            }
636    
637            /**
638             * Sets the message boards stats user local service.
639             *
640             * @param mbStatsUserLocalService the message boards stats user local service
641             */
642            public void setMBStatsUserLocalService(
643                    MBStatsUserLocalService mbStatsUserLocalService) {
644                    this.mbStatsUserLocalService = mbStatsUserLocalService;
645            }
646    
647            /**
648             * Returns the message boards stats user persistence.
649             *
650             * @return the message boards stats user persistence
651             */
652            public MBStatsUserPersistence getMBStatsUserPersistence() {
653                    return mbStatsUserPersistence;
654            }
655    
656            /**
657             * Sets the message boards stats user persistence.
658             *
659             * @param mbStatsUserPersistence the message boards stats user persistence
660             */
661            public void setMBStatsUserPersistence(
662                    MBStatsUserPersistence mbStatsUserPersistence) {
663                    this.mbStatsUserPersistence = mbStatsUserPersistence;
664            }
665    
666            /**
667             * Returns the message boards thread local service.
668             *
669             * @return the message boards thread local service
670             */
671            public MBThreadLocalService getMBThreadLocalService() {
672                    return mbThreadLocalService;
673            }
674    
675            /**
676             * Sets the message boards thread local service.
677             *
678             * @param mbThreadLocalService the message boards thread local service
679             */
680            public void setMBThreadLocalService(
681                    MBThreadLocalService mbThreadLocalService) {
682                    this.mbThreadLocalService = mbThreadLocalService;
683            }
684    
685            /**
686             * Returns the message boards thread remote service.
687             *
688             * @return the message boards thread remote service
689             */
690            public MBThreadService getMBThreadService() {
691                    return mbThreadService;
692            }
693    
694            /**
695             * Sets the message boards thread remote service.
696             *
697             * @param mbThreadService the message boards thread remote service
698             */
699            public void setMBThreadService(MBThreadService mbThreadService) {
700                    this.mbThreadService = mbThreadService;
701            }
702    
703            /**
704             * Returns the message boards thread persistence.
705             *
706             * @return the message boards thread persistence
707             */
708            public MBThreadPersistence getMBThreadPersistence() {
709                    return mbThreadPersistence;
710            }
711    
712            /**
713             * Sets the message boards thread persistence.
714             *
715             * @param mbThreadPersistence the message boards thread persistence
716             */
717            public void setMBThreadPersistence(MBThreadPersistence mbThreadPersistence) {
718                    this.mbThreadPersistence = mbThreadPersistence;
719            }
720    
721            /**
722             * Returns the message boards thread finder.
723             *
724             * @return the message boards thread finder
725             */
726            public MBThreadFinder getMBThreadFinder() {
727                    return mbThreadFinder;
728            }
729    
730            /**
731             * Sets the message boards thread finder.
732             *
733             * @param mbThreadFinder the message boards thread finder
734             */
735            public void setMBThreadFinder(MBThreadFinder mbThreadFinder) {
736                    this.mbThreadFinder = mbThreadFinder;
737            }
738    
739            /**
740             * Returns the message boards thread flag local service.
741             *
742             * @return the message boards thread flag local service
743             */
744            public MBThreadFlagLocalService getMBThreadFlagLocalService() {
745                    return mbThreadFlagLocalService;
746            }
747    
748            /**
749             * Sets the message boards thread flag local service.
750             *
751             * @param mbThreadFlagLocalService the message boards thread flag local service
752             */
753            public void setMBThreadFlagLocalService(
754                    MBThreadFlagLocalService mbThreadFlagLocalService) {
755                    this.mbThreadFlagLocalService = mbThreadFlagLocalService;
756            }
757    
758            /**
759             * Returns the message boards thread flag persistence.
760             *
761             * @return the message boards thread flag persistence
762             */
763            public MBThreadFlagPersistence getMBThreadFlagPersistence() {
764                    return mbThreadFlagPersistence;
765            }
766    
767            /**
768             * Sets the message boards thread flag persistence.
769             *
770             * @param mbThreadFlagPersistence the message boards thread flag persistence
771             */
772            public void setMBThreadFlagPersistence(
773                    MBThreadFlagPersistence mbThreadFlagPersistence) {
774                    this.mbThreadFlagPersistence = mbThreadFlagPersistence;
775            }
776    
777            /**
778             * Returns the counter local service.
779             *
780             * @return the counter local service
781             */
782            public CounterLocalService getCounterLocalService() {
783                    return counterLocalService;
784            }
785    
786            /**
787             * Sets the counter local service.
788             *
789             * @param counterLocalService the counter local service
790             */
791            public void setCounterLocalService(CounterLocalService counterLocalService) {
792                    this.counterLocalService = counterLocalService;
793            }
794    
795            /**
796             * Returns the lock local service.
797             *
798             * @return the lock local service
799             */
800            public LockLocalService getLockLocalService() {
801                    return lockLocalService;
802            }
803    
804            /**
805             * Sets the lock local service.
806             *
807             * @param lockLocalService the lock local service
808             */
809            public void setLockLocalService(LockLocalService lockLocalService) {
810                    this.lockLocalService = lockLocalService;
811            }
812    
813            /**
814             * Returns the lock persistence.
815             *
816             * @return the lock persistence
817             */
818            public LockPersistence getLockPersistence() {
819                    return lockPersistence;
820            }
821    
822            /**
823             * Sets the lock persistence.
824             *
825             * @param lockPersistence the lock persistence
826             */
827            public void setLockPersistence(LockPersistence lockPersistence) {
828                    this.lockPersistence = lockPersistence;
829            }
830    
831            /**
832             * Returns the lock finder.
833             *
834             * @return the lock finder
835             */
836            public LockFinder getLockFinder() {
837                    return lockFinder;
838            }
839    
840            /**
841             * Sets the lock finder.
842             *
843             * @param lockFinder the lock finder
844             */
845            public void setLockFinder(LockFinder lockFinder) {
846                    this.lockFinder = lockFinder;
847            }
848    
849            /**
850             * Returns the resource local service.
851             *
852             * @return the resource local service
853             */
854            public ResourceLocalService getResourceLocalService() {
855                    return resourceLocalService;
856            }
857    
858            /**
859             * Sets the resource local service.
860             *
861             * @param resourceLocalService the resource local service
862             */
863            public void setResourceLocalService(
864                    ResourceLocalService resourceLocalService) {
865                    this.resourceLocalService = resourceLocalService;
866            }
867    
868            /**
869             * Returns the resource remote service.
870             *
871             * @return the resource remote service
872             */
873            public ResourceService getResourceService() {
874                    return resourceService;
875            }
876    
877            /**
878             * Sets the resource remote service.
879             *
880             * @param resourceService the resource remote service
881             */
882            public void setResourceService(ResourceService resourceService) {
883                    this.resourceService = resourceService;
884            }
885    
886            /**
887             * Returns the resource persistence.
888             *
889             * @return the resource persistence
890             */
891            public ResourcePersistence getResourcePersistence() {
892                    return resourcePersistence;
893            }
894    
895            /**
896             * Sets the resource persistence.
897             *
898             * @param resourcePersistence the resource persistence
899             */
900            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
901                    this.resourcePersistence = resourcePersistence;
902            }
903    
904            /**
905             * Returns the resource finder.
906             *
907             * @return the resource finder
908             */
909            public ResourceFinder getResourceFinder() {
910                    return resourceFinder;
911            }
912    
913            /**
914             * Sets the resource finder.
915             *
916             * @param resourceFinder the resource finder
917             */
918            public void setResourceFinder(ResourceFinder resourceFinder) {
919                    this.resourceFinder = resourceFinder;
920            }
921    
922            /**
923             * Returns the user local service.
924             *
925             * @return the user local service
926             */
927            public UserLocalService getUserLocalService() {
928                    return userLocalService;
929            }
930    
931            /**
932             * Sets the user local service.
933             *
934             * @param userLocalService the user local service
935             */
936            public void setUserLocalService(UserLocalService userLocalService) {
937                    this.userLocalService = userLocalService;
938            }
939    
940            /**
941             * Returns the user remote service.
942             *
943             * @return the user remote service
944             */
945            public UserService getUserService() {
946                    return userService;
947            }
948    
949            /**
950             * Sets the user remote service.
951             *
952             * @param userService the user remote service
953             */
954            public void setUserService(UserService userService) {
955                    this.userService = userService;
956            }
957    
958            /**
959             * Returns the user persistence.
960             *
961             * @return the user persistence
962             */
963            public UserPersistence getUserPersistence() {
964                    return userPersistence;
965            }
966    
967            /**
968             * Sets the user persistence.
969             *
970             * @param userPersistence the user persistence
971             */
972            public void setUserPersistence(UserPersistence userPersistence) {
973                    this.userPersistence = userPersistence;
974            }
975    
976            /**
977             * Returns the user finder.
978             *
979             * @return the user finder
980             */
981            public UserFinder getUserFinder() {
982                    return userFinder;
983            }
984    
985            /**
986             * Sets the user finder.
987             *
988             * @param userFinder the user finder
989             */
990            public void setUserFinder(UserFinder userFinder) {
991                    this.userFinder = userFinder;
992            }
993    
994            /**
995             * Returns the workflow instance link local service.
996             *
997             * @return the workflow instance link local service
998             */
999            public WorkflowInstanceLinkLocalService getWorkflowInstanceLinkLocalService() {
1000                    return workflowInstanceLinkLocalService;
1001            }
1002    
1003            /**
1004             * Sets the workflow instance link local service.
1005             *
1006             * @param workflowInstanceLinkLocalService the workflow instance link local service
1007             */
1008            public void setWorkflowInstanceLinkLocalService(
1009                    WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService) {
1010                    this.workflowInstanceLinkLocalService = workflowInstanceLinkLocalService;
1011            }
1012    
1013            /**
1014             * Returns the workflow instance link persistence.
1015             *
1016             * @return the workflow instance link persistence
1017             */
1018            public WorkflowInstanceLinkPersistence getWorkflowInstanceLinkPersistence() {
1019                    return workflowInstanceLinkPersistence;
1020            }
1021    
1022            /**
1023             * Sets the workflow instance link persistence.
1024             *
1025             * @param workflowInstanceLinkPersistence the workflow instance link persistence
1026             */
1027            public void setWorkflowInstanceLinkPersistence(
1028                    WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence) {
1029                    this.workflowInstanceLinkPersistence = workflowInstanceLinkPersistence;
1030            }
1031    
1032            /**
1033             * Returns the asset entry local service.
1034             *
1035             * @return the asset entry local service
1036             */
1037            public AssetEntryLocalService getAssetEntryLocalService() {
1038                    return assetEntryLocalService;
1039            }
1040    
1041            /**
1042             * Sets the asset entry local service.
1043             *
1044             * @param assetEntryLocalService the asset entry local service
1045             */
1046            public void setAssetEntryLocalService(
1047                    AssetEntryLocalService assetEntryLocalService) {
1048                    this.assetEntryLocalService = assetEntryLocalService;
1049            }
1050    
1051            /**
1052             * Returns the asset entry remote service.
1053             *
1054             * @return the asset entry remote service
1055             */
1056            public AssetEntryService getAssetEntryService() {
1057                    return assetEntryService;
1058            }
1059    
1060            /**
1061             * Sets the asset entry remote service.
1062             *
1063             * @param assetEntryService the asset entry remote service
1064             */
1065            public void setAssetEntryService(AssetEntryService assetEntryService) {
1066                    this.assetEntryService = assetEntryService;
1067            }
1068    
1069            /**
1070             * Returns the asset entry persistence.
1071             *
1072             * @return the asset entry persistence
1073             */
1074            public AssetEntryPersistence getAssetEntryPersistence() {
1075                    return assetEntryPersistence;
1076            }
1077    
1078            /**
1079             * Sets the asset entry persistence.
1080             *
1081             * @param assetEntryPersistence the asset entry persistence
1082             */
1083            public void setAssetEntryPersistence(
1084                    AssetEntryPersistence assetEntryPersistence) {
1085                    this.assetEntryPersistence = assetEntryPersistence;
1086            }
1087    
1088            /**
1089             * Returns the asset entry finder.
1090             *
1091             * @return the asset entry finder
1092             */
1093            public AssetEntryFinder getAssetEntryFinder() {
1094                    return assetEntryFinder;
1095            }
1096    
1097            /**
1098             * Sets the asset entry finder.
1099             *
1100             * @param assetEntryFinder the asset entry finder
1101             */
1102            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
1103                    this.assetEntryFinder = assetEntryFinder;
1104            }
1105    
1106            /**
1107             * Returns the ratings stats local service.
1108             *
1109             * @return the ratings stats local service
1110             */
1111            public RatingsStatsLocalService getRatingsStatsLocalService() {
1112                    return ratingsStatsLocalService;
1113            }
1114    
1115            /**
1116             * Sets the ratings stats local service.
1117             *
1118             * @param ratingsStatsLocalService the ratings stats local service
1119             */
1120            public void setRatingsStatsLocalService(
1121                    RatingsStatsLocalService ratingsStatsLocalService) {
1122                    this.ratingsStatsLocalService = ratingsStatsLocalService;
1123            }
1124    
1125            /**
1126             * Returns the ratings stats persistence.
1127             *
1128             * @return the ratings stats persistence
1129             */
1130            public RatingsStatsPersistence getRatingsStatsPersistence() {
1131                    return ratingsStatsPersistence;
1132            }
1133    
1134            /**
1135             * Sets the ratings stats persistence.
1136             *
1137             * @param ratingsStatsPersistence the ratings stats persistence
1138             */
1139            public void setRatingsStatsPersistence(
1140                    RatingsStatsPersistence ratingsStatsPersistence) {
1141                    this.ratingsStatsPersistence = ratingsStatsPersistence;
1142            }
1143    
1144            /**
1145             * Returns the ratings stats finder.
1146             *
1147             * @return the ratings stats finder
1148             */
1149            public RatingsStatsFinder getRatingsStatsFinder() {
1150                    return ratingsStatsFinder;
1151            }
1152    
1153            /**
1154             * Sets the ratings stats finder.
1155             *
1156             * @param ratingsStatsFinder the ratings stats finder
1157             */
1158            public void setRatingsStatsFinder(RatingsStatsFinder ratingsStatsFinder) {
1159                    this.ratingsStatsFinder = ratingsStatsFinder;
1160            }
1161    
1162            /**
1163             * Returns the social activity local service.
1164             *
1165             * @return the social activity local service
1166             */
1167            public SocialActivityLocalService getSocialActivityLocalService() {
1168                    return socialActivityLocalService;
1169            }
1170    
1171            /**
1172             * Sets the social activity local service.
1173             *
1174             * @param socialActivityLocalService the social activity local service
1175             */
1176            public void setSocialActivityLocalService(
1177                    SocialActivityLocalService socialActivityLocalService) {
1178                    this.socialActivityLocalService = socialActivityLocalService;
1179            }
1180    
1181            /**
1182             * Returns the social activity persistence.
1183             *
1184             * @return the social activity persistence
1185             */
1186            public SocialActivityPersistence getSocialActivityPersistence() {
1187                    return socialActivityPersistence;
1188            }
1189    
1190            /**
1191             * Sets the social activity persistence.
1192             *
1193             * @param socialActivityPersistence the social activity persistence
1194             */
1195            public void setSocialActivityPersistence(
1196                    SocialActivityPersistence socialActivityPersistence) {
1197                    this.socialActivityPersistence = socialActivityPersistence;
1198            }
1199    
1200            /**
1201             * Returns the social activity finder.
1202             *
1203             * @return the social activity finder
1204             */
1205            public SocialActivityFinder getSocialActivityFinder() {
1206                    return socialActivityFinder;
1207            }
1208    
1209            /**
1210             * Sets the social activity finder.
1211             *
1212             * @param socialActivityFinder the social activity finder
1213             */
1214            public void setSocialActivityFinder(
1215                    SocialActivityFinder socialActivityFinder) {
1216                    this.socialActivityFinder = socialActivityFinder;
1217            }
1218    
1219            public void afterPropertiesSet() {
1220                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.messageboards.model.MBThread",
1221                            mbThreadLocalService);
1222            }
1223    
1224            public void destroy() {
1225                    persistedModelLocalServiceRegistry.unregister(
1226                            "com.liferay.portlet.messageboards.model.MBThread");
1227            }
1228    
1229            /**
1230             * Returns the Spring bean ID for this bean.
1231             *
1232             * @return the Spring bean ID for this bean
1233             */
1234            public String getBeanIdentifier() {
1235                    return _beanIdentifier;
1236            }
1237    
1238            /**
1239             * Sets the Spring bean ID for this bean.
1240             *
1241             * @param beanIdentifier the Spring bean ID for this bean
1242             */
1243            public void setBeanIdentifier(String beanIdentifier) {
1244                    _beanIdentifier = beanIdentifier;
1245            }
1246    
1247            protected ClassLoader getClassLoader() {
1248                    Class<?> clazz = getClass();
1249    
1250                    return clazz.getClassLoader();
1251            }
1252    
1253            protected Class<?> getModelClass() {
1254                    return MBThread.class;
1255            }
1256    
1257            protected String getModelClassName() {
1258                    return MBThread.class.getName();
1259            }
1260    
1261            /**
1262             * Performs an SQL query.
1263             *
1264             * @param sql the sql query
1265             */
1266            protected void runSQL(String sql) throws SystemException {
1267                    try {
1268                            DataSource dataSource = mbThreadPersistence.getDataSource();
1269    
1270                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1271                                            sql, new int[0]);
1272    
1273                            sqlUpdate.update();
1274                    }
1275                    catch (Exception e) {
1276                            throw new SystemException(e);
1277                    }
1278            }
1279    
1280            @BeanReference(type = MBBanLocalService.class)
1281            protected MBBanLocalService mbBanLocalService;
1282            @BeanReference(type = MBBanService.class)
1283            protected MBBanService mbBanService;
1284            @BeanReference(type = MBBanPersistence.class)
1285            protected MBBanPersistence mbBanPersistence;
1286            @BeanReference(type = MBCategoryLocalService.class)
1287            protected MBCategoryLocalService mbCategoryLocalService;
1288            @BeanReference(type = MBCategoryService.class)
1289            protected MBCategoryService mbCategoryService;
1290            @BeanReference(type = MBCategoryPersistence.class)
1291            protected MBCategoryPersistence mbCategoryPersistence;
1292            @BeanReference(type = MBCategoryFinder.class)
1293            protected MBCategoryFinder mbCategoryFinder;
1294            @BeanReference(type = MBDiscussionLocalService.class)
1295            protected MBDiscussionLocalService mbDiscussionLocalService;
1296            @BeanReference(type = MBDiscussionPersistence.class)
1297            protected MBDiscussionPersistence mbDiscussionPersistence;
1298            @BeanReference(type = MBMailingListLocalService.class)
1299            protected MBMailingListLocalService mbMailingListLocalService;
1300            @BeanReference(type = MBMailingListPersistence.class)
1301            protected MBMailingListPersistence mbMailingListPersistence;
1302            @BeanReference(type = MBMessageLocalService.class)
1303            protected MBMessageLocalService mbMessageLocalService;
1304            @BeanReference(type = MBMessageService.class)
1305            protected MBMessageService mbMessageService;
1306            @BeanReference(type = MBMessagePersistence.class)
1307            protected MBMessagePersistence mbMessagePersistence;
1308            @BeanReference(type = MBMessageFinder.class)
1309            protected MBMessageFinder mbMessageFinder;
1310            @BeanReference(type = MBStatsUserLocalService.class)
1311            protected MBStatsUserLocalService mbStatsUserLocalService;
1312            @BeanReference(type = MBStatsUserPersistence.class)
1313            protected MBStatsUserPersistence mbStatsUserPersistence;
1314            @BeanReference(type = MBThreadLocalService.class)
1315            protected MBThreadLocalService mbThreadLocalService;
1316            @BeanReference(type = MBThreadService.class)
1317            protected MBThreadService mbThreadService;
1318            @BeanReference(type = MBThreadPersistence.class)
1319            protected MBThreadPersistence mbThreadPersistence;
1320            @BeanReference(type = MBThreadFinder.class)
1321            protected MBThreadFinder mbThreadFinder;
1322            @BeanReference(type = MBThreadFlagLocalService.class)
1323            protected MBThreadFlagLocalService mbThreadFlagLocalService;
1324            @BeanReference(type = MBThreadFlagPersistence.class)
1325            protected MBThreadFlagPersistence mbThreadFlagPersistence;
1326            @BeanReference(type = CounterLocalService.class)
1327            protected CounterLocalService counterLocalService;
1328            @BeanReference(type = LockLocalService.class)
1329            protected LockLocalService lockLocalService;
1330            @BeanReference(type = LockPersistence.class)
1331            protected LockPersistence lockPersistence;
1332            @BeanReference(type = LockFinder.class)
1333            protected LockFinder lockFinder;
1334            @BeanReference(type = ResourceLocalService.class)
1335            protected ResourceLocalService resourceLocalService;
1336            @BeanReference(type = ResourceService.class)
1337            protected ResourceService resourceService;
1338            @BeanReference(type = ResourcePersistence.class)
1339            protected ResourcePersistence resourcePersistence;
1340            @BeanReference(type = ResourceFinder.class)
1341            protected ResourceFinder resourceFinder;
1342            @BeanReference(type = UserLocalService.class)
1343            protected UserLocalService userLocalService;
1344            @BeanReference(type = UserService.class)
1345            protected UserService userService;
1346            @BeanReference(type = UserPersistence.class)
1347            protected UserPersistence userPersistence;
1348            @BeanReference(type = UserFinder.class)
1349            protected UserFinder userFinder;
1350            @BeanReference(type = WorkflowInstanceLinkLocalService.class)
1351            protected WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService;
1352            @BeanReference(type = WorkflowInstanceLinkPersistence.class)
1353            protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
1354            @BeanReference(type = AssetEntryLocalService.class)
1355            protected AssetEntryLocalService assetEntryLocalService;
1356            @BeanReference(type = AssetEntryService.class)
1357            protected AssetEntryService assetEntryService;
1358            @BeanReference(type = AssetEntryPersistence.class)
1359            protected AssetEntryPersistence assetEntryPersistence;
1360            @BeanReference(type = AssetEntryFinder.class)
1361            protected AssetEntryFinder assetEntryFinder;
1362            @BeanReference(type = RatingsStatsLocalService.class)
1363            protected RatingsStatsLocalService ratingsStatsLocalService;
1364            @BeanReference(type = RatingsStatsPersistence.class)
1365            protected RatingsStatsPersistence ratingsStatsPersistence;
1366            @BeanReference(type = RatingsStatsFinder.class)
1367            protected RatingsStatsFinder ratingsStatsFinder;
1368            @BeanReference(type = SocialActivityLocalService.class)
1369            protected SocialActivityLocalService socialActivityLocalService;
1370            @BeanReference(type = SocialActivityPersistence.class)
1371            protected SocialActivityPersistence socialActivityPersistence;
1372            @BeanReference(type = SocialActivityFinder.class)
1373            protected SocialActivityFinder socialActivityFinder;
1374            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1375            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1376            private static Log _log = LogFactoryUtil.getLog(MBThreadLocalServiceBaseImpl.class);
1377            private String _beanIdentifier;
1378    }