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