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