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.shopping.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.UserFinder;
026    import com.liferay.portal.service.persistence.UserPersistence;
027    import com.liferay.portal.util.PortalUtil;
028    
029    import com.liferay.portlet.shopping.model.ShoppingCoupon;
030    import com.liferay.portlet.shopping.service.ShoppingCouponService;
031    import com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence;
032    import com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder;
033    import com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence;
034    import com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder;
035    import com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence;
036    
037    import javax.sql.DataSource;
038    
039    /**
040     * Provides the base implementation for the shopping coupon remote service.
041     *
042     * <p>
043     * 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.shopping.service.impl.ShoppingCouponServiceImpl}.
044     * </p>
045     *
046     * @author Brian Wing Shun Chan
047     * @see com.liferay.portlet.shopping.service.impl.ShoppingCouponServiceImpl
048     * @see com.liferay.portlet.shopping.service.ShoppingCouponServiceUtil
049     * @generated
050     */
051    public abstract class ShoppingCouponServiceBaseImpl extends BaseServiceImpl
052            implements ShoppingCouponService, IdentifiableBean {
053            /*
054             * NOTE FOR DEVELOPERS:
055             *
056             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.shopping.service.ShoppingCouponServiceUtil} to access the shopping coupon remote service.
057             */
058    
059            /**
060             * Returns the shopping coupon local service.
061             *
062             * @return the shopping coupon local service
063             */
064            public com.liferay.portlet.shopping.service.ShoppingCouponLocalService getShoppingCouponLocalService() {
065                    return shoppingCouponLocalService;
066            }
067    
068            /**
069             * Sets the shopping coupon local service.
070             *
071             * @param shoppingCouponLocalService the shopping coupon local service
072             */
073            public void setShoppingCouponLocalService(
074                    com.liferay.portlet.shopping.service.ShoppingCouponLocalService shoppingCouponLocalService) {
075                    this.shoppingCouponLocalService = shoppingCouponLocalService;
076            }
077    
078            /**
079             * Returns the shopping coupon remote service.
080             *
081             * @return the shopping coupon remote service
082             */
083            public ShoppingCouponService getShoppingCouponService() {
084                    return shoppingCouponService;
085            }
086    
087            /**
088             * Sets the shopping coupon remote service.
089             *
090             * @param shoppingCouponService the shopping coupon remote service
091             */
092            public void setShoppingCouponService(
093                    ShoppingCouponService shoppingCouponService) {
094                    this.shoppingCouponService = shoppingCouponService;
095            }
096    
097            /**
098             * Returns the shopping coupon persistence.
099             *
100             * @return the shopping coupon persistence
101             */
102            public ShoppingCouponPersistence getShoppingCouponPersistence() {
103                    return shoppingCouponPersistence;
104            }
105    
106            /**
107             * Sets the shopping coupon persistence.
108             *
109             * @param shoppingCouponPersistence the shopping coupon persistence
110             */
111            public void setShoppingCouponPersistence(
112                    ShoppingCouponPersistence shoppingCouponPersistence) {
113                    this.shoppingCouponPersistence = shoppingCouponPersistence;
114            }
115    
116            /**
117             * Returns the shopping coupon finder.
118             *
119             * @return the shopping coupon finder
120             */
121            public ShoppingCouponFinder getShoppingCouponFinder() {
122                    return shoppingCouponFinder;
123            }
124    
125            /**
126             * Sets the shopping coupon finder.
127             *
128             * @param shoppingCouponFinder the shopping coupon finder
129             */
130            public void setShoppingCouponFinder(
131                    ShoppingCouponFinder shoppingCouponFinder) {
132                    this.shoppingCouponFinder = shoppingCouponFinder;
133            }
134    
135            /**
136             * Returns the counter local service.
137             *
138             * @return the counter local service
139             */
140            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
141                    return counterLocalService;
142            }
143    
144            /**
145             * Sets the counter local service.
146             *
147             * @param counterLocalService the counter local service
148             */
149            public void setCounterLocalService(
150                    com.liferay.counter.service.CounterLocalService counterLocalService) {
151                    this.counterLocalService = counterLocalService;
152            }
153    
154            /**
155             * Returns the user local service.
156             *
157             * @return the user local service
158             */
159            public com.liferay.portal.service.UserLocalService getUserLocalService() {
160                    return userLocalService;
161            }
162    
163            /**
164             * Sets the user local service.
165             *
166             * @param userLocalService the user local service
167             */
168            public void setUserLocalService(
169                    com.liferay.portal.service.UserLocalService userLocalService) {
170                    this.userLocalService = userLocalService;
171            }
172    
173            /**
174             * Returns the user remote service.
175             *
176             * @return the user remote service
177             */
178            public com.liferay.portal.service.UserService getUserService() {
179                    return userService;
180            }
181    
182            /**
183             * Sets the user remote service.
184             *
185             * @param userService the user remote service
186             */
187            public void setUserService(
188                    com.liferay.portal.service.UserService userService) {
189                    this.userService = userService;
190            }
191    
192            /**
193             * Returns the user persistence.
194             *
195             * @return the user persistence
196             */
197            public UserPersistence getUserPersistence() {
198                    return userPersistence;
199            }
200    
201            /**
202             * Sets the user persistence.
203             *
204             * @param userPersistence the user persistence
205             */
206            public void setUserPersistence(UserPersistence userPersistence) {
207                    this.userPersistence = userPersistence;
208            }
209    
210            /**
211             * Returns the user finder.
212             *
213             * @return the user finder
214             */
215            public UserFinder getUserFinder() {
216                    return userFinder;
217            }
218    
219            /**
220             * Sets the user finder.
221             *
222             * @param userFinder the user finder
223             */
224            public void setUserFinder(UserFinder userFinder) {
225                    this.userFinder = userFinder;
226            }
227    
228            /**
229             * Returns the shopping category local service.
230             *
231             * @return the shopping category local service
232             */
233            public com.liferay.portlet.shopping.service.ShoppingCategoryLocalService getShoppingCategoryLocalService() {
234                    return shoppingCategoryLocalService;
235            }
236    
237            /**
238             * Sets the shopping category local service.
239             *
240             * @param shoppingCategoryLocalService the shopping category local service
241             */
242            public void setShoppingCategoryLocalService(
243                    com.liferay.portlet.shopping.service.ShoppingCategoryLocalService shoppingCategoryLocalService) {
244                    this.shoppingCategoryLocalService = shoppingCategoryLocalService;
245            }
246    
247            /**
248             * Returns the shopping category remote service.
249             *
250             * @return the shopping category remote service
251             */
252            public com.liferay.portlet.shopping.service.ShoppingCategoryService getShoppingCategoryService() {
253                    return shoppingCategoryService;
254            }
255    
256            /**
257             * Sets the shopping category remote service.
258             *
259             * @param shoppingCategoryService the shopping category remote service
260             */
261            public void setShoppingCategoryService(
262                    com.liferay.portlet.shopping.service.ShoppingCategoryService shoppingCategoryService) {
263                    this.shoppingCategoryService = shoppingCategoryService;
264            }
265    
266            /**
267             * Returns the shopping category persistence.
268             *
269             * @return the shopping category persistence
270             */
271            public ShoppingCategoryPersistence getShoppingCategoryPersistence() {
272                    return shoppingCategoryPersistence;
273            }
274    
275            /**
276             * Sets the shopping category persistence.
277             *
278             * @param shoppingCategoryPersistence the shopping category persistence
279             */
280            public void setShoppingCategoryPersistence(
281                    ShoppingCategoryPersistence shoppingCategoryPersistence) {
282                    this.shoppingCategoryPersistence = shoppingCategoryPersistence;
283            }
284    
285            /**
286             * Returns the shopping item local service.
287             *
288             * @return the shopping item local service
289             */
290            public com.liferay.portlet.shopping.service.ShoppingItemLocalService getShoppingItemLocalService() {
291                    return shoppingItemLocalService;
292            }
293    
294            /**
295             * Sets the shopping item local service.
296             *
297             * @param shoppingItemLocalService the shopping item local service
298             */
299            public void setShoppingItemLocalService(
300                    com.liferay.portlet.shopping.service.ShoppingItemLocalService shoppingItemLocalService) {
301                    this.shoppingItemLocalService = shoppingItemLocalService;
302            }
303    
304            /**
305             * Returns the shopping item remote service.
306             *
307             * @return the shopping item remote service
308             */
309            public com.liferay.portlet.shopping.service.ShoppingItemService getShoppingItemService() {
310                    return shoppingItemService;
311            }
312    
313            /**
314             * Sets the shopping item remote service.
315             *
316             * @param shoppingItemService the shopping item remote service
317             */
318            public void setShoppingItemService(
319                    com.liferay.portlet.shopping.service.ShoppingItemService shoppingItemService) {
320                    this.shoppingItemService = shoppingItemService;
321            }
322    
323            /**
324             * Returns the shopping item persistence.
325             *
326             * @return the shopping item persistence
327             */
328            public ShoppingItemPersistence getShoppingItemPersistence() {
329                    return shoppingItemPersistence;
330            }
331    
332            /**
333             * Sets the shopping item persistence.
334             *
335             * @param shoppingItemPersistence the shopping item persistence
336             */
337            public void setShoppingItemPersistence(
338                    ShoppingItemPersistence shoppingItemPersistence) {
339                    this.shoppingItemPersistence = shoppingItemPersistence;
340            }
341    
342            /**
343             * Returns the shopping item finder.
344             *
345             * @return the shopping item finder
346             */
347            public ShoppingItemFinder getShoppingItemFinder() {
348                    return shoppingItemFinder;
349            }
350    
351            /**
352             * Sets the shopping item finder.
353             *
354             * @param shoppingItemFinder the shopping item finder
355             */
356            public void setShoppingItemFinder(ShoppingItemFinder shoppingItemFinder) {
357                    this.shoppingItemFinder = shoppingItemFinder;
358            }
359    
360            public void afterPropertiesSet() {
361            }
362    
363            public void destroy() {
364            }
365    
366            /**
367             * Returns the Spring bean ID for this bean.
368             *
369             * @return the Spring bean ID for this bean
370             */
371            @Override
372            public String getBeanIdentifier() {
373                    return _beanIdentifier;
374            }
375    
376            /**
377             * Sets the Spring bean ID for this bean.
378             *
379             * @param beanIdentifier the Spring bean ID for this bean
380             */
381            @Override
382            public void setBeanIdentifier(String beanIdentifier) {
383                    _beanIdentifier = beanIdentifier;
384            }
385    
386            protected Class<?> getModelClass() {
387                    return ShoppingCoupon.class;
388            }
389    
390            protected String getModelClassName() {
391                    return ShoppingCoupon.class.getName();
392            }
393    
394            /**
395             * Performs a SQL query.
396             *
397             * @param sql the sql query
398             */
399            protected void runSQL(String sql) {
400                    try {
401                            DataSource dataSource = shoppingCouponPersistence.getDataSource();
402    
403                            DB db = DBFactoryUtil.getDB();
404    
405                            sql = db.buildSQL(sql);
406                            sql = PortalUtil.transformSQL(sql);
407    
408                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
409                                            sql, new int[0]);
410    
411                            sqlUpdate.update();
412                    }
413                    catch (Exception e) {
414                            throw new SystemException(e);
415                    }
416            }
417    
418            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingCouponLocalService.class)
419            protected com.liferay.portlet.shopping.service.ShoppingCouponLocalService shoppingCouponLocalService;
420            @BeanReference(type = ShoppingCouponService.class)
421            protected ShoppingCouponService shoppingCouponService;
422            @BeanReference(type = ShoppingCouponPersistence.class)
423            protected ShoppingCouponPersistence shoppingCouponPersistence;
424            @BeanReference(type = ShoppingCouponFinder.class)
425            protected ShoppingCouponFinder shoppingCouponFinder;
426            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
427            protected com.liferay.counter.service.CounterLocalService counterLocalService;
428            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
429            protected com.liferay.portal.service.UserLocalService userLocalService;
430            @BeanReference(type = com.liferay.portal.service.UserService.class)
431            protected com.liferay.portal.service.UserService userService;
432            @BeanReference(type = UserPersistence.class)
433            protected UserPersistence userPersistence;
434            @BeanReference(type = UserFinder.class)
435            protected UserFinder userFinder;
436            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingCategoryLocalService.class)
437            protected com.liferay.portlet.shopping.service.ShoppingCategoryLocalService shoppingCategoryLocalService;
438            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingCategoryService.class)
439            protected com.liferay.portlet.shopping.service.ShoppingCategoryService shoppingCategoryService;
440            @BeanReference(type = ShoppingCategoryPersistence.class)
441            protected ShoppingCategoryPersistence shoppingCategoryPersistence;
442            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemLocalService.class)
443            protected com.liferay.portlet.shopping.service.ShoppingItemLocalService shoppingItemLocalService;
444            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemService.class)
445            protected com.liferay.portlet.shopping.service.ShoppingItemService shoppingItemService;
446            @BeanReference(type = ShoppingItemPersistence.class)
447            protected ShoppingItemPersistence shoppingItemPersistence;
448            @BeanReference(type = ShoppingItemFinder.class)
449            protected ShoppingItemFinder shoppingItemFinder;
450            private String _beanIdentifier;
451    }