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.ShoppingCoupon;
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 coupon 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.ShoppingCouponLocalServiceImpl}.
078     * </p>
079     *
080     * @author Brian Wing Shun Chan
081     * @see com.liferay.portlet.shopping.service.impl.ShoppingCouponLocalServiceImpl
082     * @see com.liferay.portlet.shopping.service.ShoppingCouponLocalServiceUtil
083     * @generated
084     */
085    public abstract class ShoppingCouponLocalServiceBaseImpl
086            extends BaseLocalServiceImpl implements ShoppingCouponLocalService,
087                    IdentifiableBean {
088            /*
089             * NOTE FOR DEVELOPERS:
090             *
091             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.shopping.service.ShoppingCouponLocalServiceUtil} to access the shopping coupon local service.
092             */
093    
094            /**
095             * Adds the shopping coupon to the database. Also notifies the appropriate model listeners.
096             *
097             * @param shoppingCoupon the shopping coupon
098             * @return the shopping coupon that was added
099             * @throws SystemException if a system exception occurred
100             */
101            @Indexable(type = IndexableType.REINDEX)
102            public ShoppingCoupon addShoppingCoupon(ShoppingCoupon shoppingCoupon)
103                    throws SystemException {
104                    shoppingCoupon.setNew(true);
105    
106                    return shoppingCouponPersistence.update(shoppingCoupon, false);
107            }
108    
109            /**
110             * Creates a new shopping coupon with the primary key. Does not add the shopping coupon to the database.
111             *
112             * @param couponId the primary key for the new shopping coupon
113             * @return the new shopping coupon
114             */
115            public ShoppingCoupon createShoppingCoupon(long couponId) {
116                    return shoppingCouponPersistence.create(couponId);
117            }
118    
119            /**
120             * Deletes the shopping coupon with the primary key from the database. Also notifies the appropriate model listeners.
121             *
122             * @param couponId the primary key of the shopping coupon
123             * @return the shopping coupon that was removed
124             * @throws PortalException if a shopping coupon with the primary key could not be found
125             * @throws SystemException if a system exception occurred
126             */
127            @Indexable(type = IndexableType.DELETE)
128            public ShoppingCoupon deleteShoppingCoupon(long couponId)
129                    throws PortalException, SystemException {
130                    return shoppingCouponPersistence.remove(couponId);
131            }
132    
133            /**
134             * Deletes the shopping coupon from the database. Also notifies the appropriate model listeners.
135             *
136             * @param shoppingCoupon the shopping coupon
137             * @return the shopping coupon that was removed
138             * @throws SystemException if a system exception occurred
139             */
140            @Indexable(type = IndexableType.DELETE)
141            public ShoppingCoupon deleteShoppingCoupon(ShoppingCoupon shoppingCoupon)
142                    throws SystemException {
143                    return shoppingCouponPersistence.remove(shoppingCoupon);
144            }
145    
146            public DynamicQuery dynamicQuery() {
147                    Class<?> clazz = getClass();
148    
149                    return DynamicQueryFactoryUtil.forClass(ShoppingCoupon.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 shoppingCouponPersistence.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 shoppingCouponPersistence.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 shoppingCouponPersistence.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 shoppingCouponPersistence.countWithDynamicQuery(dynamicQuery);
217            }
218    
219            public ShoppingCoupon fetchShoppingCoupon(long couponId)
220                    throws SystemException {
221                    return shoppingCouponPersistence.fetchByPrimaryKey(couponId);
222            }
223    
224            /**
225             * Returns the shopping coupon with the primary key.
226             *
227             * @param couponId the primary key of the shopping coupon
228             * @return the shopping coupon
229             * @throws PortalException if a shopping coupon with the primary key could not be found
230             * @throws SystemException if a system exception occurred
231             */
232            public ShoppingCoupon getShoppingCoupon(long couponId)
233                    throws PortalException, SystemException {
234                    return shoppingCouponPersistence.findByPrimaryKey(couponId);
235            }
236    
237            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
238                    throws PortalException, SystemException {
239                    return shoppingCouponPersistence.findByPrimaryKey(primaryKeyObj);
240            }
241    
242            /**
243             * Returns a range of all the shopping coupons.
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 coupons
250             * @param end the upper bound of the range of shopping coupons (not inclusive)
251             * @return the range of shopping coupons
252             * @throws SystemException if a system exception occurred
253             */
254            public List<ShoppingCoupon> getShoppingCoupons(int start, int end)
255                    throws SystemException {
256                    return shoppingCouponPersistence.findAll(start, end);
257            }
258    
259            /**
260             * Returns the number of shopping coupons.
261             *
262             * @return the number of shopping coupons
263             * @throws SystemException if a system exception occurred
264             */
265            public int getShoppingCouponsCount() throws SystemException {
266                    return shoppingCouponPersistence.countAll();
267            }
268    
269            /**
270             * Updates the shopping coupon in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
271             *
272             * @param shoppingCoupon the shopping coupon
273             * @return the shopping coupon that was updated
274             * @throws SystemException if a system exception occurred
275             */
276            @Indexable(type = IndexableType.REINDEX)
277            public ShoppingCoupon updateShoppingCoupon(ShoppingCoupon shoppingCoupon)
278                    throws SystemException {
279                    return updateShoppingCoupon(shoppingCoupon, true);
280            }
281    
282            /**
283             * Updates the shopping coupon in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
284             *
285             * @param shoppingCoupon the shopping coupon
286             * @param merge whether to merge the shopping coupon 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 coupon that was updated
288             * @throws SystemException if a system exception occurred
289             */
290            @Indexable(type = IndexableType.REINDEX)
291            public ShoppingCoupon updateShoppingCoupon(ShoppingCoupon shoppingCoupon,
292                    boolean merge) throws SystemException {
293                    shoppingCoupon.setNew(false);
294    
295                    return shoppingCouponPersistence.update(shoppingCoupon, merge);
296            }
297    
298            /**
299             * Returns the shopping cart local service.
300             *
301             * @return the shopping cart local service
302             */
303            public ShoppingCartLocalService getShoppingCartLocalService() {
304                    return shoppingCartLocalService;
305            }
306    
307            /**
308             * Sets the shopping cart local service.
309             *
310             * @param shoppingCartLocalService the shopping cart local service
311             */
312            public void setShoppingCartLocalService(
313                    ShoppingCartLocalService shoppingCartLocalService) {
314                    this.shoppingCartLocalService = shoppingCartLocalService;
315            }
316    
317            /**
318             * Returns the shopping cart persistence.
319             *
320             * @return the shopping cart persistence
321             */
322            public ShoppingCartPersistence getShoppingCartPersistence() {
323                    return shoppingCartPersistence;
324            }
325    
326            /**
327             * Sets the shopping cart persistence.
328             *
329             * @param shoppingCartPersistence the shopping cart persistence
330             */
331            public void setShoppingCartPersistence(
332                    ShoppingCartPersistence shoppingCartPersistence) {
333                    this.shoppingCartPersistence = shoppingCartPersistence;
334            }
335    
336            /**
337             * Returns the shopping category local service.
338             *
339             * @return the shopping category local service
340             */
341            public ShoppingCategoryLocalService getShoppingCategoryLocalService() {
342                    return shoppingCategoryLocalService;
343            }
344    
345            /**
346             * Sets the shopping category local service.
347             *
348             * @param shoppingCategoryLocalService the shopping category local service
349             */
350            public void setShoppingCategoryLocalService(
351                    ShoppingCategoryLocalService shoppingCategoryLocalService) {
352                    this.shoppingCategoryLocalService = shoppingCategoryLocalService;
353            }
354    
355            /**
356             * Returns the shopping category remote service.
357             *
358             * @return the shopping category remote service
359             */
360            public ShoppingCategoryService getShoppingCategoryService() {
361                    return shoppingCategoryService;
362            }
363    
364            /**
365             * Sets the shopping category remote service.
366             *
367             * @param shoppingCategoryService the shopping category remote service
368             */
369            public void setShoppingCategoryService(
370                    ShoppingCategoryService shoppingCategoryService) {
371                    this.shoppingCategoryService = shoppingCategoryService;
372            }
373    
374            /**
375             * Returns the shopping category persistence.
376             *
377             * @return the shopping category persistence
378             */
379            public ShoppingCategoryPersistence getShoppingCategoryPersistence() {
380                    return shoppingCategoryPersistence;
381            }
382    
383            /**
384             * Sets the shopping category persistence.
385             *
386             * @param shoppingCategoryPersistence the shopping category persistence
387             */
388            public void setShoppingCategoryPersistence(
389                    ShoppingCategoryPersistence shoppingCategoryPersistence) {
390                    this.shoppingCategoryPersistence = shoppingCategoryPersistence;
391            }
392    
393            /**
394             * Returns the shopping coupon local service.
395             *
396             * @return the shopping coupon local service
397             */
398            public ShoppingCouponLocalService getShoppingCouponLocalService() {
399                    return shoppingCouponLocalService;
400            }
401    
402            /**
403             * Sets the shopping coupon local service.
404             *
405             * @param shoppingCouponLocalService the shopping coupon local service
406             */
407            public void setShoppingCouponLocalService(
408                    ShoppingCouponLocalService shoppingCouponLocalService) {
409                    this.shoppingCouponLocalService = shoppingCouponLocalService;
410            }
411    
412            /**
413             * Returns the shopping coupon remote service.
414             *
415             * @return the shopping coupon remote service
416             */
417            public ShoppingCouponService getShoppingCouponService() {
418                    return shoppingCouponService;
419            }
420    
421            /**
422             * Sets the shopping coupon remote service.
423             *
424             * @param shoppingCouponService the shopping coupon remote service
425             */
426            public void setShoppingCouponService(
427                    ShoppingCouponService shoppingCouponService) {
428                    this.shoppingCouponService = shoppingCouponService;
429            }
430    
431            /**
432             * Returns the shopping coupon persistence.
433             *
434             * @return the shopping coupon persistence
435             */
436            public ShoppingCouponPersistence getShoppingCouponPersistence() {
437                    return shoppingCouponPersistence;
438            }
439    
440            /**
441             * Sets the shopping coupon persistence.
442             *
443             * @param shoppingCouponPersistence the shopping coupon persistence
444             */
445            public void setShoppingCouponPersistence(
446                    ShoppingCouponPersistence shoppingCouponPersistence) {
447                    this.shoppingCouponPersistence = shoppingCouponPersistence;
448            }
449    
450            /**
451             * Returns the shopping coupon finder.
452             *
453             * @return the shopping coupon finder
454             */
455            public ShoppingCouponFinder getShoppingCouponFinder() {
456                    return shoppingCouponFinder;
457            }
458    
459            /**
460             * Sets the shopping coupon finder.
461             *
462             * @param shoppingCouponFinder the shopping coupon finder
463             */
464            public void setShoppingCouponFinder(
465                    ShoppingCouponFinder shoppingCouponFinder) {
466                    this.shoppingCouponFinder = shoppingCouponFinder;
467            }
468    
469            /**
470             * Returns the shopping item local service.
471             *
472             * @return the shopping item local service
473             */
474            public ShoppingItemLocalService getShoppingItemLocalService() {
475                    return shoppingItemLocalService;
476            }
477    
478            /**
479             * Sets the shopping item local service.
480             *
481             * @param shoppingItemLocalService the shopping item local service
482             */
483            public void setShoppingItemLocalService(
484                    ShoppingItemLocalService shoppingItemLocalService) {
485                    this.shoppingItemLocalService = shoppingItemLocalService;
486            }
487    
488            /**
489             * Returns the shopping item remote service.
490             *
491             * @return the shopping item remote service
492             */
493            public ShoppingItemService getShoppingItemService() {
494                    return shoppingItemService;
495            }
496    
497            /**
498             * Sets the shopping item remote service.
499             *
500             * @param shoppingItemService the shopping item remote service
501             */
502            public void setShoppingItemService(ShoppingItemService shoppingItemService) {
503                    this.shoppingItemService = shoppingItemService;
504            }
505    
506            /**
507             * Returns the shopping item persistence.
508             *
509             * @return the shopping item persistence
510             */
511            public ShoppingItemPersistence getShoppingItemPersistence() {
512                    return shoppingItemPersistence;
513            }
514    
515            /**
516             * Sets the shopping item persistence.
517             *
518             * @param shoppingItemPersistence the shopping item persistence
519             */
520            public void setShoppingItemPersistence(
521                    ShoppingItemPersistence shoppingItemPersistence) {
522                    this.shoppingItemPersistence = shoppingItemPersistence;
523            }
524    
525            /**
526             * Returns the shopping item finder.
527             *
528             * @return the shopping item finder
529             */
530            public ShoppingItemFinder getShoppingItemFinder() {
531                    return shoppingItemFinder;
532            }
533    
534            /**
535             * Sets the shopping item finder.
536             *
537             * @param shoppingItemFinder the shopping item finder
538             */
539            public void setShoppingItemFinder(ShoppingItemFinder shoppingItemFinder) {
540                    this.shoppingItemFinder = shoppingItemFinder;
541            }
542    
543            /**
544             * Returns the shopping item field local service.
545             *
546             * @return the shopping item field local service
547             */
548            public ShoppingItemFieldLocalService getShoppingItemFieldLocalService() {
549                    return shoppingItemFieldLocalService;
550            }
551    
552            /**
553             * Sets the shopping item field local service.
554             *
555             * @param shoppingItemFieldLocalService the shopping item field local service
556             */
557            public void setShoppingItemFieldLocalService(
558                    ShoppingItemFieldLocalService shoppingItemFieldLocalService) {
559                    this.shoppingItemFieldLocalService = shoppingItemFieldLocalService;
560            }
561    
562            /**
563             * Returns the shopping item field persistence.
564             *
565             * @return the shopping item field persistence
566             */
567            public ShoppingItemFieldPersistence getShoppingItemFieldPersistence() {
568                    return shoppingItemFieldPersistence;
569            }
570    
571            /**
572             * Sets the shopping item field persistence.
573             *
574             * @param shoppingItemFieldPersistence the shopping item field persistence
575             */
576            public void setShoppingItemFieldPersistence(
577                    ShoppingItemFieldPersistence shoppingItemFieldPersistence) {
578                    this.shoppingItemFieldPersistence = shoppingItemFieldPersistence;
579            }
580    
581            /**
582             * Returns the shopping item price local service.
583             *
584             * @return the shopping item price local service
585             */
586            public ShoppingItemPriceLocalService getShoppingItemPriceLocalService() {
587                    return shoppingItemPriceLocalService;
588            }
589    
590            /**
591             * Sets the shopping item price local service.
592             *
593             * @param shoppingItemPriceLocalService the shopping item price local service
594             */
595            public void setShoppingItemPriceLocalService(
596                    ShoppingItemPriceLocalService shoppingItemPriceLocalService) {
597                    this.shoppingItemPriceLocalService = shoppingItemPriceLocalService;
598            }
599    
600            /**
601             * Returns the shopping item price persistence.
602             *
603             * @return the shopping item price persistence
604             */
605            public ShoppingItemPricePersistence getShoppingItemPricePersistence() {
606                    return shoppingItemPricePersistence;
607            }
608    
609            /**
610             * Sets the shopping item price persistence.
611             *
612             * @param shoppingItemPricePersistence the shopping item price persistence
613             */
614            public void setShoppingItemPricePersistence(
615                    ShoppingItemPricePersistence shoppingItemPricePersistence) {
616                    this.shoppingItemPricePersistence = shoppingItemPricePersistence;
617            }
618    
619            /**
620             * Returns the shopping order local service.
621             *
622             * @return the shopping order local service
623             */
624            public ShoppingOrderLocalService getShoppingOrderLocalService() {
625                    return shoppingOrderLocalService;
626            }
627    
628            /**
629             * Sets the shopping order local service.
630             *
631             * @param shoppingOrderLocalService the shopping order local service
632             */
633            public void setShoppingOrderLocalService(
634                    ShoppingOrderLocalService shoppingOrderLocalService) {
635                    this.shoppingOrderLocalService = shoppingOrderLocalService;
636            }
637    
638            /**
639             * Returns the shopping order remote service.
640             *
641             * @return the shopping order remote service
642             */
643            public ShoppingOrderService getShoppingOrderService() {
644                    return shoppingOrderService;
645            }
646    
647            /**
648             * Sets the shopping order remote service.
649             *
650             * @param shoppingOrderService the shopping order remote service
651             */
652            public void setShoppingOrderService(
653                    ShoppingOrderService shoppingOrderService) {
654                    this.shoppingOrderService = shoppingOrderService;
655            }
656    
657            /**
658             * Returns the shopping order persistence.
659             *
660             * @return the shopping order persistence
661             */
662            public ShoppingOrderPersistence getShoppingOrderPersistence() {
663                    return shoppingOrderPersistence;
664            }
665    
666            /**
667             * Sets the shopping order persistence.
668             *
669             * @param shoppingOrderPersistence the shopping order persistence
670             */
671            public void setShoppingOrderPersistence(
672                    ShoppingOrderPersistence shoppingOrderPersistence) {
673                    this.shoppingOrderPersistence = shoppingOrderPersistence;
674            }
675    
676            /**
677             * Returns the shopping order finder.
678             *
679             * @return the shopping order finder
680             */
681            public ShoppingOrderFinder getShoppingOrderFinder() {
682                    return shoppingOrderFinder;
683            }
684    
685            /**
686             * Sets the shopping order finder.
687             *
688             * @param shoppingOrderFinder the shopping order finder
689             */
690            public void setShoppingOrderFinder(ShoppingOrderFinder shoppingOrderFinder) {
691                    this.shoppingOrderFinder = shoppingOrderFinder;
692            }
693    
694            /**
695             * Returns the shopping order item local service.
696             *
697             * @return the shopping order item local service
698             */
699            public ShoppingOrderItemLocalService getShoppingOrderItemLocalService() {
700                    return shoppingOrderItemLocalService;
701            }
702    
703            /**
704             * Sets the shopping order item local service.
705             *
706             * @param shoppingOrderItemLocalService the shopping order item local service
707             */
708            public void setShoppingOrderItemLocalService(
709                    ShoppingOrderItemLocalService shoppingOrderItemLocalService) {
710                    this.shoppingOrderItemLocalService = shoppingOrderItemLocalService;
711            }
712    
713            /**
714             * Returns the shopping order item persistence.
715             *
716             * @return the shopping order item persistence
717             */
718            public ShoppingOrderItemPersistence getShoppingOrderItemPersistence() {
719                    return shoppingOrderItemPersistence;
720            }
721    
722            /**
723             * Sets the shopping order item persistence.
724             *
725             * @param shoppingOrderItemPersistence the shopping order item persistence
726             */
727            public void setShoppingOrderItemPersistence(
728                    ShoppingOrderItemPersistence shoppingOrderItemPersistence) {
729                    this.shoppingOrderItemPersistence = shoppingOrderItemPersistence;
730            }
731    
732            /**
733             * Returns the counter local service.
734             *
735             * @return the counter local service
736             */
737            public CounterLocalService getCounterLocalService() {
738                    return counterLocalService;
739            }
740    
741            /**
742             * Sets the counter local service.
743             *
744             * @param counterLocalService the counter local service
745             */
746            public void setCounterLocalService(CounterLocalService counterLocalService) {
747                    this.counterLocalService = counterLocalService;
748            }
749    
750            /**
751             * Returns the resource local service.
752             *
753             * @return the resource local service
754             */
755            public ResourceLocalService getResourceLocalService() {
756                    return resourceLocalService;
757            }
758    
759            /**
760             * Sets the resource local service.
761             *
762             * @param resourceLocalService the resource local service
763             */
764            public void setResourceLocalService(
765                    ResourceLocalService resourceLocalService) {
766                    this.resourceLocalService = resourceLocalService;
767            }
768    
769            /**
770             * Returns the resource remote service.
771             *
772             * @return the resource remote service
773             */
774            public ResourceService getResourceService() {
775                    return resourceService;
776            }
777    
778            /**
779             * Sets the resource remote service.
780             *
781             * @param resourceService the resource remote service
782             */
783            public void setResourceService(ResourceService resourceService) {
784                    this.resourceService = resourceService;
785            }
786    
787            /**
788             * Returns the resource persistence.
789             *
790             * @return the resource persistence
791             */
792            public ResourcePersistence getResourcePersistence() {
793                    return resourcePersistence;
794            }
795    
796            /**
797             * Sets the resource persistence.
798             *
799             * @param resourcePersistence the resource persistence
800             */
801            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
802                    this.resourcePersistence = resourcePersistence;
803            }
804    
805            /**
806             * Returns the resource finder.
807             *
808             * @return the resource finder
809             */
810            public ResourceFinder getResourceFinder() {
811                    return resourceFinder;
812            }
813    
814            /**
815             * Sets the resource finder.
816             *
817             * @param resourceFinder the resource finder
818             */
819            public void setResourceFinder(ResourceFinder resourceFinder) {
820                    this.resourceFinder = resourceFinder;
821            }
822    
823            /**
824             * Returns the user local service.
825             *
826             * @return the user local service
827             */
828            public UserLocalService getUserLocalService() {
829                    return userLocalService;
830            }
831    
832            /**
833             * Sets the user local service.
834             *
835             * @param userLocalService the user local service
836             */
837            public void setUserLocalService(UserLocalService userLocalService) {
838                    this.userLocalService = userLocalService;
839            }
840    
841            /**
842             * Returns the user remote service.
843             *
844             * @return the user remote service
845             */
846            public UserService getUserService() {
847                    return userService;
848            }
849    
850            /**
851             * Sets the user remote service.
852             *
853             * @param userService the user remote service
854             */
855            public void setUserService(UserService userService) {
856                    this.userService = userService;
857            }
858    
859            /**
860             * Returns the user persistence.
861             *
862             * @return the user persistence
863             */
864            public UserPersistence getUserPersistence() {
865                    return userPersistence;
866            }
867    
868            /**
869             * Sets the user persistence.
870             *
871             * @param userPersistence the user persistence
872             */
873            public void setUserPersistence(UserPersistence userPersistence) {
874                    this.userPersistence = userPersistence;
875            }
876    
877            /**
878             * Returns the user finder.
879             *
880             * @return the user finder
881             */
882            public UserFinder getUserFinder() {
883                    return userFinder;
884            }
885    
886            /**
887             * Sets the user finder.
888             *
889             * @param userFinder the user finder
890             */
891            public void setUserFinder(UserFinder userFinder) {
892                    this.userFinder = userFinder;
893            }
894    
895            public void afterPropertiesSet() {
896                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.shopping.model.ShoppingCoupon",
897                            shoppingCouponLocalService);
898            }
899    
900            public void destroy() {
901                    persistedModelLocalServiceRegistry.unregister(
902                            "com.liferay.portlet.shopping.model.ShoppingCoupon");
903            }
904    
905            /**
906             * Returns the Spring bean ID for this bean.
907             *
908             * @return the Spring bean ID for this bean
909             */
910            public String getBeanIdentifier() {
911                    return _beanIdentifier;
912            }
913    
914            /**
915             * Sets the Spring bean ID for this bean.
916             *
917             * @param beanIdentifier the Spring bean ID for this bean
918             */
919            public void setBeanIdentifier(String beanIdentifier) {
920                    _beanIdentifier = beanIdentifier;
921            }
922    
923            protected Class<?> getModelClass() {
924                    return ShoppingCoupon.class;
925            }
926    
927            protected String getModelClassName() {
928                    return ShoppingCoupon.class.getName();
929            }
930    
931            /**
932             * Performs an SQL query.
933             *
934             * @param sql the sql query
935             */
936            protected void runSQL(String sql) throws SystemException {
937                    try {
938                            DataSource dataSource = shoppingCouponPersistence.getDataSource();
939    
940                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
941                                            sql, new int[0]);
942    
943                            sqlUpdate.update();
944                    }
945                    catch (Exception e) {
946                            throw new SystemException(e);
947                    }
948            }
949    
950            @BeanReference(type = ShoppingCartLocalService.class)
951            protected ShoppingCartLocalService shoppingCartLocalService;
952            @BeanReference(type = ShoppingCartPersistence.class)
953            protected ShoppingCartPersistence shoppingCartPersistence;
954            @BeanReference(type = ShoppingCategoryLocalService.class)
955            protected ShoppingCategoryLocalService shoppingCategoryLocalService;
956            @BeanReference(type = ShoppingCategoryService.class)
957            protected ShoppingCategoryService shoppingCategoryService;
958            @BeanReference(type = ShoppingCategoryPersistence.class)
959            protected ShoppingCategoryPersistence shoppingCategoryPersistence;
960            @BeanReference(type = ShoppingCouponLocalService.class)
961            protected ShoppingCouponLocalService shoppingCouponLocalService;
962            @BeanReference(type = ShoppingCouponService.class)
963            protected ShoppingCouponService shoppingCouponService;
964            @BeanReference(type = ShoppingCouponPersistence.class)
965            protected ShoppingCouponPersistence shoppingCouponPersistence;
966            @BeanReference(type = ShoppingCouponFinder.class)
967            protected ShoppingCouponFinder shoppingCouponFinder;
968            @BeanReference(type = ShoppingItemLocalService.class)
969            protected ShoppingItemLocalService shoppingItemLocalService;
970            @BeanReference(type = ShoppingItemService.class)
971            protected ShoppingItemService shoppingItemService;
972            @BeanReference(type = ShoppingItemPersistence.class)
973            protected ShoppingItemPersistence shoppingItemPersistence;
974            @BeanReference(type = ShoppingItemFinder.class)
975            protected ShoppingItemFinder shoppingItemFinder;
976            @BeanReference(type = ShoppingItemFieldLocalService.class)
977            protected ShoppingItemFieldLocalService shoppingItemFieldLocalService;
978            @BeanReference(type = ShoppingItemFieldPersistence.class)
979            protected ShoppingItemFieldPersistence shoppingItemFieldPersistence;
980            @BeanReference(type = ShoppingItemPriceLocalService.class)
981            protected ShoppingItemPriceLocalService shoppingItemPriceLocalService;
982            @BeanReference(type = ShoppingItemPricePersistence.class)
983            protected ShoppingItemPricePersistence shoppingItemPricePersistence;
984            @BeanReference(type = ShoppingOrderLocalService.class)
985            protected ShoppingOrderLocalService shoppingOrderLocalService;
986            @BeanReference(type = ShoppingOrderService.class)
987            protected ShoppingOrderService shoppingOrderService;
988            @BeanReference(type = ShoppingOrderPersistence.class)
989            protected ShoppingOrderPersistence shoppingOrderPersistence;
990            @BeanReference(type = ShoppingOrderFinder.class)
991            protected ShoppingOrderFinder shoppingOrderFinder;
992            @BeanReference(type = ShoppingOrderItemLocalService.class)
993            protected ShoppingOrderItemLocalService shoppingOrderItemLocalService;
994            @BeanReference(type = ShoppingOrderItemPersistence.class)
995            protected ShoppingOrderItemPersistence shoppingOrderItemPersistence;
996            @BeanReference(type = CounterLocalService.class)
997            protected CounterLocalService counterLocalService;
998            @BeanReference(type = ResourceLocalService.class)
999            protected ResourceLocalService resourceLocalService;
1000            @BeanReference(type = ResourceService.class)
1001            protected ResourceService resourceService;
1002            @BeanReference(type = ResourcePersistence.class)
1003            protected ResourcePersistence resourcePersistence;
1004            @BeanReference(type = ResourceFinder.class)
1005            protected ResourceFinder resourceFinder;
1006            @BeanReference(type = UserLocalService.class)
1007            protected UserLocalService userLocalService;
1008            @BeanReference(type = UserService.class)
1009            protected UserService userService;
1010            @BeanReference(type = UserPersistence.class)
1011            protected UserPersistence userPersistence;
1012            @BeanReference(type = UserFinder.class)
1013            protected UserFinder userFinder;
1014            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1015            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1016            private String _beanIdentifier;
1017    }