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.ImagePersistence;
026    import com.liferay.portal.service.persistence.UserFinder;
027    import com.liferay.portal.service.persistence.UserPersistence;
028    import com.liferay.portal.util.PortalUtil;
029    
030    import com.liferay.portlet.shopping.model.ShoppingItem;
031    import com.liferay.portlet.shopping.service.ShoppingItemService;
032    import com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence;
033    import com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence;
034    import com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder;
035    import com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence;
036    import com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence;
037    
038    import javax.sql.DataSource;
039    
040    /**
041     * Provides the base implementation for the shopping item remote service.
042     *
043     * <p>
044     * 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.ShoppingItemServiceImpl}.
045     * </p>
046     *
047     * @author Brian Wing Shun Chan
048     * @see com.liferay.portlet.shopping.service.impl.ShoppingItemServiceImpl
049     * @see com.liferay.portlet.shopping.service.ShoppingItemServiceUtil
050     * @generated
051     */
052    public abstract class ShoppingItemServiceBaseImpl extends BaseServiceImpl
053            implements ShoppingItemService, IdentifiableBean {
054            /*
055             * NOTE FOR DEVELOPERS:
056             *
057             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.shopping.service.ShoppingItemServiceUtil} to access the shopping item remote service.
058             */
059    
060            /**
061             * Returns the shopping item local service.
062             *
063             * @return the shopping item local service
064             */
065            public com.liferay.portlet.shopping.service.ShoppingItemLocalService getShoppingItemLocalService() {
066                    return shoppingItemLocalService;
067            }
068    
069            /**
070             * Sets the shopping item local service.
071             *
072             * @param shoppingItemLocalService the shopping item local service
073             */
074            public void setShoppingItemLocalService(
075                    com.liferay.portlet.shopping.service.ShoppingItemLocalService shoppingItemLocalService) {
076                    this.shoppingItemLocalService = shoppingItemLocalService;
077            }
078    
079            /**
080             * Returns the shopping item remote service.
081             *
082             * @return the shopping item remote service
083             */
084            public com.liferay.portlet.shopping.service.ShoppingItemService getShoppingItemService() {
085                    return shoppingItemService;
086            }
087    
088            /**
089             * Sets the shopping item remote service.
090             *
091             * @param shoppingItemService the shopping item remote service
092             */
093            public void setShoppingItemService(
094                    com.liferay.portlet.shopping.service.ShoppingItemService shoppingItemService) {
095                    this.shoppingItemService = shoppingItemService;
096            }
097    
098            /**
099             * Returns the shopping item persistence.
100             *
101             * @return the shopping item persistence
102             */
103            public ShoppingItemPersistence getShoppingItemPersistence() {
104                    return shoppingItemPersistence;
105            }
106    
107            /**
108             * Sets the shopping item persistence.
109             *
110             * @param shoppingItemPersistence the shopping item persistence
111             */
112            public void setShoppingItemPersistence(
113                    ShoppingItemPersistence shoppingItemPersistence) {
114                    this.shoppingItemPersistence = shoppingItemPersistence;
115            }
116    
117            /**
118             * Returns the shopping item finder.
119             *
120             * @return the shopping item finder
121             */
122            public ShoppingItemFinder getShoppingItemFinder() {
123                    return shoppingItemFinder;
124            }
125    
126            /**
127             * Sets the shopping item finder.
128             *
129             * @param shoppingItemFinder the shopping item finder
130             */
131            public void setShoppingItemFinder(ShoppingItemFinder shoppingItemFinder) {
132                    this.shoppingItemFinder = shoppingItemFinder;
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 image local service.
156             *
157             * @return the image local service
158             */
159            public com.liferay.portal.service.ImageLocalService getImageLocalService() {
160                    return imageLocalService;
161            }
162    
163            /**
164             * Sets the image local service.
165             *
166             * @param imageLocalService the image local service
167             */
168            public void setImageLocalService(
169                    com.liferay.portal.service.ImageLocalService imageLocalService) {
170                    this.imageLocalService = imageLocalService;
171            }
172    
173            /**
174             * Returns the image remote service.
175             *
176             * @return the image remote service
177             */
178            public com.liferay.portal.service.ImageService getImageService() {
179                    return imageService;
180            }
181    
182            /**
183             * Sets the image remote service.
184             *
185             * @param imageService the image remote service
186             */
187            public void setImageService(
188                    com.liferay.portal.service.ImageService imageService) {
189                    this.imageService = imageService;
190            }
191    
192            /**
193             * Returns the image persistence.
194             *
195             * @return the image persistence
196             */
197            public ImagePersistence getImagePersistence() {
198                    return imagePersistence;
199            }
200    
201            /**
202             * Sets the image persistence.
203             *
204             * @param imagePersistence the image persistence
205             */
206            public void setImagePersistence(ImagePersistence imagePersistence) {
207                    this.imagePersistence = imagePersistence;
208            }
209    
210            /**
211             * Returns the resource local service.
212             *
213             * @return the resource local service
214             */
215            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
216                    return resourceLocalService;
217            }
218    
219            /**
220             * Sets the resource local service.
221             *
222             * @param resourceLocalService the resource local service
223             */
224            public void setResourceLocalService(
225                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
226                    this.resourceLocalService = resourceLocalService;
227            }
228    
229            /**
230             * Returns the user local service.
231             *
232             * @return the user local service
233             */
234            public com.liferay.portal.service.UserLocalService getUserLocalService() {
235                    return userLocalService;
236            }
237    
238            /**
239             * Sets the user local service.
240             *
241             * @param userLocalService the user local service
242             */
243            public void setUserLocalService(
244                    com.liferay.portal.service.UserLocalService userLocalService) {
245                    this.userLocalService = userLocalService;
246            }
247    
248            /**
249             * Returns the user remote service.
250             *
251             * @return the user remote service
252             */
253            public com.liferay.portal.service.UserService getUserService() {
254                    return userService;
255            }
256    
257            /**
258             * Sets the user remote service.
259             *
260             * @param userService the user remote service
261             */
262            public void setUserService(
263                    com.liferay.portal.service.UserService userService) {
264                    this.userService = userService;
265            }
266    
267            /**
268             * Returns the user persistence.
269             *
270             * @return the user persistence
271             */
272            public UserPersistence getUserPersistence() {
273                    return userPersistence;
274            }
275    
276            /**
277             * Sets the user persistence.
278             *
279             * @param userPersistence the user persistence
280             */
281            public void setUserPersistence(UserPersistence userPersistence) {
282                    this.userPersistence = userPersistence;
283            }
284    
285            /**
286             * Returns the user finder.
287             *
288             * @return the user finder
289             */
290            public UserFinder getUserFinder() {
291                    return userFinder;
292            }
293    
294            /**
295             * Sets the user finder.
296             *
297             * @param userFinder the user finder
298             */
299            public void setUserFinder(UserFinder userFinder) {
300                    this.userFinder = userFinder;
301            }
302    
303            /**
304             * Returns the shopping category local service.
305             *
306             * @return the shopping category local service
307             */
308            public com.liferay.portlet.shopping.service.ShoppingCategoryLocalService getShoppingCategoryLocalService() {
309                    return shoppingCategoryLocalService;
310            }
311    
312            /**
313             * Sets the shopping category local service.
314             *
315             * @param shoppingCategoryLocalService the shopping category local service
316             */
317            public void setShoppingCategoryLocalService(
318                    com.liferay.portlet.shopping.service.ShoppingCategoryLocalService shoppingCategoryLocalService) {
319                    this.shoppingCategoryLocalService = shoppingCategoryLocalService;
320            }
321    
322            /**
323             * Returns the shopping category remote service.
324             *
325             * @return the shopping category remote service
326             */
327            public com.liferay.portlet.shopping.service.ShoppingCategoryService getShoppingCategoryService() {
328                    return shoppingCategoryService;
329            }
330    
331            /**
332             * Sets the shopping category remote service.
333             *
334             * @param shoppingCategoryService the shopping category remote service
335             */
336            public void setShoppingCategoryService(
337                    com.liferay.portlet.shopping.service.ShoppingCategoryService shoppingCategoryService) {
338                    this.shoppingCategoryService = shoppingCategoryService;
339            }
340    
341            /**
342             * Returns the shopping category persistence.
343             *
344             * @return the shopping category persistence
345             */
346            public ShoppingCategoryPersistence getShoppingCategoryPersistence() {
347                    return shoppingCategoryPersistence;
348            }
349    
350            /**
351             * Sets the shopping category persistence.
352             *
353             * @param shoppingCategoryPersistence the shopping category persistence
354             */
355            public void setShoppingCategoryPersistence(
356                    ShoppingCategoryPersistence shoppingCategoryPersistence) {
357                    this.shoppingCategoryPersistence = shoppingCategoryPersistence;
358            }
359    
360            /**
361             * Returns the shopping item field local service.
362             *
363             * @return the shopping item field local service
364             */
365            public com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService getShoppingItemFieldLocalService() {
366                    return shoppingItemFieldLocalService;
367            }
368    
369            /**
370             * Sets the shopping item field local service.
371             *
372             * @param shoppingItemFieldLocalService the shopping item field local service
373             */
374            public void setShoppingItemFieldLocalService(
375                    com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService shoppingItemFieldLocalService) {
376                    this.shoppingItemFieldLocalService = shoppingItemFieldLocalService;
377            }
378    
379            /**
380             * Returns the shopping item field persistence.
381             *
382             * @return the shopping item field persistence
383             */
384            public ShoppingItemFieldPersistence getShoppingItemFieldPersistence() {
385                    return shoppingItemFieldPersistence;
386            }
387    
388            /**
389             * Sets the shopping item field persistence.
390             *
391             * @param shoppingItemFieldPersistence the shopping item field persistence
392             */
393            public void setShoppingItemFieldPersistence(
394                    ShoppingItemFieldPersistence shoppingItemFieldPersistence) {
395                    this.shoppingItemFieldPersistence = shoppingItemFieldPersistence;
396            }
397    
398            /**
399             * Returns the shopping item price local service.
400             *
401             * @return the shopping item price local service
402             */
403            public com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService getShoppingItemPriceLocalService() {
404                    return shoppingItemPriceLocalService;
405            }
406    
407            /**
408             * Sets the shopping item price local service.
409             *
410             * @param shoppingItemPriceLocalService the shopping item price local service
411             */
412            public void setShoppingItemPriceLocalService(
413                    com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService shoppingItemPriceLocalService) {
414                    this.shoppingItemPriceLocalService = shoppingItemPriceLocalService;
415            }
416    
417            /**
418             * Returns the shopping item price persistence.
419             *
420             * @return the shopping item price persistence
421             */
422            public ShoppingItemPricePersistence getShoppingItemPricePersistence() {
423                    return shoppingItemPricePersistence;
424            }
425    
426            /**
427             * Sets the shopping item price persistence.
428             *
429             * @param shoppingItemPricePersistence the shopping item price persistence
430             */
431            public void setShoppingItemPricePersistence(
432                    ShoppingItemPricePersistence shoppingItemPricePersistence) {
433                    this.shoppingItemPricePersistence = shoppingItemPricePersistence;
434            }
435    
436            public void afterPropertiesSet() {
437            }
438    
439            public void destroy() {
440            }
441    
442            /**
443             * Returns the Spring bean ID for this bean.
444             *
445             * @return the Spring bean ID for this bean
446             */
447            @Override
448            public String getBeanIdentifier() {
449                    return _beanIdentifier;
450            }
451    
452            /**
453             * Sets the Spring bean ID for this bean.
454             *
455             * @param beanIdentifier the Spring bean ID for this bean
456             */
457            @Override
458            public void setBeanIdentifier(String beanIdentifier) {
459                    _beanIdentifier = beanIdentifier;
460            }
461    
462            protected Class<?> getModelClass() {
463                    return ShoppingItem.class;
464            }
465    
466            protected String getModelClassName() {
467                    return ShoppingItem.class.getName();
468            }
469    
470            /**
471             * Performs a SQL query.
472             *
473             * @param sql the sql query
474             */
475            protected void runSQL(String sql) {
476                    try {
477                            DataSource dataSource = shoppingItemPersistence.getDataSource();
478    
479                            DB db = DBFactoryUtil.getDB();
480    
481                            sql = db.buildSQL(sql);
482                            sql = PortalUtil.transformSQL(sql);
483    
484                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
485                                            sql, new int[0]);
486    
487                            sqlUpdate.update();
488                    }
489                    catch (Exception e) {
490                            throw new SystemException(e);
491                    }
492            }
493    
494            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemLocalService.class)
495            protected com.liferay.portlet.shopping.service.ShoppingItemLocalService shoppingItemLocalService;
496            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemService.class)
497            protected com.liferay.portlet.shopping.service.ShoppingItemService shoppingItemService;
498            @BeanReference(type = ShoppingItemPersistence.class)
499            protected ShoppingItemPersistence shoppingItemPersistence;
500            @BeanReference(type = ShoppingItemFinder.class)
501            protected ShoppingItemFinder shoppingItemFinder;
502            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
503            protected com.liferay.counter.service.CounterLocalService counterLocalService;
504            @BeanReference(type = com.liferay.portal.service.ImageLocalService.class)
505            protected com.liferay.portal.service.ImageLocalService imageLocalService;
506            @BeanReference(type = com.liferay.portal.service.ImageService.class)
507            protected com.liferay.portal.service.ImageService imageService;
508            @BeanReference(type = ImagePersistence.class)
509            protected ImagePersistence imagePersistence;
510            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
511            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
512            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
513            protected com.liferay.portal.service.UserLocalService userLocalService;
514            @BeanReference(type = com.liferay.portal.service.UserService.class)
515            protected com.liferay.portal.service.UserService userService;
516            @BeanReference(type = UserPersistence.class)
517            protected UserPersistence userPersistence;
518            @BeanReference(type = UserFinder.class)
519            protected UserFinder userFinder;
520            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingCategoryLocalService.class)
521            protected com.liferay.portlet.shopping.service.ShoppingCategoryLocalService shoppingCategoryLocalService;
522            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingCategoryService.class)
523            protected com.liferay.portlet.shopping.service.ShoppingCategoryService shoppingCategoryService;
524            @BeanReference(type = ShoppingCategoryPersistence.class)
525            protected ShoppingCategoryPersistence shoppingCategoryPersistence;
526            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService.class)
527            protected com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService shoppingItemFieldLocalService;
528            @BeanReference(type = ShoppingItemFieldPersistence.class)
529            protected ShoppingItemFieldPersistence shoppingItemFieldPersistence;
530            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService.class)
531            protected com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService shoppingItemPriceLocalService;
532            @BeanReference(type = ShoppingItemPricePersistence.class)
533            protected ShoppingItemPricePersistence shoppingItemPricePersistence;
534            private String _beanIdentifier;
535    }