001    /**
002     * Copyright (c) 2000-2010 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.counter.service.CounterLocalService;
018    
019    import com.liferay.portal.kernel.annotation.BeanReference;
020    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
023    import com.liferay.portal.kernel.exception.PortalException;
024    import com.liferay.portal.kernel.exception.SystemException;
025    import com.liferay.portal.kernel.util.OrderByComparator;
026    import com.liferay.portal.service.ImageLocalService;
027    import com.liferay.portal.service.ImageService;
028    import com.liferay.portal.service.ResourceLocalService;
029    import com.liferay.portal.service.ResourceService;
030    import com.liferay.portal.service.UserLocalService;
031    import com.liferay.portal.service.UserService;
032    import com.liferay.portal.service.persistence.ImagePersistence;
033    import com.liferay.portal.service.persistence.ResourceFinder;
034    import com.liferay.portal.service.persistence.ResourcePersistence;
035    import com.liferay.portal.service.persistence.UserFinder;
036    import com.liferay.portal.service.persistence.UserPersistence;
037    
038    import com.liferay.portlet.shopping.model.ShoppingItem;
039    import com.liferay.portlet.shopping.service.ShoppingCartLocalService;
040    import com.liferay.portlet.shopping.service.ShoppingCategoryLocalService;
041    import com.liferay.portlet.shopping.service.ShoppingCategoryService;
042    import com.liferay.portlet.shopping.service.ShoppingCouponLocalService;
043    import com.liferay.portlet.shopping.service.ShoppingCouponService;
044    import com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService;
045    import com.liferay.portlet.shopping.service.ShoppingItemLocalService;
046    import com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService;
047    import com.liferay.portlet.shopping.service.ShoppingItemService;
048    import com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService;
049    import com.liferay.portlet.shopping.service.ShoppingOrderLocalService;
050    import com.liferay.portlet.shopping.service.ShoppingOrderService;
051    import com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence;
052    import com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence;
053    import com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder;
054    import com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence;
055    import com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence;
056    import com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder;
057    import com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence;
058    import com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence;
059    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder;
060    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence;
061    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence;
062    
063    import java.util.List;
064    
065    import javax.sql.DataSource;
066    
067    /**
068     * The base implementation of the shopping item local service.
069     *
070     * <p>
071     * 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.ShoppingItemLocalServiceImpl}.
072     * </p>
073     *
074     * <p>
075     * Never modify or reference this class directly. Always use {@link com.liferay.portlet.shopping.service.ShoppingItemLocalServiceUtil} to access the shopping item local service.
076     * </p>
077     *
078     * @author Brian Wing Shun Chan
079     * @see com.liferay.portlet.shopping.service.impl.ShoppingItemLocalServiceImpl
080     * @see com.liferay.portlet.shopping.service.ShoppingItemLocalServiceUtil
081     * @generated
082     */
083    public abstract class ShoppingItemLocalServiceBaseImpl
084            implements ShoppingItemLocalService {
085            /**
086             * Adds the shopping item to the database. Also notifies the appropriate model listeners.
087             *
088             * @param shoppingItem the shopping item to add
089             * @return the shopping item that was added
090             * @throws SystemException if a system exception occurred
091             */
092            public ShoppingItem addShoppingItem(ShoppingItem shoppingItem)
093                    throws SystemException {
094                    shoppingItem.setNew(true);
095    
096                    return shoppingItemPersistence.update(shoppingItem, false);
097            }
098    
099            /**
100             * Creates a new shopping item with the primary key. Does not add the shopping item to the database.
101             *
102             * @param itemId the primary key for the new shopping item
103             * @return the new shopping item
104             */
105            public ShoppingItem createShoppingItem(long itemId) {
106                    return shoppingItemPersistence.create(itemId);
107            }
108    
109            /**
110             * Deletes the shopping item with the primary key from the database. Also notifies the appropriate model listeners.
111             *
112             * @param itemId the primary key of the shopping item to delete
113             * @throws PortalException if a shopping item with the primary key could not be found
114             * @throws SystemException if a system exception occurred
115             */
116            public void deleteShoppingItem(long itemId)
117                    throws PortalException, SystemException {
118                    shoppingItemPersistence.remove(itemId);
119            }
120    
121            /**
122             * Deletes the shopping item from the database. Also notifies the appropriate model listeners.
123             *
124             * @param shoppingItem the shopping item to delete
125             * @throws SystemException if a system exception occurred
126             */
127            public void deleteShoppingItem(ShoppingItem shoppingItem)
128                    throws SystemException {
129                    shoppingItemPersistence.remove(shoppingItem);
130            }
131    
132            /**
133             * Performs a dynamic query on the database and returns the matching rows.
134             *
135             * @param dynamicQuery the dynamic query to search with
136             * @return the matching rows
137             * @throws SystemException if a system exception occurred
138             */
139            @SuppressWarnings("rawtypes")
140            public List dynamicQuery(DynamicQuery dynamicQuery)
141                    throws SystemException {
142                    return shoppingItemPersistence.findWithDynamicQuery(dynamicQuery);
143            }
144    
145            /**
146             * Performs a dynamic query on the database and returns a range of the matching rows.
147             *
148             * <p>
149             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
150             * </p>
151             *
152             * @param dynamicQuery the dynamic query to search with
153             * @param start the lower bound of the range of model instances to return
154             * @param end the upper bound of the range of model instances to return (not inclusive)
155             * @return the range of matching rows
156             * @throws SystemException if a system exception occurred
157             */
158            @SuppressWarnings("rawtypes")
159            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
160                    throws SystemException {
161                    return shoppingItemPersistence.findWithDynamicQuery(dynamicQuery,
162                            start, end);
163            }
164    
165            /**
166             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
167             *
168             * <p>
169             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
170             * </p>
171             *
172             * @param dynamicQuery the dynamic query to search with
173             * @param start the lower bound of the range of model instances to return
174             * @param end the upper bound of the range of model instances to return (not inclusive)
175             * @param orderByComparator the comparator to order the results by
176             * @return the ordered range of matching rows
177             * @throws SystemException if a system exception occurred
178             */
179            @SuppressWarnings("rawtypes")
180            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
181                    OrderByComparator orderByComparator) throws SystemException {
182                    return shoppingItemPersistence.findWithDynamicQuery(dynamicQuery,
183                            start, end, orderByComparator);
184            }
185    
186            /**
187             * Counts the number of rows that match the dynamic query.
188             *
189             * @param dynamicQuery the dynamic query to search with
190             * @return the number of rows that match the dynamic query
191             * @throws SystemException if a system exception occurred
192             */
193            public long dynamicQueryCount(DynamicQuery dynamicQuery)
194                    throws SystemException {
195                    return shoppingItemPersistence.countWithDynamicQuery(dynamicQuery);
196            }
197    
198            /**
199             * Gets the shopping item with the primary key.
200             *
201             * @param itemId the primary key of the shopping item to get
202             * @return the shopping item
203             * @throws PortalException if a shopping item with the primary key could not be found
204             * @throws SystemException if a system exception occurred
205             */
206            public ShoppingItem getShoppingItem(long itemId)
207                    throws PortalException, SystemException {
208                    return shoppingItemPersistence.findByPrimaryKey(itemId);
209            }
210    
211            /**
212             * Gets a range of all the shopping items.
213             *
214             * <p>
215             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
216             * </p>
217             *
218             * @param start the lower bound of the range of shopping items to return
219             * @param end the upper bound of the range of shopping items to return (not inclusive)
220             * @return the range of shopping items
221             * @throws SystemException if a system exception occurred
222             */
223            public List<ShoppingItem> getShoppingItems(int start, int end)
224                    throws SystemException {
225                    return shoppingItemPersistence.findAll(start, end);
226            }
227    
228            /**
229             * Gets the number of shopping items.
230             *
231             * @return the number of shopping items
232             * @throws SystemException if a system exception occurred
233             */
234            public int getShoppingItemsCount() throws SystemException {
235                    return shoppingItemPersistence.countAll();
236            }
237    
238            /**
239             * Updates the shopping item in the database. Also notifies the appropriate model listeners.
240             *
241             * @param shoppingItem the shopping item to update
242             * @return the shopping item that was updated
243             * @throws SystemException if a system exception occurred
244             */
245            public ShoppingItem updateShoppingItem(ShoppingItem shoppingItem)
246                    throws SystemException {
247                    shoppingItem.setNew(false);
248    
249                    return shoppingItemPersistence.update(shoppingItem, true);
250            }
251    
252            /**
253             * Updates the shopping item in the database. Also notifies the appropriate model listeners.
254             *
255             * @param shoppingItem the shopping item to update
256             * @param merge whether to merge the shopping item with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
257             * @return the shopping item that was updated
258             * @throws SystemException if a system exception occurred
259             */
260            public ShoppingItem updateShoppingItem(ShoppingItem shoppingItem,
261                    boolean merge) throws SystemException {
262                    shoppingItem.setNew(false);
263    
264                    return shoppingItemPersistence.update(shoppingItem, merge);
265            }
266    
267            /**
268             * Gets the shopping cart local service.
269             *
270             * @return the shopping cart local service
271             */
272            public ShoppingCartLocalService getShoppingCartLocalService() {
273                    return shoppingCartLocalService;
274            }
275    
276            /**
277             * Sets the shopping cart local service.
278             *
279             * @param shoppingCartLocalService the shopping cart local service
280             */
281            public void setShoppingCartLocalService(
282                    ShoppingCartLocalService shoppingCartLocalService) {
283                    this.shoppingCartLocalService = shoppingCartLocalService;
284            }
285    
286            /**
287             * Gets the shopping cart persistence.
288             *
289             * @return the shopping cart persistence
290             */
291            public ShoppingCartPersistence getShoppingCartPersistence() {
292                    return shoppingCartPersistence;
293            }
294    
295            /**
296             * Sets the shopping cart persistence.
297             *
298             * @param shoppingCartPersistence the shopping cart persistence
299             */
300            public void setShoppingCartPersistence(
301                    ShoppingCartPersistence shoppingCartPersistence) {
302                    this.shoppingCartPersistence = shoppingCartPersistence;
303            }
304    
305            /**
306             * Gets the shopping category local service.
307             *
308             * @return the shopping category local service
309             */
310            public ShoppingCategoryLocalService getShoppingCategoryLocalService() {
311                    return shoppingCategoryLocalService;
312            }
313    
314            /**
315             * Sets the shopping category local service.
316             *
317             * @param shoppingCategoryLocalService the shopping category local service
318             */
319            public void setShoppingCategoryLocalService(
320                    ShoppingCategoryLocalService shoppingCategoryLocalService) {
321                    this.shoppingCategoryLocalService = shoppingCategoryLocalService;
322            }
323    
324            /**
325             * Gets the shopping category remote service.
326             *
327             * @return the shopping category remote service
328             */
329            public ShoppingCategoryService getShoppingCategoryService() {
330                    return shoppingCategoryService;
331            }
332    
333            /**
334             * Sets the shopping category remote service.
335             *
336             * @param shoppingCategoryService the shopping category remote service
337             */
338            public void setShoppingCategoryService(
339                    ShoppingCategoryService shoppingCategoryService) {
340                    this.shoppingCategoryService = shoppingCategoryService;
341            }
342    
343            /**
344             * Gets the shopping category persistence.
345             *
346             * @return the shopping category persistence
347             */
348            public ShoppingCategoryPersistence getShoppingCategoryPersistence() {
349                    return shoppingCategoryPersistence;
350            }
351    
352            /**
353             * Sets the shopping category persistence.
354             *
355             * @param shoppingCategoryPersistence the shopping category persistence
356             */
357            public void setShoppingCategoryPersistence(
358                    ShoppingCategoryPersistence shoppingCategoryPersistence) {
359                    this.shoppingCategoryPersistence = shoppingCategoryPersistence;
360            }
361    
362            /**
363             * Gets the shopping coupon local service.
364             *
365             * @return the shopping coupon local service
366             */
367            public ShoppingCouponLocalService getShoppingCouponLocalService() {
368                    return shoppingCouponLocalService;
369            }
370    
371            /**
372             * Sets the shopping coupon local service.
373             *
374             * @param shoppingCouponLocalService the shopping coupon local service
375             */
376            public void setShoppingCouponLocalService(
377                    ShoppingCouponLocalService shoppingCouponLocalService) {
378                    this.shoppingCouponLocalService = shoppingCouponLocalService;
379            }
380    
381            /**
382             * Gets the shopping coupon remote service.
383             *
384             * @return the shopping coupon remote service
385             */
386            public ShoppingCouponService getShoppingCouponService() {
387                    return shoppingCouponService;
388            }
389    
390            /**
391             * Sets the shopping coupon remote service.
392             *
393             * @param shoppingCouponService the shopping coupon remote service
394             */
395            public void setShoppingCouponService(
396                    ShoppingCouponService shoppingCouponService) {
397                    this.shoppingCouponService = shoppingCouponService;
398            }
399    
400            /**
401             * Gets the shopping coupon persistence.
402             *
403             * @return the shopping coupon persistence
404             */
405            public ShoppingCouponPersistence getShoppingCouponPersistence() {
406                    return shoppingCouponPersistence;
407            }
408    
409            /**
410             * Sets the shopping coupon persistence.
411             *
412             * @param shoppingCouponPersistence the shopping coupon persistence
413             */
414            public void setShoppingCouponPersistence(
415                    ShoppingCouponPersistence shoppingCouponPersistence) {
416                    this.shoppingCouponPersistence = shoppingCouponPersistence;
417            }
418    
419            /**
420             * Gets the shopping coupon finder.
421             *
422             * @return the shopping coupon finder
423             */
424            public ShoppingCouponFinder getShoppingCouponFinder() {
425                    return shoppingCouponFinder;
426            }
427    
428            /**
429             * Sets the shopping coupon finder.
430             *
431             * @param shoppingCouponFinder the shopping coupon finder
432             */
433            public void setShoppingCouponFinder(
434                    ShoppingCouponFinder shoppingCouponFinder) {
435                    this.shoppingCouponFinder = shoppingCouponFinder;
436            }
437    
438            /**
439             * Gets the shopping item local service.
440             *
441             * @return the shopping item local service
442             */
443            public ShoppingItemLocalService getShoppingItemLocalService() {
444                    return shoppingItemLocalService;
445            }
446    
447            /**
448             * Sets the shopping item local service.
449             *
450             * @param shoppingItemLocalService the shopping item local service
451             */
452            public void setShoppingItemLocalService(
453                    ShoppingItemLocalService shoppingItemLocalService) {
454                    this.shoppingItemLocalService = shoppingItemLocalService;
455            }
456    
457            /**
458             * Gets the shopping item remote service.
459             *
460             * @return the shopping item remote service
461             */
462            public ShoppingItemService getShoppingItemService() {
463                    return shoppingItemService;
464            }
465    
466            /**
467             * Sets the shopping item remote service.
468             *
469             * @param shoppingItemService the shopping item remote service
470             */
471            public void setShoppingItemService(ShoppingItemService shoppingItemService) {
472                    this.shoppingItemService = shoppingItemService;
473            }
474    
475            /**
476             * Gets the shopping item persistence.
477             *
478             * @return the shopping item persistence
479             */
480            public ShoppingItemPersistence getShoppingItemPersistence() {
481                    return shoppingItemPersistence;
482            }
483    
484            /**
485             * Sets the shopping item persistence.
486             *
487             * @param shoppingItemPersistence the shopping item persistence
488             */
489            public void setShoppingItemPersistence(
490                    ShoppingItemPersistence shoppingItemPersistence) {
491                    this.shoppingItemPersistence = shoppingItemPersistence;
492            }
493    
494            /**
495             * Gets the shopping item finder.
496             *
497             * @return the shopping item finder
498             */
499            public ShoppingItemFinder getShoppingItemFinder() {
500                    return shoppingItemFinder;
501            }
502    
503            /**
504             * Sets the shopping item finder.
505             *
506             * @param shoppingItemFinder the shopping item finder
507             */
508            public void setShoppingItemFinder(ShoppingItemFinder shoppingItemFinder) {
509                    this.shoppingItemFinder = shoppingItemFinder;
510            }
511    
512            /**
513             * Gets the shopping item field local service.
514             *
515             * @return the shopping item field local service
516             */
517            public ShoppingItemFieldLocalService getShoppingItemFieldLocalService() {
518                    return shoppingItemFieldLocalService;
519            }
520    
521            /**
522             * Sets the shopping item field local service.
523             *
524             * @param shoppingItemFieldLocalService the shopping item field local service
525             */
526            public void setShoppingItemFieldLocalService(
527                    ShoppingItemFieldLocalService shoppingItemFieldLocalService) {
528                    this.shoppingItemFieldLocalService = shoppingItemFieldLocalService;
529            }
530    
531            /**
532             * Gets the shopping item field persistence.
533             *
534             * @return the shopping item field persistence
535             */
536            public ShoppingItemFieldPersistence getShoppingItemFieldPersistence() {
537                    return shoppingItemFieldPersistence;
538            }
539    
540            /**
541             * Sets the shopping item field persistence.
542             *
543             * @param shoppingItemFieldPersistence the shopping item field persistence
544             */
545            public void setShoppingItemFieldPersistence(
546                    ShoppingItemFieldPersistence shoppingItemFieldPersistence) {
547                    this.shoppingItemFieldPersistence = shoppingItemFieldPersistence;
548            }
549    
550            /**
551             * Gets the shopping item price local service.
552             *
553             * @return the shopping item price local service
554             */
555            public ShoppingItemPriceLocalService getShoppingItemPriceLocalService() {
556                    return shoppingItemPriceLocalService;
557            }
558    
559            /**
560             * Sets the shopping item price local service.
561             *
562             * @param shoppingItemPriceLocalService the shopping item price local service
563             */
564            public void setShoppingItemPriceLocalService(
565                    ShoppingItemPriceLocalService shoppingItemPriceLocalService) {
566                    this.shoppingItemPriceLocalService = shoppingItemPriceLocalService;
567            }
568    
569            /**
570             * Gets the shopping item price persistence.
571             *
572             * @return the shopping item price persistence
573             */
574            public ShoppingItemPricePersistence getShoppingItemPricePersistence() {
575                    return shoppingItemPricePersistence;
576            }
577    
578            /**
579             * Sets the shopping item price persistence.
580             *
581             * @param shoppingItemPricePersistence the shopping item price persistence
582             */
583            public void setShoppingItemPricePersistence(
584                    ShoppingItemPricePersistence shoppingItemPricePersistence) {
585                    this.shoppingItemPricePersistence = shoppingItemPricePersistence;
586            }
587    
588            /**
589             * Gets the shopping order local service.
590             *
591             * @return the shopping order local service
592             */
593            public ShoppingOrderLocalService getShoppingOrderLocalService() {
594                    return shoppingOrderLocalService;
595            }
596    
597            /**
598             * Sets the shopping order local service.
599             *
600             * @param shoppingOrderLocalService the shopping order local service
601             */
602            public void setShoppingOrderLocalService(
603                    ShoppingOrderLocalService shoppingOrderLocalService) {
604                    this.shoppingOrderLocalService = shoppingOrderLocalService;
605            }
606    
607            /**
608             * Gets the shopping order remote service.
609             *
610             * @return the shopping order remote service
611             */
612            public ShoppingOrderService getShoppingOrderService() {
613                    return shoppingOrderService;
614            }
615    
616            /**
617             * Sets the shopping order remote service.
618             *
619             * @param shoppingOrderService the shopping order remote service
620             */
621            public void setShoppingOrderService(
622                    ShoppingOrderService shoppingOrderService) {
623                    this.shoppingOrderService = shoppingOrderService;
624            }
625    
626            /**
627             * Gets the shopping order persistence.
628             *
629             * @return the shopping order persistence
630             */
631            public ShoppingOrderPersistence getShoppingOrderPersistence() {
632                    return shoppingOrderPersistence;
633            }
634    
635            /**
636             * Sets the shopping order persistence.
637             *
638             * @param shoppingOrderPersistence the shopping order persistence
639             */
640            public void setShoppingOrderPersistence(
641                    ShoppingOrderPersistence shoppingOrderPersistence) {
642                    this.shoppingOrderPersistence = shoppingOrderPersistence;
643            }
644    
645            /**
646             * Gets the shopping order finder.
647             *
648             * @return the shopping order finder
649             */
650            public ShoppingOrderFinder getShoppingOrderFinder() {
651                    return shoppingOrderFinder;
652            }
653    
654            /**
655             * Sets the shopping order finder.
656             *
657             * @param shoppingOrderFinder the shopping order finder
658             */
659            public void setShoppingOrderFinder(ShoppingOrderFinder shoppingOrderFinder) {
660                    this.shoppingOrderFinder = shoppingOrderFinder;
661            }
662    
663            /**
664             * Gets the shopping order item local service.
665             *
666             * @return the shopping order item local service
667             */
668            public ShoppingOrderItemLocalService getShoppingOrderItemLocalService() {
669                    return shoppingOrderItemLocalService;
670            }
671    
672            /**
673             * Sets the shopping order item local service.
674             *
675             * @param shoppingOrderItemLocalService the shopping order item local service
676             */
677            public void setShoppingOrderItemLocalService(
678                    ShoppingOrderItemLocalService shoppingOrderItemLocalService) {
679                    this.shoppingOrderItemLocalService = shoppingOrderItemLocalService;
680            }
681    
682            /**
683             * Gets the shopping order item persistence.
684             *
685             * @return the shopping order item persistence
686             */
687            public ShoppingOrderItemPersistence getShoppingOrderItemPersistence() {
688                    return shoppingOrderItemPersistence;
689            }
690    
691            /**
692             * Sets the shopping order item persistence.
693             *
694             * @param shoppingOrderItemPersistence the shopping order item persistence
695             */
696            public void setShoppingOrderItemPersistence(
697                    ShoppingOrderItemPersistence shoppingOrderItemPersistence) {
698                    this.shoppingOrderItemPersistence = shoppingOrderItemPersistence;
699            }
700    
701            /**
702             * Gets the counter local service.
703             *
704             * @return the counter local service
705             */
706            public CounterLocalService getCounterLocalService() {
707                    return counterLocalService;
708            }
709    
710            /**
711             * Sets the counter local service.
712             *
713             * @param counterLocalService the counter local service
714             */
715            public void setCounterLocalService(CounterLocalService counterLocalService) {
716                    this.counterLocalService = counterLocalService;
717            }
718    
719            /**
720             * Gets the image local service.
721             *
722             * @return the image local service
723             */
724            public ImageLocalService getImageLocalService() {
725                    return imageLocalService;
726            }
727    
728            /**
729             * Sets the image local service.
730             *
731             * @param imageLocalService the image local service
732             */
733            public void setImageLocalService(ImageLocalService imageLocalService) {
734                    this.imageLocalService = imageLocalService;
735            }
736    
737            /**
738             * Gets the image remote service.
739             *
740             * @return the image remote service
741             */
742            public ImageService getImageService() {
743                    return imageService;
744            }
745    
746            /**
747             * Sets the image remote service.
748             *
749             * @param imageService the image remote service
750             */
751            public void setImageService(ImageService imageService) {
752                    this.imageService = imageService;
753            }
754    
755            /**
756             * Gets the image persistence.
757             *
758             * @return the image persistence
759             */
760            public ImagePersistence getImagePersistence() {
761                    return imagePersistence;
762            }
763    
764            /**
765             * Sets the image persistence.
766             *
767             * @param imagePersistence the image persistence
768             */
769            public void setImagePersistence(ImagePersistence imagePersistence) {
770                    this.imagePersistence = imagePersistence;
771            }
772    
773            /**
774             * Gets the resource local service.
775             *
776             * @return the resource local service
777             */
778            public ResourceLocalService getResourceLocalService() {
779                    return resourceLocalService;
780            }
781    
782            /**
783             * Sets the resource local service.
784             *
785             * @param resourceLocalService the resource local service
786             */
787            public void setResourceLocalService(
788                    ResourceLocalService resourceLocalService) {
789                    this.resourceLocalService = resourceLocalService;
790            }
791    
792            /**
793             * Gets the resource remote service.
794             *
795             * @return the resource remote service
796             */
797            public ResourceService getResourceService() {
798                    return resourceService;
799            }
800    
801            /**
802             * Sets the resource remote service.
803             *
804             * @param resourceService the resource remote service
805             */
806            public void setResourceService(ResourceService resourceService) {
807                    this.resourceService = resourceService;
808            }
809    
810            /**
811             * Gets the resource persistence.
812             *
813             * @return the resource persistence
814             */
815            public ResourcePersistence getResourcePersistence() {
816                    return resourcePersistence;
817            }
818    
819            /**
820             * Sets the resource persistence.
821             *
822             * @param resourcePersistence the resource persistence
823             */
824            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
825                    this.resourcePersistence = resourcePersistence;
826            }
827    
828            /**
829             * Gets the resource finder.
830             *
831             * @return the resource finder
832             */
833            public ResourceFinder getResourceFinder() {
834                    return resourceFinder;
835            }
836    
837            /**
838             * Sets the resource finder.
839             *
840             * @param resourceFinder the resource finder
841             */
842            public void setResourceFinder(ResourceFinder resourceFinder) {
843                    this.resourceFinder = resourceFinder;
844            }
845    
846            /**
847             * Gets the user local service.
848             *
849             * @return the user local service
850             */
851            public UserLocalService getUserLocalService() {
852                    return userLocalService;
853            }
854    
855            /**
856             * Sets the user local service.
857             *
858             * @param userLocalService the user local service
859             */
860            public void setUserLocalService(UserLocalService userLocalService) {
861                    this.userLocalService = userLocalService;
862            }
863    
864            /**
865             * Gets the user remote service.
866             *
867             * @return the user remote service
868             */
869            public UserService getUserService() {
870                    return userService;
871            }
872    
873            /**
874             * Sets the user remote service.
875             *
876             * @param userService the user remote service
877             */
878            public void setUserService(UserService userService) {
879                    this.userService = userService;
880            }
881    
882            /**
883             * Gets the user persistence.
884             *
885             * @return the user persistence
886             */
887            public UserPersistence getUserPersistence() {
888                    return userPersistence;
889            }
890    
891            /**
892             * Sets the user persistence.
893             *
894             * @param userPersistence the user persistence
895             */
896            public void setUserPersistence(UserPersistence userPersistence) {
897                    this.userPersistence = userPersistence;
898            }
899    
900            /**
901             * Gets the user finder.
902             *
903             * @return the user finder
904             */
905            public UserFinder getUserFinder() {
906                    return userFinder;
907            }
908    
909            /**
910             * Sets the user finder.
911             *
912             * @param userFinder the user finder
913             */
914            public void setUserFinder(UserFinder userFinder) {
915                    this.userFinder = userFinder;
916            }
917    
918            /**
919             * Performs an SQL query.
920             *
921             * @param sql the sql query to perform
922             */
923            protected void runSQL(String sql) throws SystemException {
924                    try {
925                            DataSource dataSource = shoppingItemPersistence.getDataSource();
926    
927                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
928                                            sql, new int[0]);
929    
930                            sqlUpdate.update();
931                    }
932                    catch (Exception e) {
933                            throw new SystemException(e);
934                    }
935            }
936    
937            @BeanReference(type = ShoppingCartLocalService.class)
938            protected ShoppingCartLocalService shoppingCartLocalService;
939            @BeanReference(type = ShoppingCartPersistence.class)
940            protected ShoppingCartPersistence shoppingCartPersistence;
941            @BeanReference(type = ShoppingCategoryLocalService.class)
942            protected ShoppingCategoryLocalService shoppingCategoryLocalService;
943            @BeanReference(type = ShoppingCategoryService.class)
944            protected ShoppingCategoryService shoppingCategoryService;
945            @BeanReference(type = ShoppingCategoryPersistence.class)
946            protected ShoppingCategoryPersistence shoppingCategoryPersistence;
947            @BeanReference(type = ShoppingCouponLocalService.class)
948            protected ShoppingCouponLocalService shoppingCouponLocalService;
949            @BeanReference(type = ShoppingCouponService.class)
950            protected ShoppingCouponService shoppingCouponService;
951            @BeanReference(type = ShoppingCouponPersistence.class)
952            protected ShoppingCouponPersistence shoppingCouponPersistence;
953            @BeanReference(type = ShoppingCouponFinder.class)
954            protected ShoppingCouponFinder shoppingCouponFinder;
955            @BeanReference(type = ShoppingItemLocalService.class)
956            protected ShoppingItemLocalService shoppingItemLocalService;
957            @BeanReference(type = ShoppingItemService.class)
958            protected ShoppingItemService shoppingItemService;
959            @BeanReference(type = ShoppingItemPersistence.class)
960            protected ShoppingItemPersistence shoppingItemPersistence;
961            @BeanReference(type = ShoppingItemFinder.class)
962            protected ShoppingItemFinder shoppingItemFinder;
963            @BeanReference(type = ShoppingItemFieldLocalService.class)
964            protected ShoppingItemFieldLocalService shoppingItemFieldLocalService;
965            @BeanReference(type = ShoppingItemFieldPersistence.class)
966            protected ShoppingItemFieldPersistence shoppingItemFieldPersistence;
967            @BeanReference(type = ShoppingItemPriceLocalService.class)
968            protected ShoppingItemPriceLocalService shoppingItemPriceLocalService;
969            @BeanReference(type = ShoppingItemPricePersistence.class)
970            protected ShoppingItemPricePersistence shoppingItemPricePersistence;
971            @BeanReference(type = ShoppingOrderLocalService.class)
972            protected ShoppingOrderLocalService shoppingOrderLocalService;
973            @BeanReference(type = ShoppingOrderService.class)
974            protected ShoppingOrderService shoppingOrderService;
975            @BeanReference(type = ShoppingOrderPersistence.class)
976            protected ShoppingOrderPersistence shoppingOrderPersistence;
977            @BeanReference(type = ShoppingOrderFinder.class)
978            protected ShoppingOrderFinder shoppingOrderFinder;
979            @BeanReference(type = ShoppingOrderItemLocalService.class)
980            protected ShoppingOrderItemLocalService shoppingOrderItemLocalService;
981            @BeanReference(type = ShoppingOrderItemPersistence.class)
982            protected ShoppingOrderItemPersistence shoppingOrderItemPersistence;
983            @BeanReference(type = CounterLocalService.class)
984            protected CounterLocalService counterLocalService;
985            @BeanReference(type = ImageLocalService.class)
986            protected ImageLocalService imageLocalService;
987            @BeanReference(type = ImageService.class)
988            protected ImageService imageService;
989            @BeanReference(type = ImagePersistence.class)
990            protected ImagePersistence imagePersistence;
991            @BeanReference(type = ResourceLocalService.class)
992            protected ResourceLocalService resourceLocalService;
993            @BeanReference(type = ResourceService.class)
994            protected ResourceService resourceService;
995            @BeanReference(type = ResourcePersistence.class)
996            protected ResourcePersistence resourcePersistence;
997            @BeanReference(type = ResourceFinder.class)
998            protected ResourceFinder resourceFinder;
999            @BeanReference(type = UserLocalService.class)
1000            protected UserLocalService userLocalService;
1001            @BeanReference(type = UserService.class)
1002            protected UserService userService;
1003            @BeanReference(type = UserPersistence.class)
1004            protected UserPersistence userPersistence;
1005            @BeanReference(type = UserFinder.class)
1006            protected UserFinder userFinder;
1007    }