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.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.db.DB;
022    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
028    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
029    import com.liferay.portal.kernel.dao.orm.Projection;
030    import com.liferay.portal.kernel.exception.PortalException;
031    import com.liferay.portal.kernel.exception.SystemException;
032    import com.liferay.portal.kernel.search.Indexable;
033    import com.liferay.portal.kernel.search.IndexableType;
034    import com.liferay.portal.kernel.util.OrderByComparator;
035    import com.liferay.portal.model.PersistedModel;
036    import com.liferay.portal.service.BaseLocalServiceImpl;
037    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
038    import com.liferay.portal.service.persistence.GroupFinder;
039    import com.liferay.portal.service.persistence.GroupPersistence;
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.messageboards.model.MBStatsUser;
045    import com.liferay.portlet.messageboards.service.MBStatsUserLocalService;
046    import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
047    import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
048    import com.liferay.portlet.messageboards.service.persistence.MBStatsUserPersistence;
049    import com.liferay.portlet.messageboards.service.persistence.MBThreadFinder;
050    import com.liferay.portlet.messageboards.service.persistence.MBThreadPersistence;
051    
052    import java.io.Serializable;
053    
054    import java.util.List;
055    
056    import javax.sql.DataSource;
057    
058    /**
059     * Provides the base implementation for the message boards stats user local service.
060     *
061     * <p>
062     * 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.MBStatsUserLocalServiceImpl}.
063     * </p>
064     *
065     * @author Brian Wing Shun Chan
066     * @see com.liferay.portlet.messageboards.service.impl.MBStatsUserLocalServiceImpl
067     * @see com.liferay.portlet.messageboards.service.MBStatsUserLocalServiceUtil
068     * @generated
069     */
070    @ProviderType
071    public abstract class MBStatsUserLocalServiceBaseImpl
072            extends BaseLocalServiceImpl implements MBStatsUserLocalService,
073                    IdentifiableBean {
074            /*
075             * NOTE FOR DEVELOPERS:
076             *
077             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.messageboards.service.MBStatsUserLocalServiceUtil} to access the message boards stats user local service.
078             */
079    
080            /**
081             * Adds the message boards stats user to the database. Also notifies the appropriate model listeners.
082             *
083             * @param mbStatsUser the message boards stats user
084             * @return the message boards stats user that was added
085             */
086            @Indexable(type = IndexableType.REINDEX)
087            @Override
088            public MBStatsUser addMBStatsUser(MBStatsUser mbStatsUser) {
089                    mbStatsUser.setNew(true);
090    
091                    return mbStatsUserPersistence.update(mbStatsUser);
092            }
093    
094            /**
095             * Creates a new message boards stats user with the primary key. Does not add the message boards stats user to the database.
096             *
097             * @param statsUserId the primary key for the new message boards stats user
098             * @return the new message boards stats user
099             */
100            @Override
101            public MBStatsUser createMBStatsUser(long statsUserId) {
102                    return mbStatsUserPersistence.create(statsUserId);
103            }
104    
105            /**
106             * Deletes the message boards stats user with the primary key from the database. Also notifies the appropriate model listeners.
107             *
108             * @param statsUserId the primary key of the message boards stats user
109             * @return the message boards stats user that was removed
110             * @throws PortalException if a message boards stats user with the primary key could not be found
111             */
112            @Indexable(type = IndexableType.DELETE)
113            @Override
114            public MBStatsUser deleteMBStatsUser(long statsUserId)
115                    throws PortalException {
116                    return mbStatsUserPersistence.remove(statsUserId);
117            }
118    
119            /**
120             * Deletes the message boards stats user from the database. Also notifies the appropriate model listeners.
121             *
122             * @param mbStatsUser the message boards stats user
123             * @return the message boards stats user that was removed
124             */
125            @Indexable(type = IndexableType.DELETE)
126            @Override
127            public MBStatsUser deleteMBStatsUser(MBStatsUser mbStatsUser) {
128                    return mbStatsUserPersistence.remove(mbStatsUser);
129            }
130    
131            @Override
132            public DynamicQuery dynamicQuery() {
133                    Class<?> clazz = getClass();
134    
135                    return DynamicQueryFactoryUtil.forClass(MBStatsUser.class,
136                            clazz.getClassLoader());
137            }
138    
139            /**
140             * Performs a dynamic query on the database and returns the matching rows.
141             *
142             * @param dynamicQuery the dynamic query
143             * @return the matching rows
144             */
145            @Override
146            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
147                    return mbStatsUserPersistence.findWithDynamicQuery(dynamicQuery);
148            }
149    
150            /**
151             * Performs a dynamic query on the database and returns a range of the matching rows.
152             *
153             * <p>
154             * 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.MBStatsUserModelImpl}. 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.
155             * </p>
156             *
157             * @param dynamicQuery the dynamic query
158             * @param start the lower bound of the range of model instances
159             * @param end the upper bound of the range of model instances (not inclusive)
160             * @return the range of matching rows
161             */
162            @Override
163            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
164                    int end) {
165                    return mbStatsUserPersistence.findWithDynamicQuery(dynamicQuery, start,
166                            end);
167            }
168    
169            /**
170             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
171             *
172             * <p>
173             * 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.MBStatsUserModelImpl}. 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.
174             * </p>
175             *
176             * @param dynamicQuery the dynamic query
177             * @param start the lower bound of the range of model instances
178             * @param end the upper bound of the range of model instances (not inclusive)
179             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
180             * @return the ordered range of matching rows
181             */
182            @Override
183            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
184                    int end, OrderByComparator<T> orderByComparator) {
185                    return mbStatsUserPersistence.findWithDynamicQuery(dynamicQuery, start,
186                            end, orderByComparator);
187            }
188    
189            /**
190             * Returns the number of rows matching the dynamic query.
191             *
192             * @param dynamicQuery the dynamic query
193             * @return the number of rows matching the dynamic query
194             */
195            @Override
196            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
197                    return mbStatsUserPersistence.countWithDynamicQuery(dynamicQuery);
198            }
199    
200            /**
201             * Returns the number of rows matching the dynamic query.
202             *
203             * @param dynamicQuery the dynamic query
204             * @param projection the projection to apply to the query
205             * @return the number of rows matching the dynamic query
206             */
207            @Override
208            public long dynamicQueryCount(DynamicQuery dynamicQuery,
209                    Projection projection) {
210                    return mbStatsUserPersistence.countWithDynamicQuery(dynamicQuery,
211                            projection);
212            }
213    
214            @Override
215            public MBStatsUser fetchMBStatsUser(long statsUserId) {
216                    return mbStatsUserPersistence.fetchByPrimaryKey(statsUserId);
217            }
218    
219            /**
220             * Returns the message boards stats user with the primary key.
221             *
222             * @param statsUserId the primary key of the message boards stats user
223             * @return the message boards stats user
224             * @throws PortalException if a message boards stats user with the primary key could not be found
225             */
226            @Override
227            public MBStatsUser getMBStatsUser(long statsUserId)
228                    throws PortalException {
229                    return mbStatsUserPersistence.findByPrimaryKey(statsUserId);
230            }
231    
232            @Override
233            public ActionableDynamicQuery getActionableDynamicQuery() {
234                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
235    
236                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.messageboards.service.MBStatsUserLocalServiceUtil.getService());
237                    actionableDynamicQuery.setClass(MBStatsUser.class);
238                    actionableDynamicQuery.setClassLoader(getClassLoader());
239    
240                    actionableDynamicQuery.setPrimaryKeyPropertyName("statsUserId");
241    
242                    return actionableDynamicQuery;
243            }
244    
245            protected void initActionableDynamicQuery(
246                    ActionableDynamicQuery actionableDynamicQuery) {
247                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.messageboards.service.MBStatsUserLocalServiceUtil.getService());
248                    actionableDynamicQuery.setClass(MBStatsUser.class);
249                    actionableDynamicQuery.setClassLoader(getClassLoader());
250    
251                    actionableDynamicQuery.setPrimaryKeyPropertyName("statsUserId");
252            }
253    
254            /**
255             * @throws PortalException
256             */
257            @Override
258            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
259                    throws PortalException {
260                    return mbStatsUserLocalService.deleteMBStatsUser((MBStatsUser)persistedModel);
261            }
262    
263            @Override
264            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
265                    throws PortalException {
266                    return mbStatsUserPersistence.findByPrimaryKey(primaryKeyObj);
267            }
268    
269            /**
270             * Returns a range of all the message boards stats users.
271             *
272             * <p>
273             * 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.MBStatsUserModelImpl}. 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.
274             * </p>
275             *
276             * @param start the lower bound of the range of message boards stats users
277             * @param end the upper bound of the range of message boards stats users (not inclusive)
278             * @return the range of message boards stats users
279             */
280            @Override
281            public List<MBStatsUser> getMBStatsUsers(int start, int end) {
282                    return mbStatsUserPersistence.findAll(start, end);
283            }
284    
285            /**
286             * Returns the number of message boards stats users.
287             *
288             * @return the number of message boards stats users
289             */
290            @Override
291            public int getMBStatsUsersCount() {
292                    return mbStatsUserPersistence.countAll();
293            }
294    
295            /**
296             * Updates the message boards stats user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
297             *
298             * @param mbStatsUser the message boards stats user
299             * @return the message boards stats user that was updated
300             */
301            @Indexable(type = IndexableType.REINDEX)
302            @Override
303            public MBStatsUser updateMBStatsUser(MBStatsUser mbStatsUser) {
304                    return mbStatsUserPersistence.update(mbStatsUser);
305            }
306    
307            /**
308             * Returns the message boards stats user local service.
309             *
310             * @return the message boards stats user local service
311             */
312            public MBStatsUserLocalService getMBStatsUserLocalService() {
313                    return mbStatsUserLocalService;
314            }
315    
316            /**
317             * Sets the message boards stats user local service.
318             *
319             * @param mbStatsUserLocalService the message boards stats user local service
320             */
321            public void setMBStatsUserLocalService(
322                    MBStatsUserLocalService mbStatsUserLocalService) {
323                    this.mbStatsUserLocalService = mbStatsUserLocalService;
324            }
325    
326            /**
327             * Returns the message boards stats user persistence.
328             *
329             * @return the message boards stats user persistence
330             */
331            public MBStatsUserPersistence getMBStatsUserPersistence() {
332                    return mbStatsUserPersistence;
333            }
334    
335            /**
336             * Sets the message boards stats user persistence.
337             *
338             * @param mbStatsUserPersistence the message boards stats user persistence
339             */
340            public void setMBStatsUserPersistence(
341                    MBStatsUserPersistence mbStatsUserPersistence) {
342                    this.mbStatsUserPersistence = mbStatsUserPersistence;
343            }
344    
345            /**
346             * Returns the counter local service.
347             *
348             * @return the counter local service
349             */
350            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
351                    return counterLocalService;
352            }
353    
354            /**
355             * Sets the counter local service.
356             *
357             * @param counterLocalService the counter local service
358             */
359            public void setCounterLocalService(
360                    com.liferay.counter.service.CounterLocalService counterLocalService) {
361                    this.counterLocalService = counterLocalService;
362            }
363    
364            /**
365             * Returns the group local service.
366             *
367             * @return the group local service
368             */
369            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
370                    return groupLocalService;
371            }
372    
373            /**
374             * Sets the group local service.
375             *
376             * @param groupLocalService the group local service
377             */
378            public void setGroupLocalService(
379                    com.liferay.portal.service.GroupLocalService groupLocalService) {
380                    this.groupLocalService = groupLocalService;
381            }
382    
383            /**
384             * Returns the group remote service.
385             *
386             * @return the group remote service
387             */
388            public com.liferay.portal.service.GroupService getGroupService() {
389                    return groupService;
390            }
391    
392            /**
393             * Sets the group remote service.
394             *
395             * @param groupService the group remote service
396             */
397            public void setGroupService(
398                    com.liferay.portal.service.GroupService groupService) {
399                    this.groupService = groupService;
400            }
401    
402            /**
403             * Returns the group persistence.
404             *
405             * @return the group persistence
406             */
407            public GroupPersistence getGroupPersistence() {
408                    return groupPersistence;
409            }
410    
411            /**
412             * Sets the group persistence.
413             *
414             * @param groupPersistence the group persistence
415             */
416            public void setGroupPersistence(GroupPersistence groupPersistence) {
417                    this.groupPersistence = groupPersistence;
418            }
419    
420            /**
421             * Returns the group finder.
422             *
423             * @return the group finder
424             */
425            public GroupFinder getGroupFinder() {
426                    return groupFinder;
427            }
428    
429            /**
430             * Sets the group finder.
431             *
432             * @param groupFinder the group finder
433             */
434            public void setGroupFinder(GroupFinder groupFinder) {
435                    this.groupFinder = groupFinder;
436            }
437    
438            /**
439             * Returns the user local service.
440             *
441             * @return the user local service
442             */
443            public com.liferay.portal.service.UserLocalService getUserLocalService() {
444                    return userLocalService;
445            }
446    
447            /**
448             * Sets the user local service.
449             *
450             * @param userLocalService the user local service
451             */
452            public void setUserLocalService(
453                    com.liferay.portal.service.UserLocalService userLocalService) {
454                    this.userLocalService = userLocalService;
455            }
456    
457            /**
458             * Returns the user remote service.
459             *
460             * @return the user remote service
461             */
462            public com.liferay.portal.service.UserService getUserService() {
463                    return userService;
464            }
465    
466            /**
467             * Sets the user remote service.
468             *
469             * @param userService the user remote service
470             */
471            public void setUserService(
472                    com.liferay.portal.service.UserService userService) {
473                    this.userService = userService;
474            }
475    
476            /**
477             * Returns the user persistence.
478             *
479             * @return the user persistence
480             */
481            public UserPersistence getUserPersistence() {
482                    return userPersistence;
483            }
484    
485            /**
486             * Sets the user persistence.
487             *
488             * @param userPersistence the user persistence
489             */
490            public void setUserPersistence(UserPersistence userPersistence) {
491                    this.userPersistence = userPersistence;
492            }
493    
494            /**
495             * Returns the user finder.
496             *
497             * @return the user finder
498             */
499            public UserFinder getUserFinder() {
500                    return userFinder;
501            }
502    
503            /**
504             * Sets the user finder.
505             *
506             * @param userFinder the user finder
507             */
508            public void setUserFinder(UserFinder userFinder) {
509                    this.userFinder = userFinder;
510            }
511    
512            /**
513             * Returns the message-boards message local service.
514             *
515             * @return the message-boards message local service
516             */
517            public com.liferay.portlet.messageboards.service.MBMessageLocalService getMBMessageLocalService() {
518                    return mbMessageLocalService;
519            }
520    
521            /**
522             * Sets the message-boards message local service.
523             *
524             * @param mbMessageLocalService the message-boards message local service
525             */
526            public void setMBMessageLocalService(
527                    com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService) {
528                    this.mbMessageLocalService = mbMessageLocalService;
529            }
530    
531            /**
532             * Returns the message-boards message remote service.
533             *
534             * @return the message-boards message remote service
535             */
536            public com.liferay.portlet.messageboards.service.MBMessageService getMBMessageService() {
537                    return mbMessageService;
538            }
539    
540            /**
541             * Sets the message-boards message remote service.
542             *
543             * @param mbMessageService the message-boards message remote service
544             */
545            public void setMBMessageService(
546                    com.liferay.portlet.messageboards.service.MBMessageService mbMessageService) {
547                    this.mbMessageService = mbMessageService;
548            }
549    
550            /**
551             * Returns the message-boards message persistence.
552             *
553             * @return the message-boards message persistence
554             */
555            public MBMessagePersistence getMBMessagePersistence() {
556                    return mbMessagePersistence;
557            }
558    
559            /**
560             * Sets the message-boards message persistence.
561             *
562             * @param mbMessagePersistence the message-boards message persistence
563             */
564            public void setMBMessagePersistence(
565                    MBMessagePersistence mbMessagePersistence) {
566                    this.mbMessagePersistence = mbMessagePersistence;
567            }
568    
569            /**
570             * Returns the message-boards message finder.
571             *
572             * @return the message-boards message finder
573             */
574            public MBMessageFinder getMBMessageFinder() {
575                    return mbMessageFinder;
576            }
577    
578            /**
579             * Sets the message-boards message finder.
580             *
581             * @param mbMessageFinder the message-boards message finder
582             */
583            public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
584                    this.mbMessageFinder = mbMessageFinder;
585            }
586    
587            /**
588             * Returns the message boards thread local service.
589             *
590             * @return the message boards thread local service
591             */
592            public com.liferay.portlet.messageboards.service.MBThreadLocalService getMBThreadLocalService() {
593                    return mbThreadLocalService;
594            }
595    
596            /**
597             * Sets the message boards thread local service.
598             *
599             * @param mbThreadLocalService the message boards thread local service
600             */
601            public void setMBThreadLocalService(
602                    com.liferay.portlet.messageboards.service.MBThreadLocalService mbThreadLocalService) {
603                    this.mbThreadLocalService = mbThreadLocalService;
604            }
605    
606            /**
607             * Returns the message boards thread remote service.
608             *
609             * @return the message boards thread remote service
610             */
611            public com.liferay.portlet.messageboards.service.MBThreadService getMBThreadService() {
612                    return mbThreadService;
613            }
614    
615            /**
616             * Sets the message boards thread remote service.
617             *
618             * @param mbThreadService the message boards thread remote service
619             */
620            public void setMBThreadService(
621                    com.liferay.portlet.messageboards.service.MBThreadService mbThreadService) {
622                    this.mbThreadService = mbThreadService;
623            }
624    
625            /**
626             * Returns the message boards thread persistence.
627             *
628             * @return the message boards thread persistence
629             */
630            public MBThreadPersistence getMBThreadPersistence() {
631                    return mbThreadPersistence;
632            }
633    
634            /**
635             * Sets the message boards thread persistence.
636             *
637             * @param mbThreadPersistence the message boards thread persistence
638             */
639            public void setMBThreadPersistence(MBThreadPersistence mbThreadPersistence) {
640                    this.mbThreadPersistence = mbThreadPersistence;
641            }
642    
643            /**
644             * Returns the message boards thread finder.
645             *
646             * @return the message boards thread finder
647             */
648            public MBThreadFinder getMBThreadFinder() {
649                    return mbThreadFinder;
650            }
651    
652            /**
653             * Sets the message boards thread finder.
654             *
655             * @param mbThreadFinder the message boards thread finder
656             */
657            public void setMBThreadFinder(MBThreadFinder mbThreadFinder) {
658                    this.mbThreadFinder = mbThreadFinder;
659            }
660    
661            public void afterPropertiesSet() {
662                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.messageboards.model.MBStatsUser",
663                            mbStatsUserLocalService);
664            }
665    
666            public void destroy() {
667                    persistedModelLocalServiceRegistry.unregister(
668                            "com.liferay.portlet.messageboards.model.MBStatsUser");
669            }
670    
671            /**
672             * Returns the Spring bean ID for this bean.
673             *
674             * @return the Spring bean ID for this bean
675             */
676            @Override
677            public String getBeanIdentifier() {
678                    return _beanIdentifier;
679            }
680    
681            /**
682             * Sets the Spring bean ID for this bean.
683             *
684             * @param beanIdentifier the Spring bean ID for this bean
685             */
686            @Override
687            public void setBeanIdentifier(String beanIdentifier) {
688                    _beanIdentifier = beanIdentifier;
689            }
690    
691            protected Class<?> getModelClass() {
692                    return MBStatsUser.class;
693            }
694    
695            protected String getModelClassName() {
696                    return MBStatsUser.class.getName();
697            }
698    
699            /**
700             * Performs a SQL query.
701             *
702             * @param sql the sql query
703             */
704            protected void runSQL(String sql) {
705                    try {
706                            DataSource dataSource = mbStatsUserPersistence.getDataSource();
707    
708                            DB db = DBFactoryUtil.getDB();
709    
710                            sql = db.buildSQL(sql);
711                            sql = PortalUtil.transformSQL(sql);
712    
713                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
714                                            sql, new int[0]);
715    
716                            sqlUpdate.update();
717                    }
718                    catch (Exception e) {
719                            throw new SystemException(e);
720                    }
721            }
722    
723            @BeanReference(type = MBStatsUserLocalService.class)
724            protected MBStatsUserLocalService mbStatsUserLocalService;
725            @BeanReference(type = MBStatsUserPersistence.class)
726            protected MBStatsUserPersistence mbStatsUserPersistence;
727            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
728            protected com.liferay.counter.service.CounterLocalService counterLocalService;
729            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
730            protected com.liferay.portal.service.GroupLocalService groupLocalService;
731            @BeanReference(type = com.liferay.portal.service.GroupService.class)
732            protected com.liferay.portal.service.GroupService groupService;
733            @BeanReference(type = GroupPersistence.class)
734            protected GroupPersistence groupPersistence;
735            @BeanReference(type = GroupFinder.class)
736            protected GroupFinder groupFinder;
737            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
738            protected com.liferay.portal.service.UserLocalService userLocalService;
739            @BeanReference(type = com.liferay.portal.service.UserService.class)
740            protected com.liferay.portal.service.UserService userService;
741            @BeanReference(type = UserPersistence.class)
742            protected UserPersistence userPersistence;
743            @BeanReference(type = UserFinder.class)
744            protected UserFinder userFinder;
745            @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageLocalService.class)
746            protected com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService;
747            @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageService.class)
748            protected com.liferay.portlet.messageboards.service.MBMessageService mbMessageService;
749            @BeanReference(type = MBMessagePersistence.class)
750            protected MBMessagePersistence mbMessagePersistence;
751            @BeanReference(type = MBMessageFinder.class)
752            protected MBMessageFinder mbMessageFinder;
753            @BeanReference(type = com.liferay.portlet.messageboards.service.MBThreadLocalService.class)
754            protected com.liferay.portlet.messageboards.service.MBThreadLocalService mbThreadLocalService;
755            @BeanReference(type = com.liferay.portlet.messageboards.service.MBThreadService.class)
756            protected com.liferay.portlet.messageboards.service.MBThreadService mbThreadService;
757            @BeanReference(type = MBThreadPersistence.class)
758            protected MBThreadPersistence mbThreadPersistence;
759            @BeanReference(type = MBThreadFinder.class)
760            protected MBThreadFinder mbThreadFinder;
761            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
762            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
763            private String _beanIdentifier;
764    }