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.DefaultActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
028    import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
029    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
030    import com.liferay.portal.kernel.dao.orm.Projection;
031    import com.liferay.portal.kernel.exception.PortalException;
032    import com.liferay.portal.kernel.exception.SystemException;
033    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
034    import com.liferay.portal.kernel.search.Indexable;
035    import com.liferay.portal.kernel.search.IndexableType;
036    import com.liferay.portal.kernel.util.OrderByComparator;
037    import com.liferay.portal.model.PersistedModel;
038    import com.liferay.portal.service.BaseLocalServiceImpl;
039    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
040    import com.liferay.portal.service.persistence.UserFinder;
041    import com.liferay.portal.service.persistence.UserPersistence;
042    import com.liferay.portal.util.PortalUtil;
043    
044    import com.liferay.portlet.exportimport.lar.ExportImportHelperUtil;
045    import com.liferay.portlet.exportimport.lar.ManifestSummary;
046    import com.liferay.portlet.exportimport.lar.PortletDataContext;
047    import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil;
048    import com.liferay.portlet.exportimport.lar.StagedModelType;
049    import com.liferay.portlet.messageboards.model.MBThreadFlag;
050    import com.liferay.portlet.messageboards.service.MBThreadFlagLocalService;
051    import com.liferay.portlet.messageboards.service.persistence.MBThreadFlagPersistence;
052    
053    import java.io.Serializable;
054    
055    import java.util.List;
056    
057    import javax.sql.DataSource;
058    
059    /**
060     * Provides the base implementation for the message boards thread flag local service.
061     *
062     * <p>
063     * 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.MBThreadFlagLocalServiceImpl}.
064     * </p>
065     *
066     * @author Brian Wing Shun Chan
067     * @see com.liferay.portlet.messageboards.service.impl.MBThreadFlagLocalServiceImpl
068     * @see com.liferay.portlet.messageboards.service.MBThreadFlagLocalServiceUtil
069     * @generated
070     */
071    @ProviderType
072    public abstract class MBThreadFlagLocalServiceBaseImpl
073            extends BaseLocalServiceImpl implements MBThreadFlagLocalService,
074                    IdentifiableOSGiService {
075            /*
076             * NOTE FOR DEVELOPERS:
077             *
078             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.messageboards.service.MBThreadFlagLocalServiceUtil} to access the message boards thread flag local service.
079             */
080    
081            /**
082             * Adds the message boards thread flag to the database. Also notifies the appropriate model listeners.
083             *
084             * @param mbThreadFlag the message boards thread flag
085             * @return the message boards thread flag that was added
086             */
087            @Indexable(type = IndexableType.REINDEX)
088            @Override
089            public MBThreadFlag addMBThreadFlag(MBThreadFlag mbThreadFlag) {
090                    mbThreadFlag.setNew(true);
091    
092                    return mbThreadFlagPersistence.update(mbThreadFlag);
093            }
094    
095            /**
096             * Creates a new message boards thread flag with the primary key. Does not add the message boards thread flag to the database.
097             *
098             * @param threadFlagId the primary key for the new message boards thread flag
099             * @return the new message boards thread flag
100             */
101            @Override
102            public MBThreadFlag createMBThreadFlag(long threadFlagId) {
103                    return mbThreadFlagPersistence.create(threadFlagId);
104            }
105    
106            /**
107             * Deletes the message boards thread flag with the primary key from the database. Also notifies the appropriate model listeners.
108             *
109             * @param threadFlagId the primary key of the message boards thread flag
110             * @return the message boards thread flag that was removed
111             * @throws PortalException if a message boards thread flag with the primary key could not be found
112             */
113            @Indexable(type = IndexableType.DELETE)
114            @Override
115            public MBThreadFlag deleteMBThreadFlag(long threadFlagId)
116                    throws PortalException {
117                    return mbThreadFlagPersistence.remove(threadFlagId);
118            }
119    
120            /**
121             * Deletes the message boards thread flag from the database. Also notifies the appropriate model listeners.
122             *
123             * @param mbThreadFlag the message boards thread flag
124             * @return the message boards thread flag that was removed
125             */
126            @Indexable(type = IndexableType.DELETE)
127            @Override
128            public MBThreadFlag deleteMBThreadFlag(MBThreadFlag mbThreadFlag) {
129                    return mbThreadFlagPersistence.remove(mbThreadFlag);
130            }
131    
132            @Override
133            public DynamicQuery dynamicQuery() {
134                    Class<?> clazz = getClass();
135    
136                    return DynamicQueryFactoryUtil.forClass(MBThreadFlag.class,
137                            clazz.getClassLoader());
138            }
139    
140            /**
141             * Performs a dynamic query on the database and returns the matching rows.
142             *
143             * @param dynamicQuery the dynamic query
144             * @return the matching rows
145             */
146            @Override
147            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
148                    return mbThreadFlagPersistence.findWithDynamicQuery(dynamicQuery);
149            }
150    
151            /**
152             * Performs a dynamic query on the database and returns a range of the matching rows.
153             *
154             * <p>
155             * 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.MBThreadFlagModelImpl}. 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.
156             * </p>
157             *
158             * @param dynamicQuery the dynamic query
159             * @param start the lower bound of the range of model instances
160             * @param end the upper bound of the range of model instances (not inclusive)
161             * @return the range of matching rows
162             */
163            @Override
164            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
165                    int end) {
166                    return mbThreadFlagPersistence.findWithDynamicQuery(dynamicQuery,
167                            start, end);
168            }
169    
170            /**
171             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
172             *
173             * <p>
174             * 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.MBThreadFlagModelImpl}. 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.
175             * </p>
176             *
177             * @param dynamicQuery the dynamic query
178             * @param start the lower bound of the range of model instances
179             * @param end the upper bound of the range of model instances (not inclusive)
180             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
181             * @return the ordered range of matching rows
182             */
183            @Override
184            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
185                    int end, OrderByComparator<T> orderByComparator) {
186                    return mbThreadFlagPersistence.findWithDynamicQuery(dynamicQuery,
187                            start, end, orderByComparator);
188            }
189    
190            /**
191             * Returns the number of rows matching the dynamic query.
192             *
193             * @param dynamicQuery the dynamic query
194             * @return the number of rows matching the dynamic query
195             */
196            @Override
197            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
198                    return mbThreadFlagPersistence.countWithDynamicQuery(dynamicQuery);
199            }
200    
201            /**
202             * Returns the number of rows matching the dynamic query.
203             *
204             * @param dynamicQuery the dynamic query
205             * @param projection the projection to apply to the query
206             * @return the number of rows matching the dynamic query
207             */
208            @Override
209            public long dynamicQueryCount(DynamicQuery dynamicQuery,
210                    Projection projection) {
211                    return mbThreadFlagPersistence.countWithDynamicQuery(dynamicQuery,
212                            projection);
213            }
214    
215            @Override
216            public MBThreadFlag fetchMBThreadFlag(long threadFlagId) {
217                    return mbThreadFlagPersistence.fetchByPrimaryKey(threadFlagId);
218            }
219    
220            /**
221             * Returns the message boards thread flag matching the UUID and group.
222             *
223             * @param uuid the message boards thread flag's UUID
224             * @param groupId the primary key of the group
225             * @return the matching message boards thread flag, or <code>null</code> if a matching message boards thread flag could not be found
226             */
227            @Override
228            public MBThreadFlag fetchMBThreadFlagByUuidAndGroupId(String uuid,
229                    long groupId) {
230                    return mbThreadFlagPersistence.fetchByUUID_G(uuid, groupId);
231            }
232    
233            /**
234             * Returns the message boards thread flag with the primary key.
235             *
236             * @param threadFlagId the primary key of the message boards thread flag
237             * @return the message boards thread flag
238             * @throws PortalException if a message boards thread flag with the primary key could not be found
239             */
240            @Override
241            public MBThreadFlag getMBThreadFlag(long threadFlagId)
242                    throws PortalException {
243                    return mbThreadFlagPersistence.findByPrimaryKey(threadFlagId);
244            }
245    
246            @Override
247            public ActionableDynamicQuery getActionableDynamicQuery() {
248                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
249    
250                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.messageboards.service.MBThreadFlagLocalServiceUtil.getService());
251                    actionableDynamicQuery.setClassLoader(getClassLoader());
252                    actionableDynamicQuery.setModelClass(MBThreadFlag.class);
253    
254                    actionableDynamicQuery.setPrimaryKeyPropertyName("threadFlagId");
255    
256                    return actionableDynamicQuery;
257            }
258    
259            @Override
260            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
261                    IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery();
262    
263                    indexableActionableDynamicQuery.setBaseLocalService(com.liferay.portlet.messageboards.service.MBThreadFlagLocalServiceUtil.getService());
264                    indexableActionableDynamicQuery.setClassLoader(getClassLoader());
265                    indexableActionableDynamicQuery.setModelClass(MBThreadFlag.class);
266    
267                    indexableActionableDynamicQuery.setPrimaryKeyPropertyName(
268                            "threadFlagId");
269    
270                    return indexableActionableDynamicQuery;
271            }
272    
273            protected void initActionableDynamicQuery(
274                    ActionableDynamicQuery actionableDynamicQuery) {
275                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.messageboards.service.MBThreadFlagLocalServiceUtil.getService());
276                    actionableDynamicQuery.setClassLoader(getClassLoader());
277                    actionableDynamicQuery.setModelClass(MBThreadFlag.class);
278    
279                    actionableDynamicQuery.setPrimaryKeyPropertyName("threadFlagId");
280            }
281    
282            @Override
283            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
284                    final PortletDataContext portletDataContext) {
285                    final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
286                                    @Override
287                                    public long performCount() throws PortalException {
288                                            ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
289    
290                                            StagedModelType stagedModelType = getStagedModelType();
291    
292                                            long modelAdditionCount = super.performCount();
293    
294                                            manifestSummary.addModelAdditionCount(stagedModelType,
295                                                    modelAdditionCount);
296    
297                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
298                                                            stagedModelType);
299    
300                                            manifestSummary.addModelDeletionCount(stagedModelType,
301                                                    modelDeletionCount);
302    
303                                            return modelAdditionCount;
304                                    }
305                            };
306    
307                    initActionableDynamicQuery(exportActionableDynamicQuery);
308    
309                    exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
310                                    @Override
311                                    public void addCriteria(DynamicQuery dynamicQuery) {
312                                            portletDataContext.addDateRangeCriteria(dynamicQuery,
313                                                    "modifiedDate");
314                                    }
315                            });
316    
317                    exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
318    
319                    exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());
320    
321                    exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<MBThreadFlag>() {
322                                    @Override
323                                    public void performAction(MBThreadFlag mbThreadFlag)
324                                            throws PortalException {
325                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
326                                                    mbThreadFlag);
327                                    }
328                            });
329                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
330                                    PortalUtil.getClassNameId(MBThreadFlag.class.getName())));
331    
332                    return exportActionableDynamicQuery;
333            }
334    
335            /**
336             * @throws PortalException
337             */
338            @Override
339            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
340                    throws PortalException {
341                    return mbThreadFlagLocalService.deleteMBThreadFlag((MBThreadFlag)persistedModel);
342            }
343    
344            @Override
345            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
346                    throws PortalException {
347                    return mbThreadFlagPersistence.findByPrimaryKey(primaryKeyObj);
348            }
349    
350            /**
351             * Returns all the message boards thread flags matching the UUID and company.
352             *
353             * @param uuid the UUID of the message boards thread flags
354             * @param companyId the primary key of the company
355             * @return the matching message boards thread flags, or an empty list if no matches were found
356             */
357            @Override
358            public List<MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId(String uuid,
359                    long companyId) {
360                    return mbThreadFlagPersistence.findByUuid_C(uuid, companyId);
361            }
362    
363            /**
364             * Returns a range of message boards thread flags matching the UUID and company.
365             *
366             * @param uuid the UUID of the message boards thread flags
367             * @param companyId the primary key of the company
368             * @param start the lower bound of the range of message boards thread flags
369             * @param end the upper bound of the range of message boards thread flags (not inclusive)
370             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
371             * @return the range of matching message boards thread flags, or an empty list if no matches were found
372             */
373            @Override
374            public List<MBThreadFlag> getMBThreadFlagsByUuidAndCompanyId(String uuid,
375                    long companyId, int start, int end,
376                    OrderByComparator<MBThreadFlag> orderByComparator) {
377                    return mbThreadFlagPersistence.findByUuid_C(uuid, companyId, start,
378                            end, orderByComparator);
379            }
380    
381            /**
382             * Returns the message boards thread flag matching the UUID and group.
383             *
384             * @param uuid the message boards thread flag's UUID
385             * @param groupId the primary key of the group
386             * @return the matching message boards thread flag
387             * @throws PortalException if a matching message boards thread flag could not be found
388             */
389            @Override
390            public MBThreadFlag getMBThreadFlagByUuidAndGroupId(String uuid,
391                    long groupId) throws PortalException {
392                    return mbThreadFlagPersistence.findByUUID_G(uuid, groupId);
393            }
394    
395            /**
396             * Returns a range of all the message boards thread flags.
397             *
398             * <p>
399             * 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.MBThreadFlagModelImpl}. 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.
400             * </p>
401             *
402             * @param start the lower bound of the range of message boards thread flags
403             * @param end the upper bound of the range of message boards thread flags (not inclusive)
404             * @return the range of message boards thread flags
405             */
406            @Override
407            public List<MBThreadFlag> getMBThreadFlags(int start, int end) {
408                    return mbThreadFlagPersistence.findAll(start, end);
409            }
410    
411            /**
412             * Returns the number of message boards thread flags.
413             *
414             * @return the number of message boards thread flags
415             */
416            @Override
417            public int getMBThreadFlagsCount() {
418                    return mbThreadFlagPersistence.countAll();
419            }
420    
421            /**
422             * Updates the message boards thread flag in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
423             *
424             * @param mbThreadFlag the message boards thread flag
425             * @return the message boards thread flag that was updated
426             */
427            @Indexable(type = IndexableType.REINDEX)
428            @Override
429            public MBThreadFlag updateMBThreadFlag(MBThreadFlag mbThreadFlag) {
430                    return mbThreadFlagPersistence.update(mbThreadFlag);
431            }
432    
433            /**
434             * Returns the message boards thread flag local service.
435             *
436             * @return the message boards thread flag local service
437             */
438            public MBThreadFlagLocalService getMBThreadFlagLocalService() {
439                    return mbThreadFlagLocalService;
440            }
441    
442            /**
443             * Sets the message boards thread flag local service.
444             *
445             * @param mbThreadFlagLocalService the message boards thread flag local service
446             */
447            public void setMBThreadFlagLocalService(
448                    MBThreadFlagLocalService mbThreadFlagLocalService) {
449                    this.mbThreadFlagLocalService = mbThreadFlagLocalService;
450            }
451    
452            /**
453             * Returns the message boards thread flag persistence.
454             *
455             * @return the message boards thread flag persistence
456             */
457            public MBThreadFlagPersistence getMBThreadFlagPersistence() {
458                    return mbThreadFlagPersistence;
459            }
460    
461            /**
462             * Sets the message boards thread flag persistence.
463             *
464             * @param mbThreadFlagPersistence the message boards thread flag persistence
465             */
466            public void setMBThreadFlagPersistence(
467                    MBThreadFlagPersistence mbThreadFlagPersistence) {
468                    this.mbThreadFlagPersistence = mbThreadFlagPersistence;
469            }
470    
471            /**
472             * Returns the counter local service.
473             *
474             * @return the counter local service
475             */
476            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
477                    return counterLocalService;
478            }
479    
480            /**
481             * Sets the counter local service.
482             *
483             * @param counterLocalService the counter local service
484             */
485            public void setCounterLocalService(
486                    com.liferay.counter.service.CounterLocalService counterLocalService) {
487                    this.counterLocalService = counterLocalService;
488            }
489    
490            /**
491             * Returns the user local service.
492             *
493             * @return the user local service
494             */
495            public com.liferay.portal.service.UserLocalService getUserLocalService() {
496                    return userLocalService;
497            }
498    
499            /**
500             * Sets the user local service.
501             *
502             * @param userLocalService the user local service
503             */
504            public void setUserLocalService(
505                    com.liferay.portal.service.UserLocalService userLocalService) {
506                    this.userLocalService = userLocalService;
507            }
508    
509            /**
510             * Returns the user persistence.
511             *
512             * @return the user persistence
513             */
514            public UserPersistence getUserPersistence() {
515                    return userPersistence;
516            }
517    
518            /**
519             * Sets the user persistence.
520             *
521             * @param userPersistence the user persistence
522             */
523            public void setUserPersistence(UserPersistence userPersistence) {
524                    this.userPersistence = userPersistence;
525            }
526    
527            /**
528             * Returns the user finder.
529             *
530             * @return the user finder
531             */
532            public UserFinder getUserFinder() {
533                    return userFinder;
534            }
535    
536            /**
537             * Sets the user finder.
538             *
539             * @param userFinder the user finder
540             */
541            public void setUserFinder(UserFinder userFinder) {
542                    this.userFinder = userFinder;
543            }
544    
545            public void afterPropertiesSet() {
546                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.messageboards.model.MBThreadFlag",
547                            mbThreadFlagLocalService);
548            }
549    
550            public void destroy() {
551                    persistedModelLocalServiceRegistry.unregister(
552                            "com.liferay.portlet.messageboards.model.MBThreadFlag");
553            }
554    
555            /**
556             * Returns the OSGi service identifier.
557             *
558             * @return the OSGi service identifier
559             */
560            @Override
561            public String getOSGiServiceIdentifier() {
562                    return MBThreadFlagLocalService.class.getName();
563            }
564    
565            protected Class<?> getModelClass() {
566                    return MBThreadFlag.class;
567            }
568    
569            protected String getModelClassName() {
570                    return MBThreadFlag.class.getName();
571            }
572    
573            /**
574             * Performs a SQL query.
575             *
576             * @param sql the sql query
577             */
578            protected void runSQL(String sql) {
579                    try {
580                            DataSource dataSource = mbThreadFlagPersistence.getDataSource();
581    
582                            DB db = DBManagerUtil.getDB();
583    
584                            sql = db.buildSQL(sql);
585                            sql = PortalUtil.transformSQL(sql);
586    
587                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
588                                            sql, new int[0]);
589    
590                            sqlUpdate.update();
591                    }
592                    catch (Exception e) {
593                            throw new SystemException(e);
594                    }
595            }
596    
597            @BeanReference(type = com.liferay.portlet.messageboards.service.MBThreadFlagLocalService.class)
598            protected MBThreadFlagLocalService mbThreadFlagLocalService;
599            @BeanReference(type = MBThreadFlagPersistence.class)
600            protected MBThreadFlagPersistence mbThreadFlagPersistence;
601            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
602            protected com.liferay.counter.service.CounterLocalService counterLocalService;
603            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
604            protected com.liferay.portal.service.UserLocalService userLocalService;
605            @BeanReference(type = UserPersistence.class)
606            protected UserPersistence userPersistence;
607            @BeanReference(type = UserFinder.class)
608            protected UserFinder userFinder;
609            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
610            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
611    }