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