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