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