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