001    /**
002     * Copyright (c) 2000-2013 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.mail.service.MailService;
020    
021    import com.liferay.portal.kernel.bean.BeanReference;
022    import com.liferay.portal.kernel.bean.IdentifiableBean;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
027    import com.liferay.portal.kernel.exception.PortalException;
028    import com.liferay.portal.kernel.exception.SystemException;
029    import com.liferay.portal.kernel.search.Indexable;
030    import com.liferay.portal.kernel.search.IndexableType;
031    import com.liferay.portal.kernel.util.OrderByComparator;
032    import com.liferay.portal.model.PersistedModel;
033    import com.liferay.portal.service.BaseLocalServiceImpl;
034    import com.liferay.portal.service.CompanyLocalService;
035    import com.liferay.portal.service.CompanyService;
036    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
037    import com.liferay.portal.service.ResourceLocalService;
038    import com.liferay.portal.service.ResourceService;
039    import com.liferay.portal.service.SubscriptionLocalService;
040    import com.liferay.portal.service.UserLocalService;
041    import com.liferay.portal.service.UserService;
042    import com.liferay.portal.service.persistence.CompanyPersistence;
043    import com.liferay.portal.service.persistence.ResourceFinder;
044    import com.liferay.portal.service.persistence.ResourcePersistence;
045    import com.liferay.portal.service.persistence.SubscriptionPersistence;
046    import com.liferay.portal.service.persistence.UserFinder;
047    import com.liferay.portal.service.persistence.UserPersistence;
048    
049    import com.liferay.portlet.messageboards.service.MBMessageLocalService;
050    import com.liferay.portlet.messageboards.service.MBMessageService;
051    import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
052    import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
053    import com.liferay.portlet.shopping.model.ShoppingOrder;
054    import com.liferay.portlet.shopping.service.ShoppingCartLocalService;
055    import com.liferay.portlet.shopping.service.ShoppingCategoryLocalService;
056    import com.liferay.portlet.shopping.service.ShoppingCategoryService;
057    import com.liferay.portlet.shopping.service.ShoppingCouponLocalService;
058    import com.liferay.portlet.shopping.service.ShoppingCouponService;
059    import com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService;
060    import com.liferay.portlet.shopping.service.ShoppingItemLocalService;
061    import com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService;
062    import com.liferay.portlet.shopping.service.ShoppingItemService;
063    import com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService;
064    import com.liferay.portlet.shopping.service.ShoppingOrderLocalService;
065    import com.liferay.portlet.shopping.service.ShoppingOrderService;
066    import com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence;
067    import com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence;
068    import com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder;
069    import com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence;
070    import com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence;
071    import com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder;
072    import com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence;
073    import com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence;
074    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder;
075    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence;
076    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence;
077    
078    import java.io.Serializable;
079    
080    import java.util.List;
081    
082    import javax.sql.DataSource;
083    
084    /**
085     * The base implementation of the shopping order local service.
086     *
087     * <p>
088     * 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.ShoppingOrderLocalServiceImpl}.
089     * </p>
090     *
091     * @author Brian Wing Shun Chan
092     * @see com.liferay.portlet.shopping.service.impl.ShoppingOrderLocalServiceImpl
093     * @see com.liferay.portlet.shopping.service.ShoppingOrderLocalServiceUtil
094     * @generated
095     */
096    public abstract class ShoppingOrderLocalServiceBaseImpl
097            extends BaseLocalServiceImpl implements ShoppingOrderLocalService,
098                    IdentifiableBean {
099            /*
100             * NOTE FOR DEVELOPERS:
101             *
102             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.shopping.service.ShoppingOrderLocalServiceUtil} to access the shopping order local service.
103             */
104    
105            /**
106             * Adds the shopping order to the database. Also notifies the appropriate model listeners.
107             *
108             * @param shoppingOrder the shopping order
109             * @return the shopping order that was added
110             * @throws SystemException if a system exception occurred
111             */
112            @Indexable(type = IndexableType.REINDEX)
113            public ShoppingOrder addShoppingOrder(ShoppingOrder shoppingOrder)
114                    throws SystemException {
115                    shoppingOrder.setNew(true);
116    
117                    return shoppingOrderPersistence.update(shoppingOrder, false);
118            }
119    
120            /**
121             * Creates a new shopping order with the primary key. Does not add the shopping order to the database.
122             *
123             * @param orderId the primary key for the new shopping order
124             * @return the new shopping order
125             */
126            public ShoppingOrder createShoppingOrder(long orderId) {
127                    return shoppingOrderPersistence.create(orderId);
128            }
129    
130            /**
131             * Deletes the shopping order with the primary key from the database. Also notifies the appropriate model listeners.
132             *
133             * @param orderId the primary key of the shopping order
134             * @return the shopping order that was removed
135             * @throws PortalException if a shopping order with the primary key could not be found
136             * @throws SystemException if a system exception occurred
137             */
138            @Indexable(type = IndexableType.DELETE)
139            public ShoppingOrder deleteShoppingOrder(long orderId)
140                    throws PortalException, SystemException {
141                    return shoppingOrderPersistence.remove(orderId);
142            }
143    
144            /**
145             * Deletes the shopping order from the database. Also notifies the appropriate model listeners.
146             *
147             * @param shoppingOrder the shopping order
148             * @return the shopping order that was removed
149             * @throws SystemException if a system exception occurred
150             */
151            @Indexable(type = IndexableType.DELETE)
152            public ShoppingOrder deleteShoppingOrder(ShoppingOrder shoppingOrder)
153                    throws SystemException {
154                    return shoppingOrderPersistence.remove(shoppingOrder);
155            }
156    
157            public DynamicQuery dynamicQuery() {
158                    Class<?> clazz = getClass();
159    
160                    return DynamicQueryFactoryUtil.forClass(ShoppingOrder.class,
161                            clazz.getClassLoader());
162            }
163    
164            /**
165             * Performs a dynamic query on the database and returns the matching rows.
166             *
167             * @param dynamicQuery the dynamic query
168             * @return the matching rows
169             * @throws SystemException if a system exception occurred
170             */
171            @SuppressWarnings("rawtypes")
172            public List dynamicQuery(DynamicQuery dynamicQuery)
173                    throws SystemException {
174                    return shoppingOrderPersistence.findWithDynamicQuery(dynamicQuery);
175            }
176    
177            /**
178             * Performs a dynamic query on the database and returns a range of the matching rows.
179             *
180             * <p>
181             * 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.
182             * </p>
183             *
184             * @param dynamicQuery the dynamic query
185             * @param start the lower bound of the range of model instances
186             * @param end the upper bound of the range of model instances (not inclusive)
187             * @return the range of matching rows
188             * @throws SystemException if a system exception occurred
189             */
190            @SuppressWarnings("rawtypes")
191            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
192                    throws SystemException {
193                    return shoppingOrderPersistence.findWithDynamicQuery(dynamicQuery,
194                            start, end);
195            }
196    
197            /**
198             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
199             *
200             * <p>
201             * 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.
202             * </p>
203             *
204             * @param dynamicQuery the dynamic query
205             * @param start the lower bound of the range of model instances
206             * @param end the upper bound of the range of model instances (not inclusive)
207             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
208             * @return the ordered range of matching rows
209             * @throws SystemException if a system exception occurred
210             */
211            @SuppressWarnings("rawtypes")
212            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
213                    OrderByComparator orderByComparator) throws SystemException {
214                    return shoppingOrderPersistence.findWithDynamicQuery(dynamicQuery,
215                            start, end, orderByComparator);
216            }
217    
218            /**
219             * Returns the number of rows that match the dynamic query.
220             *
221             * @param dynamicQuery the dynamic query
222             * @return the number of rows that match the dynamic query
223             * @throws SystemException if a system exception occurred
224             */
225            public long dynamicQueryCount(DynamicQuery dynamicQuery)
226                    throws SystemException {
227                    return shoppingOrderPersistence.countWithDynamicQuery(dynamicQuery);
228            }
229    
230            public ShoppingOrder fetchShoppingOrder(long orderId)
231                    throws SystemException {
232                    return shoppingOrderPersistence.fetchByPrimaryKey(orderId);
233            }
234    
235            /**
236             * Returns the shopping order with the primary key.
237             *
238             * @param orderId the primary key of the shopping order
239             * @return the shopping order
240             * @throws PortalException if a shopping order with the primary key could not be found
241             * @throws SystemException if a system exception occurred
242             */
243            public ShoppingOrder getShoppingOrder(long orderId)
244                    throws PortalException, SystemException {
245                    return shoppingOrderPersistence.findByPrimaryKey(orderId);
246            }
247    
248            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
249                    throws PortalException, SystemException {
250                    return shoppingOrderPersistence.findByPrimaryKey(primaryKeyObj);
251            }
252    
253            /**
254             * Returns a range of all the shopping orders.
255             *
256             * <p>
257             * 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.
258             * </p>
259             *
260             * @param start the lower bound of the range of shopping orders
261             * @param end the upper bound of the range of shopping orders (not inclusive)
262             * @return the range of shopping orders
263             * @throws SystemException if a system exception occurred
264             */
265            public List<ShoppingOrder> getShoppingOrders(int start, int end)
266                    throws SystemException {
267                    return shoppingOrderPersistence.findAll(start, end);
268            }
269    
270            /**
271             * Returns the number of shopping orders.
272             *
273             * @return the number of shopping orders
274             * @throws SystemException if a system exception occurred
275             */
276            public int getShoppingOrdersCount() throws SystemException {
277                    return shoppingOrderPersistence.countAll();
278            }
279    
280            /**
281             * Updates the shopping order in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
282             *
283             * @param shoppingOrder the shopping order
284             * @return the shopping order that was updated
285             * @throws SystemException if a system exception occurred
286             */
287            @Indexable(type = IndexableType.REINDEX)
288            public ShoppingOrder updateShoppingOrder(ShoppingOrder shoppingOrder)
289                    throws SystemException {
290                    return updateShoppingOrder(shoppingOrder, true);
291            }
292    
293            /**
294             * Updates the shopping order in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
295             *
296             * @param shoppingOrder the shopping order
297             * @param merge whether to merge the shopping order 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.
298             * @return the shopping order that was updated
299             * @throws SystemException if a system exception occurred
300             */
301            @Indexable(type = IndexableType.REINDEX)
302            public ShoppingOrder updateShoppingOrder(ShoppingOrder shoppingOrder,
303                    boolean merge) throws SystemException {
304                    shoppingOrder.setNew(false);
305    
306                    return shoppingOrderPersistence.update(shoppingOrder, merge);
307            }
308    
309            /**
310             * Returns the shopping cart local service.
311             *
312             * @return the shopping cart local service
313             */
314            public ShoppingCartLocalService getShoppingCartLocalService() {
315                    return shoppingCartLocalService;
316            }
317    
318            /**
319             * Sets the shopping cart local service.
320             *
321             * @param shoppingCartLocalService the shopping cart local service
322             */
323            public void setShoppingCartLocalService(
324                    ShoppingCartLocalService shoppingCartLocalService) {
325                    this.shoppingCartLocalService = shoppingCartLocalService;
326            }
327    
328            /**
329             * Returns the shopping cart persistence.
330             *
331             * @return the shopping cart persistence
332             */
333            public ShoppingCartPersistence getShoppingCartPersistence() {
334                    return shoppingCartPersistence;
335            }
336    
337            /**
338             * Sets the shopping cart persistence.
339             *
340             * @param shoppingCartPersistence the shopping cart persistence
341             */
342            public void setShoppingCartPersistence(
343                    ShoppingCartPersistence shoppingCartPersistence) {
344                    this.shoppingCartPersistence = shoppingCartPersistence;
345            }
346    
347            /**
348             * Returns the shopping category local service.
349             *
350             * @return the shopping category local service
351             */
352            public ShoppingCategoryLocalService getShoppingCategoryLocalService() {
353                    return shoppingCategoryLocalService;
354            }
355    
356            /**
357             * Sets the shopping category local service.
358             *
359             * @param shoppingCategoryLocalService the shopping category local service
360             */
361            public void setShoppingCategoryLocalService(
362                    ShoppingCategoryLocalService shoppingCategoryLocalService) {
363                    this.shoppingCategoryLocalService = shoppingCategoryLocalService;
364            }
365    
366            /**
367             * Returns the shopping category remote service.
368             *
369             * @return the shopping category remote service
370             */
371            public ShoppingCategoryService getShoppingCategoryService() {
372                    return shoppingCategoryService;
373            }
374    
375            /**
376             * Sets the shopping category remote service.
377             *
378             * @param shoppingCategoryService the shopping category remote service
379             */
380            public void setShoppingCategoryService(
381                    ShoppingCategoryService shoppingCategoryService) {
382                    this.shoppingCategoryService = shoppingCategoryService;
383            }
384    
385            /**
386             * Returns the shopping category persistence.
387             *
388             * @return the shopping category persistence
389             */
390            public ShoppingCategoryPersistence getShoppingCategoryPersistence() {
391                    return shoppingCategoryPersistence;
392            }
393    
394            /**
395             * Sets the shopping category persistence.
396             *
397             * @param shoppingCategoryPersistence the shopping category persistence
398             */
399            public void setShoppingCategoryPersistence(
400                    ShoppingCategoryPersistence shoppingCategoryPersistence) {
401                    this.shoppingCategoryPersistence = shoppingCategoryPersistence;
402            }
403    
404            /**
405             * Returns the shopping coupon local service.
406             *
407             * @return the shopping coupon local service
408             */
409            public ShoppingCouponLocalService getShoppingCouponLocalService() {
410                    return shoppingCouponLocalService;
411            }
412    
413            /**
414             * Sets the shopping coupon local service.
415             *
416             * @param shoppingCouponLocalService the shopping coupon local service
417             */
418            public void setShoppingCouponLocalService(
419                    ShoppingCouponLocalService shoppingCouponLocalService) {
420                    this.shoppingCouponLocalService = shoppingCouponLocalService;
421            }
422    
423            /**
424             * Returns the shopping coupon remote service.
425             *
426             * @return the shopping coupon remote service
427             */
428            public ShoppingCouponService getShoppingCouponService() {
429                    return shoppingCouponService;
430            }
431    
432            /**
433             * Sets the shopping coupon remote service.
434             *
435             * @param shoppingCouponService the shopping coupon remote service
436             */
437            public void setShoppingCouponService(
438                    ShoppingCouponService shoppingCouponService) {
439                    this.shoppingCouponService = shoppingCouponService;
440            }
441    
442            /**
443             * Returns the shopping coupon persistence.
444             *
445             * @return the shopping coupon persistence
446             */
447            public ShoppingCouponPersistence getShoppingCouponPersistence() {
448                    return shoppingCouponPersistence;
449            }
450    
451            /**
452             * Sets the shopping coupon persistence.
453             *
454             * @param shoppingCouponPersistence the shopping coupon persistence
455             */
456            public void setShoppingCouponPersistence(
457                    ShoppingCouponPersistence shoppingCouponPersistence) {
458                    this.shoppingCouponPersistence = shoppingCouponPersistence;
459            }
460    
461            /**
462             * Returns the shopping coupon finder.
463             *
464             * @return the shopping coupon finder
465             */
466            public ShoppingCouponFinder getShoppingCouponFinder() {
467                    return shoppingCouponFinder;
468            }
469    
470            /**
471             * Sets the shopping coupon finder.
472             *
473             * @param shoppingCouponFinder the shopping coupon finder
474             */
475            public void setShoppingCouponFinder(
476                    ShoppingCouponFinder shoppingCouponFinder) {
477                    this.shoppingCouponFinder = shoppingCouponFinder;
478            }
479    
480            /**
481             * Returns the shopping item local service.
482             *
483             * @return the shopping item local service
484             */
485            public ShoppingItemLocalService getShoppingItemLocalService() {
486                    return shoppingItemLocalService;
487            }
488    
489            /**
490             * Sets the shopping item local service.
491             *
492             * @param shoppingItemLocalService the shopping item local service
493             */
494            public void setShoppingItemLocalService(
495                    ShoppingItemLocalService shoppingItemLocalService) {
496                    this.shoppingItemLocalService = shoppingItemLocalService;
497            }
498    
499            /**
500             * Returns the shopping item remote service.
501             *
502             * @return the shopping item remote service
503             */
504            public ShoppingItemService getShoppingItemService() {
505                    return shoppingItemService;
506            }
507    
508            /**
509             * Sets the shopping item remote service.
510             *
511             * @param shoppingItemService the shopping item remote service
512             */
513            public void setShoppingItemService(ShoppingItemService shoppingItemService) {
514                    this.shoppingItemService = shoppingItemService;
515            }
516    
517            /**
518             * Returns the shopping item persistence.
519             *
520             * @return the shopping item persistence
521             */
522            public ShoppingItemPersistence getShoppingItemPersistence() {
523                    return shoppingItemPersistence;
524            }
525    
526            /**
527             * Sets the shopping item persistence.
528             *
529             * @param shoppingItemPersistence the shopping item persistence
530             */
531            public void setShoppingItemPersistence(
532                    ShoppingItemPersistence shoppingItemPersistence) {
533                    this.shoppingItemPersistence = shoppingItemPersistence;
534            }
535    
536            /**
537             * Returns the shopping item finder.
538             *
539             * @return the shopping item finder
540             */
541            public ShoppingItemFinder getShoppingItemFinder() {
542                    return shoppingItemFinder;
543            }
544    
545            /**
546             * Sets the shopping item finder.
547             *
548             * @param shoppingItemFinder the shopping item finder
549             */
550            public void setShoppingItemFinder(ShoppingItemFinder shoppingItemFinder) {
551                    this.shoppingItemFinder = shoppingItemFinder;
552            }
553    
554            /**
555             * Returns the shopping item field local service.
556             *
557             * @return the shopping item field local service
558             */
559            public ShoppingItemFieldLocalService getShoppingItemFieldLocalService() {
560                    return shoppingItemFieldLocalService;
561            }
562    
563            /**
564             * Sets the shopping item field local service.
565             *
566             * @param shoppingItemFieldLocalService the shopping item field local service
567             */
568            public void setShoppingItemFieldLocalService(
569                    ShoppingItemFieldLocalService shoppingItemFieldLocalService) {
570                    this.shoppingItemFieldLocalService = shoppingItemFieldLocalService;
571            }
572    
573            /**
574             * Returns the shopping item field persistence.
575             *
576             * @return the shopping item field persistence
577             */
578            public ShoppingItemFieldPersistence getShoppingItemFieldPersistence() {
579                    return shoppingItemFieldPersistence;
580            }
581    
582            /**
583             * Sets the shopping item field persistence.
584             *
585             * @param shoppingItemFieldPersistence the shopping item field persistence
586             */
587            public void setShoppingItemFieldPersistence(
588                    ShoppingItemFieldPersistence shoppingItemFieldPersistence) {
589                    this.shoppingItemFieldPersistence = shoppingItemFieldPersistence;
590            }
591    
592            /**
593             * Returns the shopping item price local service.
594             *
595             * @return the shopping item price local service
596             */
597            public ShoppingItemPriceLocalService getShoppingItemPriceLocalService() {
598                    return shoppingItemPriceLocalService;
599            }
600    
601            /**
602             * Sets the shopping item price local service.
603             *
604             * @param shoppingItemPriceLocalService the shopping item price local service
605             */
606            public void setShoppingItemPriceLocalService(
607                    ShoppingItemPriceLocalService shoppingItemPriceLocalService) {
608                    this.shoppingItemPriceLocalService = shoppingItemPriceLocalService;
609            }
610    
611            /**
612             * Returns the shopping item price persistence.
613             *
614             * @return the shopping item price persistence
615             */
616            public ShoppingItemPricePersistence getShoppingItemPricePersistence() {
617                    return shoppingItemPricePersistence;
618            }
619    
620            /**
621             * Sets the shopping item price persistence.
622             *
623             * @param shoppingItemPricePersistence the shopping item price persistence
624             */
625            public void setShoppingItemPricePersistence(
626                    ShoppingItemPricePersistence shoppingItemPricePersistence) {
627                    this.shoppingItemPricePersistence = shoppingItemPricePersistence;
628            }
629    
630            /**
631             * Returns the shopping order local service.
632             *
633             * @return the shopping order local service
634             */
635            public ShoppingOrderLocalService getShoppingOrderLocalService() {
636                    return shoppingOrderLocalService;
637            }
638    
639            /**
640             * Sets the shopping order local service.
641             *
642             * @param shoppingOrderLocalService the shopping order local service
643             */
644            public void setShoppingOrderLocalService(
645                    ShoppingOrderLocalService shoppingOrderLocalService) {
646                    this.shoppingOrderLocalService = shoppingOrderLocalService;
647            }
648    
649            /**
650             * Returns the shopping order remote service.
651             *
652             * @return the shopping order remote service
653             */
654            public ShoppingOrderService getShoppingOrderService() {
655                    return shoppingOrderService;
656            }
657    
658            /**
659             * Sets the shopping order remote service.
660             *
661             * @param shoppingOrderService the shopping order remote service
662             */
663            public void setShoppingOrderService(
664                    ShoppingOrderService shoppingOrderService) {
665                    this.shoppingOrderService = shoppingOrderService;
666            }
667    
668            /**
669             * Returns the shopping order persistence.
670             *
671             * @return the shopping order persistence
672             */
673            public ShoppingOrderPersistence getShoppingOrderPersistence() {
674                    return shoppingOrderPersistence;
675            }
676    
677            /**
678             * Sets the shopping order persistence.
679             *
680             * @param shoppingOrderPersistence the shopping order persistence
681             */
682            public void setShoppingOrderPersistence(
683                    ShoppingOrderPersistence shoppingOrderPersistence) {
684                    this.shoppingOrderPersistence = shoppingOrderPersistence;
685            }
686    
687            /**
688             * Returns the shopping order finder.
689             *
690             * @return the shopping order finder
691             */
692            public ShoppingOrderFinder getShoppingOrderFinder() {
693                    return shoppingOrderFinder;
694            }
695    
696            /**
697             * Sets the shopping order finder.
698             *
699             * @param shoppingOrderFinder the shopping order finder
700             */
701            public void setShoppingOrderFinder(ShoppingOrderFinder shoppingOrderFinder) {
702                    this.shoppingOrderFinder = shoppingOrderFinder;
703            }
704    
705            /**
706             * Returns the shopping order item local service.
707             *
708             * @return the shopping order item local service
709             */
710            public ShoppingOrderItemLocalService getShoppingOrderItemLocalService() {
711                    return shoppingOrderItemLocalService;
712            }
713    
714            /**
715             * Sets the shopping order item local service.
716             *
717             * @param shoppingOrderItemLocalService the shopping order item local service
718             */
719            public void setShoppingOrderItemLocalService(
720                    ShoppingOrderItemLocalService shoppingOrderItemLocalService) {
721                    this.shoppingOrderItemLocalService = shoppingOrderItemLocalService;
722            }
723    
724            /**
725             * Returns the shopping order item persistence.
726             *
727             * @return the shopping order item persistence
728             */
729            public ShoppingOrderItemPersistence getShoppingOrderItemPersistence() {
730                    return shoppingOrderItemPersistence;
731            }
732    
733            /**
734             * Sets the shopping order item persistence.
735             *
736             * @param shoppingOrderItemPersistence the shopping order item persistence
737             */
738            public void setShoppingOrderItemPersistence(
739                    ShoppingOrderItemPersistence shoppingOrderItemPersistence) {
740                    this.shoppingOrderItemPersistence = shoppingOrderItemPersistence;
741            }
742    
743            /**
744             * Returns the counter local service.
745             *
746             * @return the counter local service
747             */
748            public CounterLocalService getCounterLocalService() {
749                    return counterLocalService;
750            }
751    
752            /**
753             * Sets the counter local service.
754             *
755             * @param counterLocalService the counter local service
756             */
757            public void setCounterLocalService(CounterLocalService counterLocalService) {
758                    this.counterLocalService = counterLocalService;
759            }
760    
761            /**
762             * Returns the mail remote service.
763             *
764             * @return the mail remote service
765             */
766            public MailService getMailService() {
767                    return mailService;
768            }
769    
770            /**
771             * Sets the mail remote service.
772             *
773             * @param mailService the mail remote service
774             */
775            public void setMailService(MailService mailService) {
776                    this.mailService = mailService;
777            }
778    
779            /**
780             * Returns the company local service.
781             *
782             * @return the company local service
783             */
784            public CompanyLocalService getCompanyLocalService() {
785                    return companyLocalService;
786            }
787    
788            /**
789             * Sets the company local service.
790             *
791             * @param companyLocalService the company local service
792             */
793            public void setCompanyLocalService(CompanyLocalService companyLocalService) {
794                    this.companyLocalService = companyLocalService;
795            }
796    
797            /**
798             * Returns the company remote service.
799             *
800             * @return the company remote service
801             */
802            public CompanyService getCompanyService() {
803                    return companyService;
804            }
805    
806            /**
807             * Sets the company remote service.
808             *
809             * @param companyService the company remote service
810             */
811            public void setCompanyService(CompanyService companyService) {
812                    this.companyService = companyService;
813            }
814    
815            /**
816             * Returns the company persistence.
817             *
818             * @return the company persistence
819             */
820            public CompanyPersistence getCompanyPersistence() {
821                    return companyPersistence;
822            }
823    
824            /**
825             * Sets the company persistence.
826             *
827             * @param companyPersistence the company persistence
828             */
829            public void setCompanyPersistence(CompanyPersistence companyPersistence) {
830                    this.companyPersistence = companyPersistence;
831            }
832    
833            /**
834             * Returns the resource local service.
835             *
836             * @return the resource local service
837             */
838            public ResourceLocalService getResourceLocalService() {
839                    return resourceLocalService;
840            }
841    
842            /**
843             * Sets the resource local service.
844             *
845             * @param resourceLocalService the resource local service
846             */
847            public void setResourceLocalService(
848                    ResourceLocalService resourceLocalService) {
849                    this.resourceLocalService = resourceLocalService;
850            }
851    
852            /**
853             * Returns the resource remote service.
854             *
855             * @return the resource remote service
856             */
857            public ResourceService getResourceService() {
858                    return resourceService;
859            }
860    
861            /**
862             * Sets the resource remote service.
863             *
864             * @param resourceService the resource remote service
865             */
866            public void setResourceService(ResourceService resourceService) {
867                    this.resourceService = resourceService;
868            }
869    
870            /**
871             * Returns the resource persistence.
872             *
873             * @return the resource persistence
874             */
875            public ResourcePersistence getResourcePersistence() {
876                    return resourcePersistence;
877            }
878    
879            /**
880             * Sets the resource persistence.
881             *
882             * @param resourcePersistence the resource persistence
883             */
884            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
885                    this.resourcePersistence = resourcePersistence;
886            }
887    
888            /**
889             * Returns the resource finder.
890             *
891             * @return the resource finder
892             */
893            public ResourceFinder getResourceFinder() {
894                    return resourceFinder;
895            }
896    
897            /**
898             * Sets the resource finder.
899             *
900             * @param resourceFinder the resource finder
901             */
902            public void setResourceFinder(ResourceFinder resourceFinder) {
903                    this.resourceFinder = resourceFinder;
904            }
905    
906            /**
907             * Returns the subscription local service.
908             *
909             * @return the subscription local service
910             */
911            public SubscriptionLocalService getSubscriptionLocalService() {
912                    return subscriptionLocalService;
913            }
914    
915            /**
916             * Sets the subscription local service.
917             *
918             * @param subscriptionLocalService the subscription local service
919             */
920            public void setSubscriptionLocalService(
921                    SubscriptionLocalService subscriptionLocalService) {
922                    this.subscriptionLocalService = subscriptionLocalService;
923            }
924    
925            /**
926             * Returns the subscription persistence.
927             *
928             * @return the subscription persistence
929             */
930            public SubscriptionPersistence getSubscriptionPersistence() {
931                    return subscriptionPersistence;
932            }
933    
934            /**
935             * Sets the subscription persistence.
936             *
937             * @param subscriptionPersistence the subscription persistence
938             */
939            public void setSubscriptionPersistence(
940                    SubscriptionPersistence subscriptionPersistence) {
941                    this.subscriptionPersistence = subscriptionPersistence;
942            }
943    
944            /**
945             * Returns the user local service.
946             *
947             * @return the user local service
948             */
949            public UserLocalService getUserLocalService() {
950                    return userLocalService;
951            }
952    
953            /**
954             * Sets the user local service.
955             *
956             * @param userLocalService the user local service
957             */
958            public void setUserLocalService(UserLocalService userLocalService) {
959                    this.userLocalService = userLocalService;
960            }
961    
962            /**
963             * Returns the user remote service.
964             *
965             * @return the user remote service
966             */
967            public UserService getUserService() {
968                    return userService;
969            }
970    
971            /**
972             * Sets the user remote service.
973             *
974             * @param userService the user remote service
975             */
976            public void setUserService(UserService userService) {
977                    this.userService = userService;
978            }
979    
980            /**
981             * Returns the user persistence.
982             *
983             * @return the user persistence
984             */
985            public UserPersistence getUserPersistence() {
986                    return userPersistence;
987            }
988    
989            /**
990             * Sets the user persistence.
991             *
992             * @param userPersistence the user persistence
993             */
994            public void setUserPersistence(UserPersistence userPersistence) {
995                    this.userPersistence = userPersistence;
996            }
997    
998            /**
999             * Returns the user finder.
1000             *
1001             * @return the user finder
1002             */
1003            public UserFinder getUserFinder() {
1004                    return userFinder;
1005            }
1006    
1007            /**
1008             * Sets the user finder.
1009             *
1010             * @param userFinder the user finder
1011             */
1012            public void setUserFinder(UserFinder userFinder) {
1013                    this.userFinder = userFinder;
1014            }
1015    
1016            /**
1017             * Returns the message-boards message local service.
1018             *
1019             * @return the message-boards message local service
1020             */
1021            public MBMessageLocalService getMBMessageLocalService() {
1022                    return mbMessageLocalService;
1023            }
1024    
1025            /**
1026             * Sets the message-boards message local service.
1027             *
1028             * @param mbMessageLocalService the message-boards message local service
1029             */
1030            public void setMBMessageLocalService(
1031                    MBMessageLocalService mbMessageLocalService) {
1032                    this.mbMessageLocalService = mbMessageLocalService;
1033            }
1034    
1035            /**
1036             * Returns the message-boards message remote service.
1037             *
1038             * @return the message-boards message remote service
1039             */
1040            public MBMessageService getMBMessageService() {
1041                    return mbMessageService;
1042            }
1043    
1044            /**
1045             * Sets the message-boards message remote service.
1046             *
1047             * @param mbMessageService the message-boards message remote service
1048             */
1049            public void setMBMessageService(MBMessageService mbMessageService) {
1050                    this.mbMessageService = mbMessageService;
1051            }
1052    
1053            /**
1054             * Returns the message-boards message persistence.
1055             *
1056             * @return the message-boards message persistence
1057             */
1058            public MBMessagePersistence getMBMessagePersistence() {
1059                    return mbMessagePersistence;
1060            }
1061    
1062            /**
1063             * Sets the message-boards message persistence.
1064             *
1065             * @param mbMessagePersistence the message-boards message persistence
1066             */
1067            public void setMBMessagePersistence(
1068                    MBMessagePersistence mbMessagePersistence) {
1069                    this.mbMessagePersistence = mbMessagePersistence;
1070            }
1071    
1072            /**
1073             * Returns the message-boards message finder.
1074             *
1075             * @return the message-boards message finder
1076             */
1077            public MBMessageFinder getMBMessageFinder() {
1078                    return mbMessageFinder;
1079            }
1080    
1081            /**
1082             * Sets the message-boards message finder.
1083             *
1084             * @param mbMessageFinder the message-boards message finder
1085             */
1086            public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
1087                    this.mbMessageFinder = mbMessageFinder;
1088            }
1089    
1090            public void afterPropertiesSet() {
1091                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.shopping.model.ShoppingOrder",
1092                            shoppingOrderLocalService);
1093            }
1094    
1095            public void destroy() {
1096                    persistedModelLocalServiceRegistry.unregister(
1097                            "com.liferay.portlet.shopping.model.ShoppingOrder");
1098            }
1099    
1100            /**
1101             * Returns the Spring bean ID for this bean.
1102             *
1103             * @return the Spring bean ID for this bean
1104             */
1105            public String getBeanIdentifier() {
1106                    return _beanIdentifier;
1107            }
1108    
1109            /**
1110             * Sets the Spring bean ID for this bean.
1111             *
1112             * @param beanIdentifier the Spring bean ID for this bean
1113             */
1114            public void setBeanIdentifier(String beanIdentifier) {
1115                    _beanIdentifier = beanIdentifier;
1116            }
1117    
1118            protected Class<?> getModelClass() {
1119                    return ShoppingOrder.class;
1120            }
1121    
1122            protected String getModelClassName() {
1123                    return ShoppingOrder.class.getName();
1124            }
1125    
1126            /**
1127             * Performs an SQL query.
1128             *
1129             * @param sql the sql query
1130             */
1131            protected void runSQL(String sql) throws SystemException {
1132                    try {
1133                            DataSource dataSource = shoppingOrderPersistence.getDataSource();
1134    
1135                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1136                                            sql, new int[0]);
1137    
1138                            sqlUpdate.update();
1139                    }
1140                    catch (Exception e) {
1141                            throw new SystemException(e);
1142                    }
1143            }
1144    
1145            @BeanReference(type = ShoppingCartLocalService.class)
1146            protected ShoppingCartLocalService shoppingCartLocalService;
1147            @BeanReference(type = ShoppingCartPersistence.class)
1148            protected ShoppingCartPersistence shoppingCartPersistence;
1149            @BeanReference(type = ShoppingCategoryLocalService.class)
1150            protected ShoppingCategoryLocalService shoppingCategoryLocalService;
1151            @BeanReference(type = ShoppingCategoryService.class)
1152            protected ShoppingCategoryService shoppingCategoryService;
1153            @BeanReference(type = ShoppingCategoryPersistence.class)
1154            protected ShoppingCategoryPersistence shoppingCategoryPersistence;
1155            @BeanReference(type = ShoppingCouponLocalService.class)
1156            protected ShoppingCouponLocalService shoppingCouponLocalService;
1157            @BeanReference(type = ShoppingCouponService.class)
1158            protected ShoppingCouponService shoppingCouponService;
1159            @BeanReference(type = ShoppingCouponPersistence.class)
1160            protected ShoppingCouponPersistence shoppingCouponPersistence;
1161            @BeanReference(type = ShoppingCouponFinder.class)
1162            protected ShoppingCouponFinder shoppingCouponFinder;
1163            @BeanReference(type = ShoppingItemLocalService.class)
1164            protected ShoppingItemLocalService shoppingItemLocalService;
1165            @BeanReference(type = ShoppingItemService.class)
1166            protected ShoppingItemService shoppingItemService;
1167            @BeanReference(type = ShoppingItemPersistence.class)
1168            protected ShoppingItemPersistence shoppingItemPersistence;
1169            @BeanReference(type = ShoppingItemFinder.class)
1170            protected ShoppingItemFinder shoppingItemFinder;
1171            @BeanReference(type = ShoppingItemFieldLocalService.class)
1172            protected ShoppingItemFieldLocalService shoppingItemFieldLocalService;
1173            @BeanReference(type = ShoppingItemFieldPersistence.class)
1174            protected ShoppingItemFieldPersistence shoppingItemFieldPersistence;
1175            @BeanReference(type = ShoppingItemPriceLocalService.class)
1176            protected ShoppingItemPriceLocalService shoppingItemPriceLocalService;
1177            @BeanReference(type = ShoppingItemPricePersistence.class)
1178            protected ShoppingItemPricePersistence shoppingItemPricePersistence;
1179            @BeanReference(type = ShoppingOrderLocalService.class)
1180            protected ShoppingOrderLocalService shoppingOrderLocalService;
1181            @BeanReference(type = ShoppingOrderService.class)
1182            protected ShoppingOrderService shoppingOrderService;
1183            @BeanReference(type = ShoppingOrderPersistence.class)
1184            protected ShoppingOrderPersistence shoppingOrderPersistence;
1185            @BeanReference(type = ShoppingOrderFinder.class)
1186            protected ShoppingOrderFinder shoppingOrderFinder;
1187            @BeanReference(type = ShoppingOrderItemLocalService.class)
1188            protected ShoppingOrderItemLocalService shoppingOrderItemLocalService;
1189            @BeanReference(type = ShoppingOrderItemPersistence.class)
1190            protected ShoppingOrderItemPersistence shoppingOrderItemPersistence;
1191            @BeanReference(type = CounterLocalService.class)
1192            protected CounterLocalService counterLocalService;
1193            @BeanReference(type = MailService.class)
1194            protected MailService mailService;
1195            @BeanReference(type = CompanyLocalService.class)
1196            protected CompanyLocalService companyLocalService;
1197            @BeanReference(type = CompanyService.class)
1198            protected CompanyService companyService;
1199            @BeanReference(type = CompanyPersistence.class)
1200            protected CompanyPersistence companyPersistence;
1201            @BeanReference(type = ResourceLocalService.class)
1202            protected ResourceLocalService resourceLocalService;
1203            @BeanReference(type = ResourceService.class)
1204            protected ResourceService resourceService;
1205            @BeanReference(type = ResourcePersistence.class)
1206            protected ResourcePersistence resourcePersistence;
1207            @BeanReference(type = ResourceFinder.class)
1208            protected ResourceFinder resourceFinder;
1209            @BeanReference(type = SubscriptionLocalService.class)
1210            protected SubscriptionLocalService subscriptionLocalService;
1211            @BeanReference(type = SubscriptionPersistence.class)
1212            protected SubscriptionPersistence subscriptionPersistence;
1213            @BeanReference(type = UserLocalService.class)
1214            protected UserLocalService userLocalService;
1215            @BeanReference(type = UserService.class)
1216            protected UserService userService;
1217            @BeanReference(type = UserPersistence.class)
1218            protected UserPersistence userPersistence;
1219            @BeanReference(type = UserFinder.class)
1220            protected UserFinder userFinder;
1221            @BeanReference(type = MBMessageLocalService.class)
1222            protected MBMessageLocalService mbMessageLocalService;
1223            @BeanReference(type = MBMessageService.class)
1224            protected MBMessageService mbMessageService;
1225            @BeanReference(type = MBMessagePersistence.class)
1226            protected MBMessagePersistence mbMessagePersistence;
1227            @BeanReference(type = MBMessageFinder.class)
1228            protected MBMessageFinder mbMessageFinder;
1229            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1230            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1231            private String _beanIdentifier;
1232    }