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