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