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