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