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