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