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