001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.dao.db.DB;
021    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
025    import com.liferay.portal.kernel.dao.orm.Criterion;
026    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.Disjunction;
028    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
029    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
030    import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
031    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
032    import com.liferay.portal.kernel.dao.orm.Projection;
033    import com.liferay.portal.kernel.dao.orm.Property;
034    import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil;
035    import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil;
036    import com.liferay.portal.kernel.exception.PortalException;
037    import com.liferay.portal.kernel.exception.SystemException;
038    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
039    import com.liferay.portal.kernel.search.Indexable;
040    import com.liferay.portal.kernel.search.IndexableType;
041    import com.liferay.portal.kernel.util.OrderByComparator;
042    import com.liferay.portal.kernel.workflow.WorkflowConstants;
043    import com.liferay.portal.model.PersistedModel;
044    import com.liferay.portal.service.BaseLocalServiceImpl;
045    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
046    import com.liferay.portal.service.persistence.ClassNamePersistence;
047    import com.liferay.portal.service.persistence.CompanyPersistence;
048    import com.liferay.portal.service.persistence.GroupFinder;
049    import com.liferay.portal.service.persistence.GroupPersistence;
050    import com.liferay.portal.service.persistence.PortletPreferencesFinder;
051    import com.liferay.portal.service.persistence.PortletPreferencesPersistence;
052    import com.liferay.portal.service.persistence.SubscriptionPersistence;
053    import com.liferay.portal.service.persistence.UserFinder;
054    import com.liferay.portal.service.persistence.UserPersistence;
055    import com.liferay.portal.service.persistence.WorkflowInstanceLinkPersistence;
056    import com.liferay.portal.util.PortalUtil;
057    
058    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
059    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
060    import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence;
061    import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
062    import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
063    import com.liferay.portlet.blogs.service.persistence.BlogsEntryFinder;
064    import com.liferay.portlet.blogs.service.persistence.BlogsEntryPersistence;
065    import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
066    import com.liferay.portlet.exportimport.lar.ExportImportHelperUtil;
067    import com.liferay.portlet.exportimport.lar.ManifestSummary;
068    import com.liferay.portlet.exportimport.lar.PortletDataContext;
069    import com.liferay.portlet.exportimport.lar.StagedModelDataHandler;
070    import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerRegistryUtil;
071    import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil;
072    import com.liferay.portlet.exportimport.lar.StagedModelType;
073    import com.liferay.portlet.messageboards.model.MBMessage;
074    import com.liferay.portlet.messageboards.service.MBMessageLocalService;
075    import com.liferay.portlet.messageboards.service.persistence.MBCategoryFinder;
076    import com.liferay.portlet.messageboards.service.persistence.MBCategoryPersistence;
077    import com.liferay.portlet.messageboards.service.persistence.MBDiscussionPersistence;
078    import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
079    import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
080    import com.liferay.portlet.messageboards.service.persistence.MBStatsUserPersistence;
081    import com.liferay.portlet.messageboards.service.persistence.MBThreadFinder;
082    import com.liferay.portlet.messageboards.service.persistence.MBThreadPersistence;
083    import com.liferay.portlet.ratings.service.persistence.RatingsStatsFinder;
084    import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
085    
086    import java.io.Serializable;
087    
088    import java.util.List;
089    
090    import javax.sql.DataSource;
091    
092    /**
093     * Provides the base implementation for the message-boards message local service.
094     *
095     * <p>
096     * 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.MBMessageLocalServiceImpl}.
097     * </p>
098     *
099     * @author Brian Wing Shun Chan
100     * @see com.liferay.portlet.messageboards.service.impl.MBMessageLocalServiceImpl
101     * @see com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil
102     * @generated
103     */
104    @ProviderType
105    public abstract class MBMessageLocalServiceBaseImpl extends BaseLocalServiceImpl
106            implements MBMessageLocalService, IdentifiableOSGiService {
107            /*
108             * NOTE FOR DEVELOPERS:
109             *
110             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil} to access the message-boards message local service.
111             */
112    
113            /**
114             * Adds the message-boards message to the database. Also notifies the appropriate model listeners.
115             *
116             * @param mbMessage the message-boards message
117             * @return the message-boards message that was added
118             */
119            @Indexable(type = IndexableType.REINDEX)
120            @Override
121            public MBMessage addMBMessage(MBMessage mbMessage) {
122                    mbMessage.setNew(true);
123    
124                    return mbMessagePersistence.update(mbMessage);
125            }
126    
127            /**
128             * Creates a new message-boards message with the primary key. Does not add the message-boards message to the database.
129             *
130             * @param messageId the primary key for the new message-boards message
131             * @return the new message-boards message
132             */
133            @Override
134            public MBMessage createMBMessage(long messageId) {
135                    return mbMessagePersistence.create(messageId);
136            }
137    
138            /**
139             * Deletes the message-boards message with the primary key from the database. Also notifies the appropriate model listeners.
140             *
141             * @param messageId the primary key of the message-boards message
142             * @return the message-boards message that was removed
143             * @throws PortalException if a message-boards message with the primary key could not be found
144             */
145            @Indexable(type = IndexableType.DELETE)
146            @Override
147            public MBMessage deleteMBMessage(long messageId) throws PortalException {
148                    return mbMessagePersistence.remove(messageId);
149            }
150    
151            /**
152             * Deletes the message-boards message from the database. Also notifies the appropriate model listeners.
153             *
154             * @param mbMessage the message-boards message
155             * @return the message-boards message that was removed
156             */
157            @Indexable(type = IndexableType.DELETE)
158            @Override
159            public MBMessage deleteMBMessage(MBMessage mbMessage) {
160                    return mbMessagePersistence.remove(mbMessage);
161            }
162    
163            @Override
164            public DynamicQuery dynamicQuery() {
165                    Class<?> clazz = getClass();
166    
167                    return DynamicQueryFactoryUtil.forClass(MBMessage.class,
168                            clazz.getClassLoader());
169            }
170    
171            /**
172             * Performs a dynamic query on the database and returns the matching rows.
173             *
174             * @param dynamicQuery the dynamic query
175             * @return the matching rows
176             */
177            @Override
178            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
179                    return mbMessagePersistence.findWithDynamicQuery(dynamicQuery);
180            }
181    
182            /**
183             * Performs a dynamic query on the database and returns a range of the matching rows.
184             *
185             * <p>
186             * 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.MBMessageModelImpl}. 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.
187             * </p>
188             *
189             * @param dynamicQuery the dynamic query
190             * @param start the lower bound of the range of model instances
191             * @param end the upper bound of the range of model instances (not inclusive)
192             * @return the range of matching rows
193             */
194            @Override
195            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
196                    int end) {
197                    return mbMessagePersistence.findWithDynamicQuery(dynamicQuery, start,
198                            end);
199            }
200    
201            /**
202             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
203             *
204             * <p>
205             * 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.MBMessageModelImpl}. 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.
206             * </p>
207             *
208             * @param dynamicQuery the dynamic query
209             * @param start the lower bound of the range of model instances
210             * @param end the upper bound of the range of model instances (not inclusive)
211             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
212             * @return the ordered range of matching rows
213             */
214            @Override
215            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
216                    int end, OrderByComparator<T> orderByComparator) {
217                    return mbMessagePersistence.findWithDynamicQuery(dynamicQuery, start,
218                            end, orderByComparator);
219            }
220    
221            /**
222             * Returns the number of rows matching the dynamic query.
223             *
224             * @param dynamicQuery the dynamic query
225             * @return the number of rows matching the dynamic query
226             */
227            @Override
228            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
229                    return mbMessagePersistence.countWithDynamicQuery(dynamicQuery);
230            }
231    
232            /**
233             * Returns the number of rows matching the dynamic query.
234             *
235             * @param dynamicQuery the dynamic query
236             * @param projection the projection to apply to the query
237             * @return the number of rows matching the dynamic query
238             */
239            @Override
240            public long dynamicQueryCount(DynamicQuery dynamicQuery,
241                    Projection projection) {
242                    return mbMessagePersistence.countWithDynamicQuery(dynamicQuery,
243                            projection);
244            }
245    
246            @Override
247            public MBMessage fetchMBMessage(long messageId) {
248                    return mbMessagePersistence.fetchByPrimaryKey(messageId);
249            }
250    
251            /**
252             * Returns the message-boards message matching the UUID and group.
253             *
254             * @param uuid the message-boards message's UUID
255             * @param groupId the primary key of the group
256             * @return the matching message-boards message, or <code>null</code> if a matching message-boards message could not be found
257             */
258            @Override
259            public MBMessage fetchMBMessageByUuidAndGroupId(String uuid, long groupId) {
260                    return mbMessagePersistence.fetchByUUID_G(uuid, groupId);
261            }
262    
263            /**
264             * Returns the message-boards message with the primary key.
265             *
266             * @param messageId the primary key of the message-boards message
267             * @return the message-boards message
268             * @throws PortalException if a message-boards message with the primary key could not be found
269             */
270            @Override
271            public MBMessage getMBMessage(long messageId) throws PortalException {
272                    return mbMessagePersistence.findByPrimaryKey(messageId);
273            }
274    
275            @Override
276            public ActionableDynamicQuery getActionableDynamicQuery() {
277                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
278    
279                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil.getService());
280                    actionableDynamicQuery.setClassLoader(getClassLoader());
281                    actionableDynamicQuery.setModelClass(MBMessage.class);
282    
283                    actionableDynamicQuery.setPrimaryKeyPropertyName("messageId");
284    
285                    return actionableDynamicQuery;
286            }
287    
288            @Override
289            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
290                    IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery();
291    
292                    indexableActionableDynamicQuery.setBaseLocalService(com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil.getService());
293                    indexableActionableDynamicQuery.setClassLoader(getClassLoader());
294                    indexableActionableDynamicQuery.setModelClass(MBMessage.class);
295    
296                    indexableActionableDynamicQuery.setPrimaryKeyPropertyName("messageId");
297    
298                    return indexableActionableDynamicQuery;
299            }
300    
301            protected void initActionableDynamicQuery(
302                    ActionableDynamicQuery actionableDynamicQuery) {
303                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil.getService());
304                    actionableDynamicQuery.setClassLoader(getClassLoader());
305                    actionableDynamicQuery.setModelClass(MBMessage.class);
306    
307                    actionableDynamicQuery.setPrimaryKeyPropertyName("messageId");
308            }
309    
310            @Override
311            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
312                    final PortletDataContext portletDataContext) {
313                    final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
314                                    @Override
315                                    public long performCount() throws PortalException {
316                                            ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
317    
318                                            StagedModelType stagedModelType = getStagedModelType();
319    
320                                            long modelAdditionCount = super.performCount();
321    
322                                            manifestSummary.addModelAdditionCount(stagedModelType,
323                                                    modelAdditionCount);
324    
325                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
326                                                            stagedModelType);
327    
328                                            manifestSummary.addModelDeletionCount(stagedModelType,
329                                                    modelDeletionCount);
330    
331                                            return modelAdditionCount;
332                                    }
333                            };
334    
335                    initActionableDynamicQuery(exportActionableDynamicQuery);
336    
337                    exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
338                                    @Override
339                                    public void addCriteria(DynamicQuery dynamicQuery) {
340                                            Criterion modifiedDateCriterion = portletDataContext.getDateRangeCriteria(
341                                                            "modifiedDate");
342                                            Criterion statusDateCriterion = portletDataContext.getDateRangeCriteria(
343                                                            "statusDate");
344    
345                                            if ((modifiedDateCriterion != null) &&
346                                                            (statusDateCriterion != null)) {
347                                                    Disjunction disjunction = RestrictionsFactoryUtil.disjunction();
348    
349                                                    disjunction.add(modifiedDateCriterion);
350                                                    disjunction.add(statusDateCriterion);
351    
352                                                    dynamicQuery.add(disjunction);
353                                            }
354    
355                                            StagedModelType stagedModelType = exportActionableDynamicQuery.getStagedModelType();
356    
357                                            long referrerClassNameId = stagedModelType.getReferrerClassNameId();
358    
359                                            Property classNameIdProperty = PropertyFactoryUtil.forName(
360                                                            "classNameId");
361    
362                                            if ((referrerClassNameId != StagedModelType.REFERRER_CLASS_NAME_ID_ALL) &&
363                                                            (referrerClassNameId != StagedModelType.REFERRER_CLASS_NAME_ID_ANY)) {
364                                                    dynamicQuery.add(classNameIdProperty.eq(
365                                                                    stagedModelType.getReferrerClassNameId()));
366                                            }
367                                            else if (referrerClassNameId == StagedModelType.REFERRER_CLASS_NAME_ID_ANY) {
368                                                    dynamicQuery.add(classNameIdProperty.isNotNull());
369                                            }
370    
371                                            Property workflowStatusProperty = PropertyFactoryUtil.forName(
372                                                            "status");
373    
374                                            if (portletDataContext.isInitialPublication()) {
375                                                    dynamicQuery.add(workflowStatusProperty.ne(
376                                                                    WorkflowConstants.STATUS_IN_TRASH));
377                                            }
378                                            else {
379                                                    StagedModelDataHandler<?> stagedModelDataHandler = StagedModelDataHandlerRegistryUtil.getStagedModelDataHandler(MBMessage.class.getName());
380    
381                                                    dynamicQuery.add(workflowStatusProperty.in(
382                                                                    stagedModelDataHandler.getExportableStatuses()));
383                                            }
384                                    }
385                            });
386    
387                    exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
388    
389                    exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());
390    
391                    exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<MBMessage>() {
392                                    @Override
393                                    public void performAction(MBMessage mbMessage)
394                                            throws PortalException {
395                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
396                                                    mbMessage);
397                                    }
398                            });
399                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
400                                    PortalUtil.getClassNameId(MBMessage.class.getName()),
401                                    StagedModelType.REFERRER_CLASS_NAME_ID_ALL));
402    
403                    return exportActionableDynamicQuery;
404            }
405    
406            /**
407             * @throws PortalException
408             */
409            @Override
410            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
411                    throws PortalException {
412                    return mbMessageLocalService.deleteMBMessage((MBMessage)persistedModel);
413            }
414    
415            @Override
416            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
417                    throws PortalException {
418                    return mbMessagePersistence.findByPrimaryKey(primaryKeyObj);
419            }
420    
421            /**
422             * Returns all the message-boards messages matching the UUID and company.
423             *
424             * @param uuid the UUID of the message-boards messages
425             * @param companyId the primary key of the company
426             * @return the matching message-boards messages, or an empty list if no matches were found
427             */
428            @Override
429            public List<MBMessage> getMBMessagesByUuidAndCompanyId(String uuid,
430                    long companyId) {
431                    return mbMessagePersistence.findByUuid_C(uuid, companyId);
432            }
433    
434            /**
435             * Returns a range of message-boards messages matching the UUID and company.
436             *
437             * @param uuid the UUID of the message-boards messages
438             * @param companyId the primary key of the company
439             * @param start the lower bound of the range of message-boards messages
440             * @param end the upper bound of the range of message-boards messages (not inclusive)
441             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
442             * @return the range of matching message-boards messages, or an empty list if no matches were found
443             */
444            @Override
445            public List<MBMessage> getMBMessagesByUuidAndCompanyId(String uuid,
446                    long companyId, int start, int end,
447                    OrderByComparator<MBMessage> orderByComparator) {
448                    return mbMessagePersistence.findByUuid_C(uuid, companyId, start, end,
449                            orderByComparator);
450            }
451    
452            /**
453             * Returns the message-boards message matching the UUID and group.
454             *
455             * @param uuid the message-boards message's UUID
456             * @param groupId the primary key of the group
457             * @return the matching message-boards message
458             * @throws PortalException if a matching message-boards message could not be found
459             */
460            @Override
461            public MBMessage getMBMessageByUuidAndGroupId(String uuid, long groupId)
462                    throws PortalException {
463                    return mbMessagePersistence.findByUUID_G(uuid, groupId);
464            }
465    
466            /**
467             * Returns a range of all the message-boards messages.
468             *
469             * <p>
470             * 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.MBMessageModelImpl}. 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.
471             * </p>
472             *
473             * @param start the lower bound of the range of message-boards messages
474             * @param end the upper bound of the range of message-boards messages (not inclusive)
475             * @return the range of message-boards messages
476             */
477            @Override
478            public List<MBMessage> getMBMessages(int start, int end) {
479                    return mbMessagePersistence.findAll(start, end);
480            }
481    
482            /**
483             * Returns the number of message-boards messages.
484             *
485             * @return the number of message-boards messages
486             */
487            @Override
488            public int getMBMessagesCount() {
489                    return mbMessagePersistence.countAll();
490            }
491    
492            /**
493             * Updates the message-boards message in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
494             *
495             * @param mbMessage the message-boards message
496             * @return the message-boards message that was updated
497             */
498            @Indexable(type = IndexableType.REINDEX)
499            @Override
500            public MBMessage updateMBMessage(MBMessage mbMessage) {
501                    return mbMessagePersistence.update(mbMessage);
502            }
503    
504            /**
505             * Returns the message-boards message local service.
506             *
507             * @return the message-boards message local service
508             */
509            public MBMessageLocalService getMBMessageLocalService() {
510                    return mbMessageLocalService;
511            }
512    
513            /**
514             * Sets the message-boards message local service.
515             *
516             * @param mbMessageLocalService the message-boards message local service
517             */
518            public void setMBMessageLocalService(
519                    MBMessageLocalService mbMessageLocalService) {
520                    this.mbMessageLocalService = mbMessageLocalService;
521            }
522    
523            /**
524             * Returns the message-boards message persistence.
525             *
526             * @return the message-boards message persistence
527             */
528            public MBMessagePersistence getMBMessagePersistence() {
529                    return mbMessagePersistence;
530            }
531    
532            /**
533             * Sets the message-boards message persistence.
534             *
535             * @param mbMessagePersistence the message-boards message persistence
536             */
537            public void setMBMessagePersistence(
538                    MBMessagePersistence mbMessagePersistence) {
539                    this.mbMessagePersistence = mbMessagePersistence;
540            }
541    
542            /**
543             * Returns the message-boards message finder.
544             *
545             * @return the message-boards message finder
546             */
547            public MBMessageFinder getMBMessageFinder() {
548                    return mbMessageFinder;
549            }
550    
551            /**
552             * Sets the message-boards message finder.
553             *
554             * @param mbMessageFinder the message-boards message finder
555             */
556            public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
557                    this.mbMessageFinder = mbMessageFinder;
558            }
559    
560            /**
561             * Returns the counter local service.
562             *
563             * @return the counter local service
564             */
565            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
566                    return counterLocalService;
567            }
568    
569            /**
570             * Sets the counter local service.
571             *
572             * @param counterLocalService the counter local service
573             */
574            public void setCounterLocalService(
575                    com.liferay.counter.service.CounterLocalService counterLocalService) {
576                    this.counterLocalService = counterLocalService;
577            }
578    
579            /**
580             * Returns the class name local service.
581             *
582             * @return the class name local service
583             */
584            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
585                    return classNameLocalService;
586            }
587    
588            /**
589             * Sets the class name local service.
590             *
591             * @param classNameLocalService the class name local service
592             */
593            public void setClassNameLocalService(
594                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
595                    this.classNameLocalService = classNameLocalService;
596            }
597    
598            /**
599             * Returns the class name persistence.
600             *
601             * @return the class name persistence
602             */
603            public ClassNamePersistence getClassNamePersistence() {
604                    return classNamePersistence;
605            }
606    
607            /**
608             * Sets the class name persistence.
609             *
610             * @param classNamePersistence the class name persistence
611             */
612            public void setClassNamePersistence(
613                    ClassNamePersistence classNamePersistence) {
614                    this.classNamePersistence = classNamePersistence;
615            }
616    
617            /**
618             * Returns the company local service.
619             *
620             * @return the company local service
621             */
622            public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() {
623                    return companyLocalService;
624            }
625    
626            /**
627             * Sets the company local service.
628             *
629             * @param companyLocalService the company local service
630             */
631            public void setCompanyLocalService(
632                    com.liferay.portal.service.CompanyLocalService companyLocalService) {
633                    this.companyLocalService = companyLocalService;
634            }
635    
636            /**
637             * Returns the company persistence.
638             *
639             * @return the company persistence
640             */
641            public CompanyPersistence getCompanyPersistence() {
642                    return companyPersistence;
643            }
644    
645            /**
646             * Sets the company persistence.
647             *
648             * @param companyPersistence the company persistence
649             */
650            public void setCompanyPersistence(CompanyPersistence companyPersistence) {
651                    this.companyPersistence = companyPersistence;
652            }
653    
654            /**
655             * Returns the group local service.
656             *
657             * @return the group local service
658             */
659            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
660                    return groupLocalService;
661            }
662    
663            /**
664             * Sets the group local service.
665             *
666             * @param groupLocalService the group local service
667             */
668            public void setGroupLocalService(
669                    com.liferay.portal.service.GroupLocalService groupLocalService) {
670                    this.groupLocalService = groupLocalService;
671            }
672    
673            /**
674             * Returns the group persistence.
675             *
676             * @return the group persistence
677             */
678            public GroupPersistence getGroupPersistence() {
679                    return groupPersistence;
680            }
681    
682            /**
683             * Sets the group persistence.
684             *
685             * @param groupPersistence the group persistence
686             */
687            public void setGroupPersistence(GroupPersistence groupPersistence) {
688                    this.groupPersistence = groupPersistence;
689            }
690    
691            /**
692             * Returns the group finder.
693             *
694             * @return the group finder
695             */
696            public GroupFinder getGroupFinder() {
697                    return groupFinder;
698            }
699    
700            /**
701             * Sets the group finder.
702             *
703             * @param groupFinder the group finder
704             */
705            public void setGroupFinder(GroupFinder groupFinder) {
706                    this.groupFinder = groupFinder;
707            }
708    
709            /**
710             * Returns the portlet preferences local service.
711             *
712             * @return the portlet preferences local service
713             */
714            public com.liferay.portal.service.PortletPreferencesLocalService getPortletPreferencesLocalService() {
715                    return portletPreferencesLocalService;
716            }
717    
718            /**
719             * Sets the portlet preferences local service.
720             *
721             * @param portletPreferencesLocalService the portlet preferences local service
722             */
723            public void setPortletPreferencesLocalService(
724                    com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService) {
725                    this.portletPreferencesLocalService = portletPreferencesLocalService;
726            }
727    
728            /**
729             * Returns the portlet preferences persistence.
730             *
731             * @return the portlet preferences persistence
732             */
733            public PortletPreferencesPersistence getPortletPreferencesPersistence() {
734                    return portletPreferencesPersistence;
735            }
736    
737            /**
738             * Sets the portlet preferences persistence.
739             *
740             * @param portletPreferencesPersistence the portlet preferences persistence
741             */
742            public void setPortletPreferencesPersistence(
743                    PortletPreferencesPersistence portletPreferencesPersistence) {
744                    this.portletPreferencesPersistence = portletPreferencesPersistence;
745            }
746    
747            /**
748             * Returns the portlet preferences finder.
749             *
750             * @return the portlet preferences finder
751             */
752            public PortletPreferencesFinder getPortletPreferencesFinder() {
753                    return portletPreferencesFinder;
754            }
755    
756            /**
757             * Sets the portlet preferences finder.
758             *
759             * @param portletPreferencesFinder the portlet preferences finder
760             */
761            public void setPortletPreferencesFinder(
762                    PortletPreferencesFinder portletPreferencesFinder) {
763                    this.portletPreferencesFinder = portletPreferencesFinder;
764            }
765    
766            /**
767             * Returns the resource local service.
768             *
769             * @return the resource local service
770             */
771            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
772                    return resourceLocalService;
773            }
774    
775            /**
776             * Sets the resource local service.
777             *
778             * @param resourceLocalService the resource local service
779             */
780            public void setResourceLocalService(
781                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
782                    this.resourceLocalService = resourceLocalService;
783            }
784    
785            /**
786             * Returns the subscription local service.
787             *
788             * @return the subscription local service
789             */
790            public com.liferay.portal.service.SubscriptionLocalService getSubscriptionLocalService() {
791                    return subscriptionLocalService;
792            }
793    
794            /**
795             * Sets the subscription local service.
796             *
797             * @param subscriptionLocalService the subscription local service
798             */
799            public void setSubscriptionLocalService(
800                    com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService) {
801                    this.subscriptionLocalService = subscriptionLocalService;
802            }
803    
804            /**
805             * Returns the subscription persistence.
806             *
807             * @return the subscription persistence
808             */
809            public SubscriptionPersistence getSubscriptionPersistence() {
810                    return subscriptionPersistence;
811            }
812    
813            /**
814             * Sets the subscription persistence.
815             *
816             * @param subscriptionPersistence the subscription persistence
817             */
818            public void setSubscriptionPersistence(
819                    SubscriptionPersistence subscriptionPersistence) {
820                    this.subscriptionPersistence = subscriptionPersistence;
821            }
822    
823            /**
824             * Returns the user local service.
825             *
826             * @return the user local service
827             */
828            public com.liferay.portal.service.UserLocalService getUserLocalService() {
829                    return userLocalService;
830            }
831    
832            /**
833             * Sets the user local service.
834             *
835             * @param userLocalService the user local service
836             */
837            public void setUserLocalService(
838                    com.liferay.portal.service.UserLocalService userLocalService) {
839                    this.userLocalService = userLocalService;
840            }
841    
842            /**
843             * Returns the user persistence.
844             *
845             * @return the user persistence
846             */
847            public UserPersistence getUserPersistence() {
848                    return userPersistence;
849            }
850    
851            /**
852             * Sets the user persistence.
853             *
854             * @param userPersistence the user persistence
855             */
856            public void setUserPersistence(UserPersistence userPersistence) {
857                    this.userPersistence = userPersistence;
858            }
859    
860            /**
861             * Returns the user finder.
862             *
863             * @return the user finder
864             */
865            public UserFinder getUserFinder() {
866                    return userFinder;
867            }
868    
869            /**
870             * Sets the user finder.
871             *
872             * @param userFinder the user finder
873             */
874            public void setUserFinder(UserFinder userFinder) {
875                    this.userFinder = userFinder;
876            }
877    
878            /**
879             * Returns the workflow instance link local service.
880             *
881             * @return the workflow instance link local service
882             */
883            public com.liferay.portal.service.WorkflowInstanceLinkLocalService getWorkflowInstanceLinkLocalService() {
884                    return workflowInstanceLinkLocalService;
885            }
886    
887            /**
888             * Sets the workflow instance link local service.
889             *
890             * @param workflowInstanceLinkLocalService the workflow instance link local service
891             */
892            public void setWorkflowInstanceLinkLocalService(
893                    com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService) {
894                    this.workflowInstanceLinkLocalService = workflowInstanceLinkLocalService;
895            }
896    
897            /**
898             * Returns the workflow instance link persistence.
899             *
900             * @return the workflow instance link persistence
901             */
902            public WorkflowInstanceLinkPersistence getWorkflowInstanceLinkPersistence() {
903                    return workflowInstanceLinkPersistence;
904            }
905    
906            /**
907             * Sets the workflow instance link persistence.
908             *
909             * @param workflowInstanceLinkPersistence the workflow instance link persistence
910             */
911            public void setWorkflowInstanceLinkPersistence(
912                    WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence) {
913                    this.workflowInstanceLinkPersistence = workflowInstanceLinkPersistence;
914            }
915    
916            /**
917             * Returns the asset entry local service.
918             *
919             * @return the asset entry local service
920             */
921            public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
922                    return assetEntryLocalService;
923            }
924    
925            /**
926             * Sets the asset entry local service.
927             *
928             * @param assetEntryLocalService the asset entry local service
929             */
930            public void setAssetEntryLocalService(
931                    com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
932                    this.assetEntryLocalService = assetEntryLocalService;
933            }
934    
935            /**
936             * Returns the asset entry persistence.
937             *
938             * @return the asset entry persistence
939             */
940            public AssetEntryPersistence getAssetEntryPersistence() {
941                    return assetEntryPersistence;
942            }
943    
944            /**
945             * Sets the asset entry persistence.
946             *
947             * @param assetEntryPersistence the asset entry persistence
948             */
949            public void setAssetEntryPersistence(
950                    AssetEntryPersistence assetEntryPersistence) {
951                    this.assetEntryPersistence = assetEntryPersistence;
952            }
953    
954            /**
955             * Returns the asset entry finder.
956             *
957             * @return the asset entry finder
958             */
959            public AssetEntryFinder getAssetEntryFinder() {
960                    return assetEntryFinder;
961            }
962    
963            /**
964             * Sets the asset entry finder.
965             *
966             * @param assetEntryFinder the asset entry finder
967             */
968            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
969                    this.assetEntryFinder = assetEntryFinder;
970            }
971    
972            /**
973             * Returns the asset link local service.
974             *
975             * @return the asset link local service
976             */
977            public com.liferay.portlet.asset.service.AssetLinkLocalService getAssetLinkLocalService() {
978                    return assetLinkLocalService;
979            }
980    
981            /**
982             * Sets the asset link local service.
983             *
984             * @param assetLinkLocalService the asset link local service
985             */
986            public void setAssetLinkLocalService(
987                    com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService) {
988                    this.assetLinkLocalService = assetLinkLocalService;
989            }
990    
991            /**
992             * Returns the asset link persistence.
993             *
994             * @return the asset link persistence
995             */
996            public AssetLinkPersistence getAssetLinkPersistence() {
997                    return assetLinkPersistence;
998            }
999    
1000            /**
1001             * Sets the asset link persistence.
1002             *
1003             * @param assetLinkPersistence the asset link persistence
1004             */
1005            public void setAssetLinkPersistence(
1006                    AssetLinkPersistence assetLinkPersistence) {
1007                    this.assetLinkPersistence = assetLinkPersistence;
1008            }
1009    
1010            /**
1011             * Returns the asset tag local service.
1012             *
1013             * @return the asset tag local service
1014             */
1015            public com.liferay.portlet.asset.service.AssetTagLocalService getAssetTagLocalService() {
1016                    return assetTagLocalService;
1017            }
1018    
1019            /**
1020             * Sets the asset tag local service.
1021             *
1022             * @param assetTagLocalService the asset tag local service
1023             */
1024            public void setAssetTagLocalService(
1025                    com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService) {
1026                    this.assetTagLocalService = assetTagLocalService;
1027            }
1028    
1029            /**
1030             * Returns the asset tag persistence.
1031             *
1032             * @return the asset tag persistence
1033             */
1034            public AssetTagPersistence getAssetTagPersistence() {
1035                    return assetTagPersistence;
1036            }
1037    
1038            /**
1039             * Sets the asset tag persistence.
1040             *
1041             * @param assetTagPersistence the asset tag persistence
1042             */
1043            public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
1044                    this.assetTagPersistence = assetTagPersistence;
1045            }
1046    
1047            /**
1048             * Returns the asset tag finder.
1049             *
1050             * @return the asset tag finder
1051             */
1052            public AssetTagFinder getAssetTagFinder() {
1053                    return assetTagFinder;
1054            }
1055    
1056            /**
1057             * Sets the asset tag finder.
1058             *
1059             * @param assetTagFinder the asset tag finder
1060             */
1061            public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
1062                    this.assetTagFinder = assetTagFinder;
1063            }
1064    
1065            /**
1066             * Returns the blogs entry local service.
1067             *
1068             * @return the blogs entry local service
1069             */
1070            public com.liferay.portlet.blogs.service.BlogsEntryLocalService getBlogsEntryLocalService() {
1071                    return blogsEntryLocalService;
1072            }
1073    
1074            /**
1075             * Sets the blogs entry local service.
1076             *
1077             * @param blogsEntryLocalService the blogs entry local service
1078             */
1079            public void setBlogsEntryLocalService(
1080                    com.liferay.portlet.blogs.service.BlogsEntryLocalService blogsEntryLocalService) {
1081                    this.blogsEntryLocalService = blogsEntryLocalService;
1082            }
1083    
1084            /**
1085             * Returns the blogs entry persistence.
1086             *
1087             * @return the blogs entry persistence
1088             */
1089            public BlogsEntryPersistence getBlogsEntryPersistence() {
1090                    return blogsEntryPersistence;
1091            }
1092    
1093            /**
1094             * Sets the blogs entry persistence.
1095             *
1096             * @param blogsEntryPersistence the blogs entry persistence
1097             */
1098            public void setBlogsEntryPersistence(
1099                    BlogsEntryPersistence blogsEntryPersistence) {
1100                    this.blogsEntryPersistence = blogsEntryPersistence;
1101            }
1102    
1103            /**
1104             * Returns the blogs entry finder.
1105             *
1106             * @return the blogs entry finder
1107             */
1108            public BlogsEntryFinder getBlogsEntryFinder() {
1109                    return blogsEntryFinder;
1110            }
1111    
1112            /**
1113             * Sets the blogs entry finder.
1114             *
1115             * @param blogsEntryFinder the blogs entry finder
1116             */
1117            public void setBlogsEntryFinder(BlogsEntryFinder blogsEntryFinder) {
1118                    this.blogsEntryFinder = blogsEntryFinder;
1119            }
1120    
1121            /**
1122             * Returns the expando row local service.
1123             *
1124             * @return the expando row local service
1125             */
1126            public com.liferay.portlet.expando.service.ExpandoRowLocalService getExpandoRowLocalService() {
1127                    return expandoRowLocalService;
1128            }
1129    
1130            /**
1131             * Sets the expando row local service.
1132             *
1133             * @param expandoRowLocalService the expando row local service
1134             */
1135            public void setExpandoRowLocalService(
1136                    com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService) {
1137                    this.expandoRowLocalService = expandoRowLocalService;
1138            }
1139    
1140            /**
1141             * Returns the expando row persistence.
1142             *
1143             * @return the expando row persistence
1144             */
1145            public ExpandoRowPersistence getExpandoRowPersistence() {
1146                    return expandoRowPersistence;
1147            }
1148    
1149            /**
1150             * Sets the expando row persistence.
1151             *
1152             * @param expandoRowPersistence the expando row persistence
1153             */
1154            public void setExpandoRowPersistence(
1155                    ExpandoRowPersistence expandoRowPersistence) {
1156                    this.expandoRowPersistence = expandoRowPersistence;
1157            }
1158    
1159            /**
1160             * Returns the message boards category local service.
1161             *
1162             * @return the message boards category local service
1163             */
1164            public com.liferay.portlet.messageboards.service.MBCategoryLocalService getMBCategoryLocalService() {
1165                    return mbCategoryLocalService;
1166            }
1167    
1168            /**
1169             * Sets the message boards category local service.
1170             *
1171             * @param mbCategoryLocalService the message boards category local service
1172             */
1173            public void setMBCategoryLocalService(
1174                    com.liferay.portlet.messageboards.service.MBCategoryLocalService mbCategoryLocalService) {
1175                    this.mbCategoryLocalService = mbCategoryLocalService;
1176            }
1177    
1178            /**
1179             * Returns the message boards category persistence.
1180             *
1181             * @return the message boards category persistence
1182             */
1183            public MBCategoryPersistence getMBCategoryPersistence() {
1184                    return mbCategoryPersistence;
1185            }
1186    
1187            /**
1188             * Sets the message boards category persistence.
1189             *
1190             * @param mbCategoryPersistence the message boards category persistence
1191             */
1192            public void setMBCategoryPersistence(
1193                    MBCategoryPersistence mbCategoryPersistence) {
1194                    this.mbCategoryPersistence = mbCategoryPersistence;
1195            }
1196    
1197            /**
1198             * Returns the message boards category finder.
1199             *
1200             * @return the message boards category finder
1201             */
1202            public MBCategoryFinder getMBCategoryFinder() {
1203                    return mbCategoryFinder;
1204            }
1205    
1206            /**
1207             * Sets the message boards category finder.
1208             *
1209             * @param mbCategoryFinder the message boards category finder
1210             */
1211            public void setMBCategoryFinder(MBCategoryFinder mbCategoryFinder) {
1212                    this.mbCategoryFinder = mbCategoryFinder;
1213            }
1214    
1215            /**
1216             * Returns the message boards discussion local service.
1217             *
1218             * @return the message boards discussion local service
1219             */
1220            public com.liferay.portlet.messageboards.service.MBDiscussionLocalService getMBDiscussionLocalService() {
1221                    return mbDiscussionLocalService;
1222            }
1223    
1224            /**
1225             * Sets the message boards discussion local service.
1226             *
1227             * @param mbDiscussionLocalService the message boards discussion local service
1228             */
1229            public void setMBDiscussionLocalService(
1230                    com.liferay.portlet.messageboards.service.MBDiscussionLocalService mbDiscussionLocalService) {
1231                    this.mbDiscussionLocalService = mbDiscussionLocalService;
1232            }
1233    
1234            /**
1235             * Returns the message boards discussion persistence.
1236             *
1237             * @return the message boards discussion persistence
1238             */
1239            public MBDiscussionPersistence getMBDiscussionPersistence() {
1240                    return mbDiscussionPersistence;
1241            }
1242    
1243            /**
1244             * Sets the message boards discussion persistence.
1245             *
1246             * @param mbDiscussionPersistence the message boards discussion persistence
1247             */
1248            public void setMBDiscussionPersistence(
1249                    MBDiscussionPersistence mbDiscussionPersistence) {
1250                    this.mbDiscussionPersistence = mbDiscussionPersistence;
1251            }
1252    
1253            /**
1254             * Returns the ratings stats local service.
1255             *
1256             * @return the ratings stats local service
1257             */
1258            public com.liferay.portlet.ratings.service.RatingsStatsLocalService getRatingsStatsLocalService() {
1259                    return ratingsStatsLocalService;
1260            }
1261    
1262            /**
1263             * Sets the ratings stats local service.
1264             *
1265             * @param ratingsStatsLocalService the ratings stats local service
1266             */
1267            public void setRatingsStatsLocalService(
1268                    com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService) {
1269                    this.ratingsStatsLocalService = ratingsStatsLocalService;
1270            }
1271    
1272            /**
1273             * Returns the ratings stats persistence.
1274             *
1275             * @return the ratings stats persistence
1276             */
1277            public RatingsStatsPersistence getRatingsStatsPersistence() {
1278                    return ratingsStatsPersistence;
1279            }
1280    
1281            /**
1282             * Sets the ratings stats persistence.
1283             *
1284             * @param ratingsStatsPersistence the ratings stats persistence
1285             */
1286            public void setRatingsStatsPersistence(
1287                    RatingsStatsPersistence ratingsStatsPersistence) {
1288                    this.ratingsStatsPersistence = ratingsStatsPersistence;
1289            }
1290    
1291            /**
1292             * Returns the ratings stats finder.
1293             *
1294             * @return the ratings stats finder
1295             */
1296            public RatingsStatsFinder getRatingsStatsFinder() {
1297                    return ratingsStatsFinder;
1298            }
1299    
1300            /**
1301             * Sets the ratings stats finder.
1302             *
1303             * @param ratingsStatsFinder the ratings stats finder
1304             */
1305            public void setRatingsStatsFinder(RatingsStatsFinder ratingsStatsFinder) {
1306                    this.ratingsStatsFinder = ratingsStatsFinder;
1307            }
1308    
1309            /**
1310             * Returns the message boards stats user local service.
1311             *
1312             * @return the message boards stats user local service
1313             */
1314            public com.liferay.portlet.messageboards.service.MBStatsUserLocalService getMBStatsUserLocalService() {
1315                    return mbStatsUserLocalService;
1316            }
1317    
1318            /**
1319             * Sets the message boards stats user local service.
1320             *
1321             * @param mbStatsUserLocalService the message boards stats user local service
1322             */
1323            public void setMBStatsUserLocalService(
1324                    com.liferay.portlet.messageboards.service.MBStatsUserLocalService mbStatsUserLocalService) {
1325                    this.mbStatsUserLocalService = mbStatsUserLocalService;
1326            }
1327    
1328            /**
1329             * Returns the message boards stats user persistence.
1330             *
1331             * @return the message boards stats user persistence
1332             */
1333            public MBStatsUserPersistence getMBStatsUserPersistence() {
1334                    return mbStatsUserPersistence;
1335            }
1336    
1337            /**
1338             * Sets the message boards stats user persistence.
1339             *
1340             * @param mbStatsUserPersistence the message boards stats user persistence
1341             */
1342            public void setMBStatsUserPersistence(
1343                    MBStatsUserPersistence mbStatsUserPersistence) {
1344                    this.mbStatsUserPersistence = mbStatsUserPersistence;
1345            }
1346    
1347            /**
1348             * Returns the message boards thread local service.
1349             *
1350             * @return the message boards thread local service
1351             */
1352            public com.liferay.portlet.messageboards.service.MBThreadLocalService getMBThreadLocalService() {
1353                    return mbThreadLocalService;
1354            }
1355    
1356            /**
1357             * Sets the message boards thread local service.
1358             *
1359             * @param mbThreadLocalService the message boards thread local service
1360             */
1361            public void setMBThreadLocalService(
1362                    com.liferay.portlet.messageboards.service.MBThreadLocalService mbThreadLocalService) {
1363                    this.mbThreadLocalService = mbThreadLocalService;
1364            }
1365    
1366            /**
1367             * Returns the message boards thread persistence.
1368             *
1369             * @return the message boards thread persistence
1370             */
1371            public MBThreadPersistence getMBThreadPersistence() {
1372                    return mbThreadPersistence;
1373            }
1374    
1375            /**
1376             * Sets the message boards thread persistence.
1377             *
1378             * @param mbThreadPersistence the message boards thread persistence
1379             */
1380            public void setMBThreadPersistence(MBThreadPersistence mbThreadPersistence) {
1381                    this.mbThreadPersistence = mbThreadPersistence;
1382            }
1383    
1384            /**
1385             * Returns the message boards thread finder.
1386             *
1387             * @return the message boards thread finder
1388             */
1389            public MBThreadFinder getMBThreadFinder() {
1390                    return mbThreadFinder;
1391            }
1392    
1393            /**
1394             * Sets the message boards thread finder.
1395             *
1396             * @param mbThreadFinder the message boards thread finder
1397             */
1398            public void setMBThreadFinder(MBThreadFinder mbThreadFinder) {
1399                    this.mbThreadFinder = mbThreadFinder;
1400            }
1401    
1402            public void afterPropertiesSet() {
1403                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.messageboards.model.MBMessage",
1404                            mbMessageLocalService);
1405            }
1406    
1407            public void destroy() {
1408                    persistedModelLocalServiceRegistry.unregister(
1409                            "com.liferay.portlet.messageboards.model.MBMessage");
1410            }
1411    
1412            /**
1413             * Returns the OSGi service identifier.
1414             *
1415             * @return the OSGi service identifier
1416             */
1417            @Override
1418            public String getOSGiServiceIdentifier() {
1419                    return MBMessageLocalService.class.getName();
1420            }
1421    
1422            protected Class<?> getModelClass() {
1423                    return MBMessage.class;
1424            }
1425    
1426            protected String getModelClassName() {
1427                    return MBMessage.class.getName();
1428            }
1429    
1430            /**
1431             * Performs a SQL query.
1432             *
1433             * @param sql the sql query
1434             */
1435            protected void runSQL(String sql) {
1436                    try {
1437                            DataSource dataSource = mbMessagePersistence.getDataSource();
1438    
1439                            DB db = DBManagerUtil.getDB();
1440    
1441                            sql = db.buildSQL(sql);
1442                            sql = PortalUtil.transformSQL(sql);
1443    
1444                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1445                                            sql, new int[0]);
1446    
1447                            sqlUpdate.update();
1448                    }
1449                    catch (Exception e) {
1450                            throw new SystemException(e);
1451                    }
1452            }
1453    
1454            @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageLocalService.class)
1455            protected MBMessageLocalService mbMessageLocalService;
1456            @BeanReference(type = MBMessagePersistence.class)
1457            protected MBMessagePersistence mbMessagePersistence;
1458            @BeanReference(type = MBMessageFinder.class)
1459            protected MBMessageFinder mbMessageFinder;
1460            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
1461            protected com.liferay.counter.service.CounterLocalService counterLocalService;
1462            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
1463            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
1464            @BeanReference(type = ClassNamePersistence.class)
1465            protected ClassNamePersistence classNamePersistence;
1466            @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class)
1467            protected com.liferay.portal.service.CompanyLocalService companyLocalService;
1468            @BeanReference(type = CompanyPersistence.class)
1469            protected CompanyPersistence companyPersistence;
1470            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
1471            protected com.liferay.portal.service.GroupLocalService groupLocalService;
1472            @BeanReference(type = GroupPersistence.class)
1473            protected GroupPersistence groupPersistence;
1474            @BeanReference(type = GroupFinder.class)
1475            protected GroupFinder groupFinder;
1476            @BeanReference(type = com.liferay.portal.service.PortletPreferencesLocalService.class)
1477            protected com.liferay.portal.service.PortletPreferencesLocalService portletPreferencesLocalService;
1478            @BeanReference(type = PortletPreferencesPersistence.class)
1479            protected PortletPreferencesPersistence portletPreferencesPersistence;
1480            @BeanReference(type = PortletPreferencesFinder.class)
1481            protected PortletPreferencesFinder portletPreferencesFinder;
1482            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
1483            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1484            @BeanReference(type = com.liferay.portal.service.SubscriptionLocalService.class)
1485            protected com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService;
1486            @BeanReference(type = SubscriptionPersistence.class)
1487            protected SubscriptionPersistence subscriptionPersistence;
1488            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1489            protected com.liferay.portal.service.UserLocalService userLocalService;
1490            @BeanReference(type = UserPersistence.class)
1491            protected UserPersistence userPersistence;
1492            @BeanReference(type = UserFinder.class)
1493            protected UserFinder userFinder;
1494            @BeanReference(type = com.liferay.portal.service.WorkflowInstanceLinkLocalService.class)
1495            protected com.liferay.portal.service.WorkflowInstanceLinkLocalService workflowInstanceLinkLocalService;
1496            @BeanReference(type = WorkflowInstanceLinkPersistence.class)
1497            protected WorkflowInstanceLinkPersistence workflowInstanceLinkPersistence;
1498            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
1499            protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
1500            @BeanReference(type = AssetEntryPersistence.class)
1501            protected AssetEntryPersistence assetEntryPersistence;
1502            @BeanReference(type = AssetEntryFinder.class)
1503            protected AssetEntryFinder assetEntryFinder;
1504            @BeanReference(type = com.liferay.portlet.asset.service.AssetLinkLocalService.class)
1505            protected com.liferay.portlet.asset.service.AssetLinkLocalService assetLinkLocalService;
1506            @BeanReference(type = AssetLinkPersistence.class)
1507            protected AssetLinkPersistence assetLinkPersistence;
1508            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagLocalService.class)
1509            protected com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService;
1510            @BeanReference(type = AssetTagPersistence.class)
1511            protected AssetTagPersistence assetTagPersistence;
1512            @BeanReference(type = AssetTagFinder.class)
1513            protected AssetTagFinder assetTagFinder;
1514            @BeanReference(type = com.liferay.portlet.blogs.service.BlogsEntryLocalService.class)
1515            protected com.liferay.portlet.blogs.service.BlogsEntryLocalService blogsEntryLocalService;
1516            @BeanReference(type = BlogsEntryPersistence.class)
1517            protected BlogsEntryPersistence blogsEntryPersistence;
1518            @BeanReference(type = BlogsEntryFinder.class)
1519            protected BlogsEntryFinder blogsEntryFinder;
1520            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoRowLocalService.class)
1521            protected com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService;
1522            @BeanReference(type = ExpandoRowPersistence.class)
1523            protected ExpandoRowPersistence expandoRowPersistence;
1524            @BeanReference(type = com.liferay.portlet.messageboards.service.MBCategoryLocalService.class)
1525            protected com.liferay.portlet.messageboards.service.MBCategoryLocalService mbCategoryLocalService;
1526            @BeanReference(type = MBCategoryPersistence.class)
1527            protected MBCategoryPersistence mbCategoryPersistence;
1528            @BeanReference(type = MBCategoryFinder.class)
1529            protected MBCategoryFinder mbCategoryFinder;
1530            @BeanReference(type = com.liferay.portlet.messageboards.service.MBDiscussionLocalService.class)
1531            protected com.liferay.portlet.messageboards.service.MBDiscussionLocalService mbDiscussionLocalService;
1532            @BeanReference(type = MBDiscussionPersistence.class)
1533            protected MBDiscussionPersistence mbDiscussionPersistence;
1534            @BeanReference(type = com.liferay.portlet.ratings.service.RatingsStatsLocalService.class)
1535            protected com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService;
1536            @BeanReference(type = RatingsStatsPersistence.class)
1537            protected RatingsStatsPersistence ratingsStatsPersistence;
1538            @BeanReference(type = RatingsStatsFinder.class)
1539            protected RatingsStatsFinder ratingsStatsFinder;
1540            @BeanReference(type = com.liferay.portlet.messageboards.service.MBStatsUserLocalService.class)
1541            protected com.liferay.portlet.messageboards.service.MBStatsUserLocalService mbStatsUserLocalService;
1542            @BeanReference(type = MBStatsUserPersistence.class)
1543            protected MBStatsUserPersistence mbStatsUserPersistence;
1544            @BeanReference(type = com.liferay.portlet.messageboards.service.MBThreadLocalService.class)
1545            protected com.liferay.portlet.messageboards.service.MBThreadLocalService mbThreadLocalService;
1546            @BeanReference(type = MBThreadPersistence.class)
1547            protected MBThreadPersistence mbThreadPersistence;
1548            @BeanReference(type = MBThreadFinder.class)
1549            protected MBThreadFinder mbThreadFinder;
1550            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1551            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1552    }