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.mobiledevicerules.service.base;
016    
017    import com.liferay.portal.kernel.bean.BeanReference;
018    import com.liferay.portal.kernel.bean.IdentifiableBean;
019    import com.liferay.portal.kernel.dao.db.DB;
020    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.exception.SystemException;
024    import com.liferay.portal.service.BaseServiceImpl;
025    import com.liferay.portal.service.persistence.GroupFinder;
026    import com.liferay.portal.service.persistence.GroupPersistence;
027    import com.liferay.portal.service.persistence.SystemEventPersistence;
028    import com.liferay.portal.service.persistence.UserFinder;
029    import com.liferay.portal.service.persistence.UserPersistence;
030    import com.liferay.portal.util.PortalUtil;
031    
032    import com.liferay.portlet.mobiledevicerules.model.MDRRuleGroup;
033    import com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService;
034    import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupFinder;
035    import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupInstancePersistence;
036    import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRuleGroupPersistence;
037    import com.liferay.portlet.mobiledevicerules.service.persistence.MDRRulePersistence;
038    
039    import javax.sql.DataSource;
040    
041    /**
042     * Provides the base implementation for the m d r rule group remote service.
043     *
044     * <p>
045     * 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.mobiledevicerules.service.impl.MDRRuleGroupServiceImpl}.
046     * </p>
047     *
048     * @author Edward C. Han
049     * @see com.liferay.portlet.mobiledevicerules.service.impl.MDRRuleGroupServiceImpl
050     * @see com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupServiceUtil
051     * @generated
052     */
053    public abstract class MDRRuleGroupServiceBaseImpl extends BaseServiceImpl
054            implements MDRRuleGroupService, IdentifiableBean {
055            /*
056             * NOTE FOR DEVELOPERS:
057             *
058             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupServiceUtil} to access the m d r rule group remote service.
059             */
060    
061            /**
062             * Returns the m d r rule group local service.
063             *
064             * @return the m d r rule group local service
065             */
066            public com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService getMDRRuleGroupLocalService() {
067                    return mdrRuleGroupLocalService;
068            }
069    
070            /**
071             * Sets the m d r rule group local service.
072             *
073             * @param mdrRuleGroupLocalService the m d r rule group local service
074             */
075            public void setMDRRuleGroupLocalService(
076                    com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService mdrRuleGroupLocalService) {
077                    this.mdrRuleGroupLocalService = mdrRuleGroupLocalService;
078            }
079    
080            /**
081             * Returns the m d r rule group remote service.
082             *
083             * @return the m d r rule group remote service
084             */
085            public com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService getMDRRuleGroupService() {
086                    return mdrRuleGroupService;
087            }
088    
089            /**
090             * Sets the m d r rule group remote service.
091             *
092             * @param mdrRuleGroupService the m d r rule group remote service
093             */
094            public void setMDRRuleGroupService(
095                    com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService mdrRuleGroupService) {
096                    this.mdrRuleGroupService = mdrRuleGroupService;
097            }
098    
099            /**
100             * Returns the m d r rule group persistence.
101             *
102             * @return the m d r rule group persistence
103             */
104            public MDRRuleGroupPersistence getMDRRuleGroupPersistence() {
105                    return mdrRuleGroupPersistence;
106            }
107    
108            /**
109             * Sets the m d r rule group persistence.
110             *
111             * @param mdrRuleGroupPersistence the m d r rule group persistence
112             */
113            public void setMDRRuleGroupPersistence(
114                    MDRRuleGroupPersistence mdrRuleGroupPersistence) {
115                    this.mdrRuleGroupPersistence = mdrRuleGroupPersistence;
116            }
117    
118            /**
119             * Returns the m d r rule group finder.
120             *
121             * @return the m d r rule group finder
122             */
123            public MDRRuleGroupFinder getMDRRuleGroupFinder() {
124                    return mdrRuleGroupFinder;
125            }
126    
127            /**
128             * Sets the m d r rule group finder.
129             *
130             * @param mdrRuleGroupFinder the m d r rule group finder
131             */
132            public void setMDRRuleGroupFinder(MDRRuleGroupFinder mdrRuleGroupFinder) {
133                    this.mdrRuleGroupFinder = mdrRuleGroupFinder;
134            }
135    
136            /**
137             * Returns the counter local service.
138             *
139             * @return the counter local service
140             */
141            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
142                    return counterLocalService;
143            }
144    
145            /**
146             * Sets the counter local service.
147             *
148             * @param counterLocalService the counter local service
149             */
150            public void setCounterLocalService(
151                    com.liferay.counter.service.CounterLocalService counterLocalService) {
152                    this.counterLocalService = counterLocalService;
153            }
154    
155            /**
156             * Returns the group local service.
157             *
158             * @return the group local service
159             */
160            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
161                    return groupLocalService;
162            }
163    
164            /**
165             * Sets the group local service.
166             *
167             * @param groupLocalService the group local service
168             */
169            public void setGroupLocalService(
170                    com.liferay.portal.service.GroupLocalService groupLocalService) {
171                    this.groupLocalService = groupLocalService;
172            }
173    
174            /**
175             * Returns the group remote service.
176             *
177             * @return the group remote service
178             */
179            public com.liferay.portal.service.GroupService getGroupService() {
180                    return groupService;
181            }
182    
183            /**
184             * Sets the group remote service.
185             *
186             * @param groupService the group remote service
187             */
188            public void setGroupService(
189                    com.liferay.portal.service.GroupService groupService) {
190                    this.groupService = groupService;
191            }
192    
193            /**
194             * Returns the group persistence.
195             *
196             * @return the group persistence
197             */
198            public GroupPersistence getGroupPersistence() {
199                    return groupPersistence;
200            }
201    
202            /**
203             * Sets the group persistence.
204             *
205             * @param groupPersistence the group persistence
206             */
207            public void setGroupPersistence(GroupPersistence groupPersistence) {
208                    this.groupPersistence = groupPersistence;
209            }
210    
211            /**
212             * Returns the group finder.
213             *
214             * @return the group finder
215             */
216            public GroupFinder getGroupFinder() {
217                    return groupFinder;
218            }
219    
220            /**
221             * Sets the group finder.
222             *
223             * @param groupFinder the group finder
224             */
225            public void setGroupFinder(GroupFinder groupFinder) {
226                    this.groupFinder = groupFinder;
227            }
228    
229            /**
230             * Returns the system event local service.
231             *
232             * @return the system event local service
233             */
234            public com.liferay.portal.service.SystemEventLocalService getSystemEventLocalService() {
235                    return systemEventLocalService;
236            }
237    
238            /**
239             * Sets the system event local service.
240             *
241             * @param systemEventLocalService the system event local service
242             */
243            public void setSystemEventLocalService(
244                    com.liferay.portal.service.SystemEventLocalService systemEventLocalService) {
245                    this.systemEventLocalService = systemEventLocalService;
246            }
247    
248            /**
249             * Returns the system event persistence.
250             *
251             * @return the system event persistence
252             */
253            public SystemEventPersistence getSystemEventPersistence() {
254                    return systemEventPersistence;
255            }
256    
257            /**
258             * Sets the system event persistence.
259             *
260             * @param systemEventPersistence the system event persistence
261             */
262            public void setSystemEventPersistence(
263                    SystemEventPersistence systemEventPersistence) {
264                    this.systemEventPersistence = systemEventPersistence;
265            }
266    
267            /**
268             * Returns the user local service.
269             *
270             * @return the user local service
271             */
272            public com.liferay.portal.service.UserLocalService getUserLocalService() {
273                    return userLocalService;
274            }
275    
276            /**
277             * Sets the user local service.
278             *
279             * @param userLocalService the user local service
280             */
281            public void setUserLocalService(
282                    com.liferay.portal.service.UserLocalService userLocalService) {
283                    this.userLocalService = userLocalService;
284            }
285    
286            /**
287             * Returns the user remote service.
288             *
289             * @return the user remote service
290             */
291            public com.liferay.portal.service.UserService getUserService() {
292                    return userService;
293            }
294    
295            /**
296             * Sets the user remote service.
297             *
298             * @param userService the user remote service
299             */
300            public void setUserService(
301                    com.liferay.portal.service.UserService userService) {
302                    this.userService = userService;
303            }
304    
305            /**
306             * Returns the user persistence.
307             *
308             * @return the user persistence
309             */
310            public UserPersistence getUserPersistence() {
311                    return userPersistence;
312            }
313    
314            /**
315             * Sets the user persistence.
316             *
317             * @param userPersistence the user persistence
318             */
319            public void setUserPersistence(UserPersistence userPersistence) {
320                    this.userPersistence = userPersistence;
321            }
322    
323            /**
324             * Returns the user finder.
325             *
326             * @return the user finder
327             */
328            public UserFinder getUserFinder() {
329                    return userFinder;
330            }
331    
332            /**
333             * Sets the user finder.
334             *
335             * @param userFinder the user finder
336             */
337            public void setUserFinder(UserFinder userFinder) {
338                    this.userFinder = userFinder;
339            }
340    
341            /**
342             * Returns the m d r rule local service.
343             *
344             * @return the m d r rule local service
345             */
346            public com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService getMDRRuleLocalService() {
347                    return mdrRuleLocalService;
348            }
349    
350            /**
351             * Sets the m d r rule local service.
352             *
353             * @param mdrRuleLocalService the m d r rule local service
354             */
355            public void setMDRRuleLocalService(
356                    com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService mdrRuleLocalService) {
357                    this.mdrRuleLocalService = mdrRuleLocalService;
358            }
359    
360            /**
361             * Returns the m d r rule remote service.
362             *
363             * @return the m d r rule remote service
364             */
365            public com.liferay.portlet.mobiledevicerules.service.MDRRuleService getMDRRuleService() {
366                    return mdrRuleService;
367            }
368    
369            /**
370             * Sets the m d r rule remote service.
371             *
372             * @param mdrRuleService the m d r rule remote service
373             */
374            public void setMDRRuleService(
375                    com.liferay.portlet.mobiledevicerules.service.MDRRuleService mdrRuleService) {
376                    this.mdrRuleService = mdrRuleService;
377            }
378    
379            /**
380             * Returns the m d r rule persistence.
381             *
382             * @return the m d r rule persistence
383             */
384            public MDRRulePersistence getMDRRulePersistence() {
385                    return mdrRulePersistence;
386            }
387    
388            /**
389             * Sets the m d r rule persistence.
390             *
391             * @param mdrRulePersistence the m d r rule persistence
392             */
393            public void setMDRRulePersistence(MDRRulePersistence mdrRulePersistence) {
394                    this.mdrRulePersistence = mdrRulePersistence;
395            }
396    
397            /**
398             * Returns the m d r rule group instance local service.
399             *
400             * @return the m d r rule group instance local service
401             */
402            public com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceLocalService getMDRRuleGroupInstanceLocalService() {
403                    return mdrRuleGroupInstanceLocalService;
404            }
405    
406            /**
407             * Sets the m d r rule group instance local service.
408             *
409             * @param mdrRuleGroupInstanceLocalService the m d r rule group instance local service
410             */
411            public void setMDRRuleGroupInstanceLocalService(
412                    com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceLocalService mdrRuleGroupInstanceLocalService) {
413                    this.mdrRuleGroupInstanceLocalService = mdrRuleGroupInstanceLocalService;
414            }
415    
416            /**
417             * Returns the m d r rule group instance remote service.
418             *
419             * @return the m d r rule group instance remote service
420             */
421            public com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceService getMDRRuleGroupInstanceService() {
422                    return mdrRuleGroupInstanceService;
423            }
424    
425            /**
426             * Sets the m d r rule group instance remote service.
427             *
428             * @param mdrRuleGroupInstanceService the m d r rule group instance remote service
429             */
430            public void setMDRRuleGroupInstanceService(
431                    com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceService mdrRuleGroupInstanceService) {
432                    this.mdrRuleGroupInstanceService = mdrRuleGroupInstanceService;
433            }
434    
435            /**
436             * Returns the m d r rule group instance persistence.
437             *
438             * @return the m d r rule group instance persistence
439             */
440            public MDRRuleGroupInstancePersistence getMDRRuleGroupInstancePersistence() {
441                    return mdrRuleGroupInstancePersistence;
442            }
443    
444            /**
445             * Sets the m d r rule group instance persistence.
446             *
447             * @param mdrRuleGroupInstancePersistence the m d r rule group instance persistence
448             */
449            public void setMDRRuleGroupInstancePersistence(
450                    MDRRuleGroupInstancePersistence mdrRuleGroupInstancePersistence) {
451                    this.mdrRuleGroupInstancePersistence = mdrRuleGroupInstancePersistence;
452            }
453    
454            public void afterPropertiesSet() {
455            }
456    
457            public void destroy() {
458            }
459    
460            /**
461             * Returns the Spring bean ID for this bean.
462             *
463             * @return the Spring bean ID for this bean
464             */
465            @Override
466            public String getBeanIdentifier() {
467                    return _beanIdentifier;
468            }
469    
470            /**
471             * Sets the Spring bean ID for this bean.
472             *
473             * @param beanIdentifier the Spring bean ID for this bean
474             */
475            @Override
476            public void setBeanIdentifier(String beanIdentifier) {
477                    _beanIdentifier = beanIdentifier;
478            }
479    
480            protected Class<?> getModelClass() {
481                    return MDRRuleGroup.class;
482            }
483    
484            protected String getModelClassName() {
485                    return MDRRuleGroup.class.getName();
486            }
487    
488            /**
489             * Performs a SQL query.
490             *
491             * @param sql the sql query
492             */
493            protected void runSQL(String sql) {
494                    try {
495                            DataSource dataSource = mdrRuleGroupPersistence.getDataSource();
496    
497                            DB db = DBFactoryUtil.getDB();
498    
499                            sql = db.buildSQL(sql);
500                            sql = PortalUtil.transformSQL(sql);
501    
502                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
503                                            sql, new int[0]);
504    
505                            sqlUpdate.update();
506                    }
507                    catch (Exception e) {
508                            throw new SystemException(e);
509                    }
510            }
511    
512            @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService.class)
513            protected com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupLocalService mdrRuleGroupLocalService;
514            @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService.class)
515            protected com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupService mdrRuleGroupService;
516            @BeanReference(type = MDRRuleGroupPersistence.class)
517            protected MDRRuleGroupPersistence mdrRuleGroupPersistence;
518            @BeanReference(type = MDRRuleGroupFinder.class)
519            protected MDRRuleGroupFinder mdrRuleGroupFinder;
520            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
521            protected com.liferay.counter.service.CounterLocalService counterLocalService;
522            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
523            protected com.liferay.portal.service.GroupLocalService groupLocalService;
524            @BeanReference(type = com.liferay.portal.service.GroupService.class)
525            protected com.liferay.portal.service.GroupService groupService;
526            @BeanReference(type = GroupPersistence.class)
527            protected GroupPersistence groupPersistence;
528            @BeanReference(type = GroupFinder.class)
529            protected GroupFinder groupFinder;
530            @BeanReference(type = com.liferay.portal.service.SystemEventLocalService.class)
531            protected com.liferay.portal.service.SystemEventLocalService systemEventLocalService;
532            @BeanReference(type = SystemEventPersistence.class)
533            protected SystemEventPersistence systemEventPersistence;
534            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
535            protected com.liferay.portal.service.UserLocalService userLocalService;
536            @BeanReference(type = com.liferay.portal.service.UserService.class)
537            protected com.liferay.portal.service.UserService userService;
538            @BeanReference(type = UserPersistence.class)
539            protected UserPersistence userPersistence;
540            @BeanReference(type = UserFinder.class)
541            protected UserFinder userFinder;
542            @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService.class)
543            protected com.liferay.portlet.mobiledevicerules.service.MDRRuleLocalService mdrRuleLocalService;
544            @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleService.class)
545            protected com.liferay.portlet.mobiledevicerules.service.MDRRuleService mdrRuleService;
546            @BeanReference(type = MDRRulePersistence.class)
547            protected MDRRulePersistence mdrRulePersistence;
548            @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceLocalService.class)
549            protected com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceLocalService mdrRuleGroupInstanceLocalService;
550            @BeanReference(type = com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceService.class)
551            protected com.liferay.portlet.mobiledevicerules.service.MDRRuleGroupInstanceService mdrRuleGroupInstanceService;
552            @BeanReference(type = MDRRuleGroupInstancePersistence.class)
553            protected MDRRuleGroupInstancePersistence mdrRuleGroupInstancePersistence;
554            private String _beanIdentifier;
555    }