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