001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.shopping.service.base;
016    
017    import com.liferay.counter.service.CounterLocalService;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
025    import com.liferay.portal.kernel.exception.PortalException;
026    import com.liferay.portal.kernel.exception.SystemException;
027    import com.liferay.portal.kernel.search.Indexable;
028    import com.liferay.portal.kernel.search.IndexableType;
029    import com.liferay.portal.kernel.util.OrderByComparator;
030    import com.liferay.portal.model.PersistedModel;
031    import com.liferay.portal.service.BaseLocalServiceImpl;
032    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
033    import com.liferay.portal.service.ResourceLocalService;
034    import com.liferay.portal.service.ResourceService;
035    import com.liferay.portal.service.UserLocalService;
036    import com.liferay.portal.service.UserService;
037    import com.liferay.portal.service.persistence.ResourceFinder;
038    import com.liferay.portal.service.persistence.ResourcePersistence;
039    import com.liferay.portal.service.persistence.UserFinder;
040    import com.liferay.portal.service.persistence.UserPersistence;
041    
042    import com.liferay.portlet.shopping.model.ShoppingOrderItem;
043    import com.liferay.portlet.shopping.service.ShoppingCartLocalService;
044    import com.liferay.portlet.shopping.service.ShoppingCategoryLocalService;
045    import com.liferay.portlet.shopping.service.ShoppingCategoryService;
046    import com.liferay.portlet.shopping.service.ShoppingCouponLocalService;
047    import com.liferay.portlet.shopping.service.ShoppingCouponService;
048    import com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService;
049    import com.liferay.portlet.shopping.service.ShoppingItemLocalService;
050    import com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService;
051    import com.liferay.portlet.shopping.service.ShoppingItemService;
052    import com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService;
053    import com.liferay.portlet.shopping.service.ShoppingOrderLocalService;
054    import com.liferay.portlet.shopping.service.ShoppingOrderService;
055    import com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence;
056    import com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence;
057    import com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder;
058    import com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence;
059    import com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence;
060    import com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder;
061    import com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence;
062    import com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence;
063    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder;
064    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence;
065    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence;
066    
067    import java.io.Serializable;
068    
069    import java.util.List;
070    
071    import javax.sql.DataSource;
072    
073    /**
074     * The base implementation of the shopping order item local service.
075     *
076     * <p>
077     * 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.ShoppingOrderItemLocalServiceImpl}.
078     * </p>
079     *
080     * @author Brian Wing Shun Chan
081     * @see com.liferay.portlet.shopping.service.impl.ShoppingOrderItemLocalServiceImpl
082     * @see com.liferay.portlet.shopping.service.ShoppingOrderItemLocalServiceUtil
083     * @generated
084     */
085    public abstract class ShoppingOrderItemLocalServiceBaseImpl
086            extends BaseLocalServiceImpl implements ShoppingOrderItemLocalService,
087                    IdentifiableBean {
088            /*
089             * NOTE FOR DEVELOPERS:
090             *
091             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.shopping.service.ShoppingOrderItemLocalServiceUtil} to access the shopping order item local service.
092             */
093    
094            /**
095             * Adds the shopping order item to the database. Also notifies the appropriate model listeners.
096             *
097             * @param shoppingOrderItem the shopping order item
098             * @return the shopping order item that was added
099             * @throws SystemException if a system exception occurred
100             */
101            @Indexable(type = IndexableType.REINDEX)
102            public ShoppingOrderItem addShoppingOrderItem(
103                    ShoppingOrderItem shoppingOrderItem) throws SystemException {
104                    shoppingOrderItem.setNew(true);
105    
106                    return shoppingOrderItemPersistence.update(shoppingOrderItem, false);
107            }
108    
109            /**
110             * Creates a new shopping order item with the primary key. Does not add the shopping order item to the database.
111             *
112             * @param orderItemId the primary key for the new shopping order item
113             * @return the new shopping order item
114             */
115            public ShoppingOrderItem createShoppingOrderItem(long orderItemId) {
116                    return shoppingOrderItemPersistence.create(orderItemId);
117            }
118    
119            /**
120             * Deletes the shopping order item with the primary key from the database. Also notifies the appropriate model listeners.
121             *
122             * @param orderItemId the primary key of the shopping order item
123             * @return the shopping order item that was removed
124             * @throws PortalException if a shopping order item with the primary key could not be found
125             * @throws SystemException if a system exception occurred
126             */
127            @Indexable(type = IndexableType.DELETE)
128            public ShoppingOrderItem deleteShoppingOrderItem(long orderItemId)
129                    throws PortalException, SystemException {
130                    return shoppingOrderItemPersistence.remove(orderItemId);
131            }
132    
133            /**
134             * Deletes the shopping order item from the database. Also notifies the appropriate model listeners.
135             *
136             * @param shoppingOrderItem the shopping order item
137             * @return the shopping order item that was removed
138             * @throws SystemException if a system exception occurred
139             */
140            @Indexable(type = IndexableType.DELETE)
141            public ShoppingOrderItem deleteShoppingOrderItem(
142                    ShoppingOrderItem shoppingOrderItem) throws SystemException {
143                    return shoppingOrderItemPersistence.remove(shoppingOrderItem);
144            }
145    
146            public DynamicQuery dynamicQuery() {
147                    Class<?> clazz = getClass();
148    
149                    return DynamicQueryFactoryUtil.forClass(ShoppingOrderItem.class,
150                            clazz.getClassLoader());
151            }
152    
153            /**
154             * Performs a dynamic query on the database and returns the matching rows.
155             *
156             * @param dynamicQuery the dynamic query
157             * @return the matching rows
158             * @throws SystemException if a system exception occurred
159             */
160            @SuppressWarnings("rawtypes")
161            public List dynamicQuery(DynamicQuery dynamicQuery)
162                    throws SystemException {
163                    return shoppingOrderItemPersistence.findWithDynamicQuery(dynamicQuery);
164            }
165    
166            /**
167             * Performs a dynamic query on the database and returns a range of the matching rows.
168             *
169             * <p>
170             * 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.
171             * </p>
172             *
173             * @param dynamicQuery the dynamic query
174             * @param start the lower bound of the range of model instances
175             * @param end the upper bound of the range of model instances (not inclusive)
176             * @return the range of matching rows
177             * @throws SystemException if a system exception occurred
178             */
179            @SuppressWarnings("rawtypes")
180            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
181                    throws SystemException {
182                    return shoppingOrderItemPersistence.findWithDynamicQuery(dynamicQuery,
183                            start, end);
184            }
185    
186            /**
187             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
188             *
189             * <p>
190             * 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.
191             * </p>
192             *
193             * @param dynamicQuery the dynamic query
194             * @param start the lower bound of the range of model instances
195             * @param end the upper bound of the range of model instances (not inclusive)
196             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
197             * @return the ordered range of matching rows
198             * @throws SystemException if a system exception occurred
199             */
200            @SuppressWarnings("rawtypes")
201            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
202                    OrderByComparator orderByComparator) throws SystemException {
203                    return shoppingOrderItemPersistence.findWithDynamicQuery(dynamicQuery,
204                            start, end, orderByComparator);
205            }
206    
207            /**
208             * Returns the number of rows that match the dynamic query.
209             *
210             * @param dynamicQuery the dynamic query
211             * @return the number of rows that match the dynamic query
212             * @throws SystemException if a system exception occurred
213             */
214            public long dynamicQueryCount(DynamicQuery dynamicQuery)
215                    throws SystemException {
216                    return shoppingOrderItemPersistence.countWithDynamicQuery(dynamicQuery);
217            }
218    
219            public ShoppingOrderItem fetchShoppingOrderItem(long orderItemId)
220                    throws SystemException {
221                    return shoppingOrderItemPersistence.fetchByPrimaryKey(orderItemId);
222            }
223    
224            /**
225             * Returns the shopping order item with the primary key.
226             *
227             * @param orderItemId the primary key of the shopping order item
228             * @return the shopping order item
229             * @throws PortalException if a shopping order item with the primary key could not be found
230             * @throws SystemException if a system exception occurred
231             */
232            public ShoppingOrderItem getShoppingOrderItem(long orderItemId)
233                    throws PortalException, SystemException {
234                    return shoppingOrderItemPersistence.findByPrimaryKey(orderItemId);
235            }
236    
237            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
238                    throws PortalException, SystemException {
239                    return shoppingOrderItemPersistence.findByPrimaryKey(primaryKeyObj);
240            }
241    
242            /**
243             * Returns a range of all the shopping order items.
244             *
245             * <p>
246             * 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.
247             * </p>
248             *
249             * @param start the lower bound of the range of shopping order items
250             * @param end the upper bound of the range of shopping order items (not inclusive)
251             * @return the range of shopping order items
252             * @throws SystemException if a system exception occurred
253             */
254            public List<ShoppingOrderItem> getShoppingOrderItems(int start, int end)
255                    throws SystemException {
256                    return shoppingOrderItemPersistence.findAll(start, end);
257            }
258    
259            /**
260             * Returns the number of shopping order items.
261             *
262             * @return the number of shopping order items
263             * @throws SystemException if a system exception occurred
264             */
265            public int getShoppingOrderItemsCount() throws SystemException {
266                    return shoppingOrderItemPersistence.countAll();
267            }
268    
269            /**
270             * Updates the shopping order item in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
271             *
272             * @param shoppingOrderItem the shopping order item
273             * @return the shopping order item that was updated
274             * @throws SystemException if a system exception occurred
275             */
276            @Indexable(type = IndexableType.REINDEX)
277            public ShoppingOrderItem updateShoppingOrderItem(
278                    ShoppingOrderItem shoppingOrderItem) throws SystemException {
279                    return updateShoppingOrderItem(shoppingOrderItem, true);
280            }
281    
282            /**
283             * Updates the shopping order item in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
284             *
285             * @param shoppingOrderItem the shopping order item
286             * @param merge whether to merge the shopping order item 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.
287             * @return the shopping order item that was updated
288             * @throws SystemException if a system exception occurred
289             */
290            @Indexable(type = IndexableType.REINDEX)
291            public ShoppingOrderItem updateShoppingOrderItem(
292                    ShoppingOrderItem shoppingOrderItem, boolean merge)
293                    throws SystemException {
294                    shoppingOrderItem.setNew(false);
295    
296                    return shoppingOrderItemPersistence.update(shoppingOrderItem, merge);
297            }
298    
299            /**
300             * Returns the shopping cart local service.
301             *
302             * @return the shopping cart local service
303             */
304            public ShoppingCartLocalService getShoppingCartLocalService() {
305                    return shoppingCartLocalService;
306            }
307    
308            /**
309             * Sets the shopping cart local service.
310             *
311             * @param shoppingCartLocalService the shopping cart local service
312             */
313            public void setShoppingCartLocalService(
314                    ShoppingCartLocalService shoppingCartLocalService) {
315                    this.shoppingCartLocalService = shoppingCartLocalService;
316            }
317    
318            /**
319             * Returns the shopping cart persistence.
320             *
321             * @return the shopping cart persistence
322             */
323            public ShoppingCartPersistence getShoppingCartPersistence() {
324                    return shoppingCartPersistence;
325            }
326    
327            /**
328             * Sets the shopping cart persistence.
329             *
330             * @param shoppingCartPersistence the shopping cart persistence
331             */
332            public void setShoppingCartPersistence(
333                    ShoppingCartPersistence shoppingCartPersistence) {
334                    this.shoppingCartPersistence = shoppingCartPersistence;
335            }
336    
337            /**
338             * Returns the shopping category local service.
339             *
340             * @return the shopping category local service
341             */
342            public ShoppingCategoryLocalService getShoppingCategoryLocalService() {
343                    return shoppingCategoryLocalService;
344            }
345    
346            /**
347             * Sets the shopping category local service.
348             *
349             * @param shoppingCategoryLocalService the shopping category local service
350             */
351            public void setShoppingCategoryLocalService(
352                    ShoppingCategoryLocalService shoppingCategoryLocalService) {
353                    this.shoppingCategoryLocalService = shoppingCategoryLocalService;
354            }
355    
356            /**
357             * Returns the shopping category remote service.
358             *
359             * @return the shopping category remote service
360             */
361            public ShoppingCategoryService getShoppingCategoryService() {
362                    return shoppingCategoryService;
363            }
364    
365            /**
366             * Sets the shopping category remote service.
367             *
368             * @param shoppingCategoryService the shopping category remote service
369             */
370            public void setShoppingCategoryService(
371                    ShoppingCategoryService shoppingCategoryService) {
372                    this.shoppingCategoryService = shoppingCategoryService;
373            }
374    
375            /**
376             * Returns the shopping category persistence.
377             *
378             * @return the shopping category persistence
379             */
380            public ShoppingCategoryPersistence getShoppingCategoryPersistence() {
381                    return shoppingCategoryPersistence;
382            }
383    
384            /**
385             * Sets the shopping category persistence.
386             *
387             * @param shoppingCategoryPersistence the shopping category persistence
388             */
389            public void setShoppingCategoryPersistence(
390                    ShoppingCategoryPersistence shoppingCategoryPersistence) {
391                    this.shoppingCategoryPersistence = shoppingCategoryPersistence;
392            }
393    
394            /**
395             * Returns the shopping coupon local service.
396             *
397             * @return the shopping coupon local service
398             */
399            public ShoppingCouponLocalService getShoppingCouponLocalService() {
400                    return shoppingCouponLocalService;
401            }
402    
403            /**
404             * Sets the shopping coupon local service.
405             *
406             * @param shoppingCouponLocalService the shopping coupon local service
407             */
408            public void setShoppingCouponLocalService(
409                    ShoppingCouponLocalService shoppingCouponLocalService) {
410                    this.shoppingCouponLocalService = shoppingCouponLocalService;
411            }
412    
413            /**
414             * Returns the shopping coupon remote service.
415             *
416             * @return the shopping coupon remote service
417             */
418            public ShoppingCouponService getShoppingCouponService() {
419                    return shoppingCouponService;
420            }
421    
422            /**
423             * Sets the shopping coupon remote service.
424             *
425             * @param shoppingCouponService the shopping coupon remote service
426             */
427            public void setShoppingCouponService(
428                    ShoppingCouponService shoppingCouponService) {
429                    this.shoppingCouponService = shoppingCouponService;
430            }
431    
432            /**
433             * Returns the shopping coupon persistence.
434             *
435             * @return the shopping coupon persistence
436             */
437            public ShoppingCouponPersistence getShoppingCouponPersistence() {
438                    return shoppingCouponPersistence;
439            }
440    
441            /**
442             * Sets the shopping coupon persistence.
443             *
444             * @param shoppingCouponPersistence the shopping coupon persistence
445             */
446            public void setShoppingCouponPersistence(
447                    ShoppingCouponPersistence shoppingCouponPersistence) {
448                    this.shoppingCouponPersistence = shoppingCouponPersistence;
449            }
450    
451            /**
452             * Returns the shopping coupon finder.
453             *
454             * @return the shopping coupon finder
455             */
456            public ShoppingCouponFinder getShoppingCouponFinder() {
457                    return shoppingCouponFinder;
458            }
459    
460            /**
461             * Sets the shopping coupon finder.
462             *
463             * @param shoppingCouponFinder the shopping coupon finder
464             */
465            public void setShoppingCouponFinder(
466                    ShoppingCouponFinder shoppingCouponFinder) {
467                    this.shoppingCouponFinder = shoppingCouponFinder;
468            }
469    
470            /**
471             * Returns the shopping item local service.
472             *
473             * @return the shopping item local service
474             */
475            public ShoppingItemLocalService getShoppingItemLocalService() {
476                    return shoppingItemLocalService;
477            }
478    
479            /**
480             * Sets the shopping item local service.
481             *
482             * @param shoppingItemLocalService the shopping item local service
483             */
484            public void setShoppingItemLocalService(
485                    ShoppingItemLocalService shoppingItemLocalService) {
486                    this.shoppingItemLocalService = shoppingItemLocalService;
487            }
488    
489            /**
490             * Returns the shopping item remote service.
491             *
492             * @return the shopping item remote service
493             */
494            public ShoppingItemService getShoppingItemService() {
495                    return shoppingItemService;
496            }
497    
498            /**
499             * Sets the shopping item remote service.
500             *
501             * @param shoppingItemService the shopping item remote service
502             */
503            public void setShoppingItemService(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 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                    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 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                    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 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                    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 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                    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 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                    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 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(CounterLocalService counterLocalService) {
748                    this.counterLocalService = counterLocalService;
749            }
750    
751            /**
752             * Returns the resource local service.
753             *
754             * @return the resource local service
755             */
756            public ResourceLocalService getResourceLocalService() {
757                    return resourceLocalService;
758            }
759    
760            /**
761             * Sets the resource local service.
762             *
763             * @param resourceLocalService the resource local service
764             */
765            public void setResourceLocalService(
766                    ResourceLocalService resourceLocalService) {
767                    this.resourceLocalService = resourceLocalService;
768            }
769    
770            /**
771             * Returns the resource remote service.
772             *
773             * @return the resource remote service
774             */
775            public ResourceService getResourceService() {
776                    return resourceService;
777            }
778    
779            /**
780             * Sets the resource remote service.
781             *
782             * @param resourceService the resource remote service
783             */
784            public void setResourceService(ResourceService resourceService) {
785                    this.resourceService = resourceService;
786            }
787    
788            /**
789             * Returns the resource persistence.
790             *
791             * @return the resource persistence
792             */
793            public ResourcePersistence getResourcePersistence() {
794                    return resourcePersistence;
795            }
796    
797            /**
798             * Sets the resource persistence.
799             *
800             * @param resourcePersistence the resource persistence
801             */
802            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
803                    this.resourcePersistence = resourcePersistence;
804            }
805    
806            /**
807             * Returns the resource finder.
808             *
809             * @return the resource finder
810             */
811            public ResourceFinder getResourceFinder() {
812                    return resourceFinder;
813            }
814    
815            /**
816             * Sets the resource finder.
817             *
818             * @param resourceFinder the resource finder
819             */
820            public void setResourceFinder(ResourceFinder resourceFinder) {
821                    this.resourceFinder = resourceFinder;
822            }
823    
824            /**
825             * Returns the user local service.
826             *
827             * @return the user local service
828             */
829            public UserLocalService getUserLocalService() {
830                    return userLocalService;
831            }
832    
833            /**
834             * Sets the user local service.
835             *
836             * @param userLocalService the user local service
837             */
838            public void setUserLocalService(UserLocalService userLocalService) {
839                    this.userLocalService = userLocalService;
840            }
841    
842            /**
843             * Returns the user remote service.
844             *
845             * @return the user remote service
846             */
847            public UserService getUserService() {
848                    return userService;
849            }
850    
851            /**
852             * Sets the user remote service.
853             *
854             * @param userService the user remote service
855             */
856            public void setUserService(UserService userService) {
857                    this.userService = userService;
858            }
859    
860            /**
861             * Returns the user persistence.
862             *
863             * @return the user persistence
864             */
865            public UserPersistence getUserPersistence() {
866                    return userPersistence;
867            }
868    
869            /**
870             * Sets the user persistence.
871             *
872             * @param userPersistence the user persistence
873             */
874            public void setUserPersistence(UserPersistence userPersistence) {
875                    this.userPersistence = userPersistence;
876            }
877    
878            /**
879             * Returns the user finder.
880             *
881             * @return the user finder
882             */
883            public UserFinder getUserFinder() {
884                    return userFinder;
885            }
886    
887            /**
888             * Sets the user finder.
889             *
890             * @param userFinder the user finder
891             */
892            public void setUserFinder(UserFinder userFinder) {
893                    this.userFinder = userFinder;
894            }
895    
896            public void afterPropertiesSet() {
897                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.shopping.model.ShoppingOrderItem",
898                            shoppingOrderItemLocalService);
899            }
900    
901            public void destroy() {
902                    persistedModelLocalServiceRegistry.unregister(
903                            "com.liferay.portlet.shopping.model.ShoppingOrderItem");
904            }
905    
906            /**
907             * Returns the Spring bean ID for this bean.
908             *
909             * @return the Spring bean ID for this bean
910             */
911            public String getBeanIdentifier() {
912                    return _beanIdentifier;
913            }
914    
915            /**
916             * Sets the Spring bean ID for this bean.
917             *
918             * @param beanIdentifier the Spring bean ID for this bean
919             */
920            public void setBeanIdentifier(String beanIdentifier) {
921                    _beanIdentifier = beanIdentifier;
922            }
923    
924            protected Class<?> getModelClass() {
925                    return ShoppingOrderItem.class;
926            }
927    
928            protected String getModelClassName() {
929                    return ShoppingOrderItem.class.getName();
930            }
931    
932            /**
933             * Performs an SQL query.
934             *
935             * @param sql the sql query
936             */
937            protected void runSQL(String sql) throws SystemException {
938                    try {
939                            DataSource dataSource = shoppingOrderItemPersistence.getDataSource();
940    
941                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
942                                            sql, new int[0]);
943    
944                            sqlUpdate.update();
945                    }
946                    catch (Exception e) {
947                            throw new SystemException(e);
948                    }
949            }
950    
951            @BeanReference(type = ShoppingCartLocalService.class)
952            protected ShoppingCartLocalService shoppingCartLocalService;
953            @BeanReference(type = ShoppingCartPersistence.class)
954            protected ShoppingCartPersistence shoppingCartPersistence;
955            @BeanReference(type = ShoppingCategoryLocalService.class)
956            protected ShoppingCategoryLocalService shoppingCategoryLocalService;
957            @BeanReference(type = ShoppingCategoryService.class)
958            protected ShoppingCategoryService shoppingCategoryService;
959            @BeanReference(type = ShoppingCategoryPersistence.class)
960            protected ShoppingCategoryPersistence shoppingCategoryPersistence;
961            @BeanReference(type = ShoppingCouponLocalService.class)
962            protected ShoppingCouponLocalService shoppingCouponLocalService;
963            @BeanReference(type = ShoppingCouponService.class)
964            protected ShoppingCouponService shoppingCouponService;
965            @BeanReference(type = ShoppingCouponPersistence.class)
966            protected ShoppingCouponPersistence shoppingCouponPersistence;
967            @BeanReference(type = ShoppingCouponFinder.class)
968            protected ShoppingCouponFinder shoppingCouponFinder;
969            @BeanReference(type = ShoppingItemLocalService.class)
970            protected ShoppingItemLocalService shoppingItemLocalService;
971            @BeanReference(type = ShoppingItemService.class)
972            protected ShoppingItemService shoppingItemService;
973            @BeanReference(type = ShoppingItemPersistence.class)
974            protected ShoppingItemPersistence shoppingItemPersistence;
975            @BeanReference(type = ShoppingItemFinder.class)
976            protected ShoppingItemFinder shoppingItemFinder;
977            @BeanReference(type = ShoppingItemFieldLocalService.class)
978            protected ShoppingItemFieldLocalService shoppingItemFieldLocalService;
979            @BeanReference(type = ShoppingItemFieldPersistence.class)
980            protected ShoppingItemFieldPersistence shoppingItemFieldPersistence;
981            @BeanReference(type = ShoppingItemPriceLocalService.class)
982            protected ShoppingItemPriceLocalService shoppingItemPriceLocalService;
983            @BeanReference(type = ShoppingItemPricePersistence.class)
984            protected ShoppingItemPricePersistence shoppingItemPricePersistence;
985            @BeanReference(type = ShoppingOrderLocalService.class)
986            protected ShoppingOrderLocalService shoppingOrderLocalService;
987            @BeanReference(type = ShoppingOrderService.class)
988            protected ShoppingOrderService shoppingOrderService;
989            @BeanReference(type = ShoppingOrderPersistence.class)
990            protected ShoppingOrderPersistence shoppingOrderPersistence;
991            @BeanReference(type = ShoppingOrderFinder.class)
992            protected ShoppingOrderFinder shoppingOrderFinder;
993            @BeanReference(type = ShoppingOrderItemLocalService.class)
994            protected ShoppingOrderItemLocalService shoppingOrderItemLocalService;
995            @BeanReference(type = ShoppingOrderItemPersistence.class)
996            protected ShoppingOrderItemPersistence shoppingOrderItemPersistence;
997            @BeanReference(type = CounterLocalService.class)
998            protected CounterLocalService counterLocalService;
999            @BeanReference(type = ResourceLocalService.class)
1000            protected ResourceLocalService resourceLocalService;
1001            @BeanReference(type = ResourceService.class)
1002            protected ResourceService resourceService;
1003            @BeanReference(type = ResourcePersistence.class)
1004            protected ResourcePersistence resourcePersistence;
1005            @BeanReference(type = ResourceFinder.class)
1006            protected ResourceFinder resourceFinder;
1007            @BeanReference(type = UserLocalService.class)
1008            protected UserLocalService userLocalService;
1009            @BeanReference(type = UserService.class)
1010            protected UserService userService;
1011            @BeanReference(type = UserPersistence.class)
1012            protected UserPersistence userPersistence;
1013            @BeanReference(type = UserFinder.class)
1014            protected UserFinder userFinder;
1015            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1016            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1017            private String _beanIdentifier;
1018    }