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