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