001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.shopping.service.base;
016    
017    import com.liferay.portal.kernel.bean.BeanReference;
018    import com.liferay.portal.kernel.bean.IdentifiableBean;
019    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
020    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
021    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
022    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.Projection;
024    import com.liferay.portal.kernel.exception.PortalException;
025    import com.liferay.portal.kernel.exception.SystemException;
026    import com.liferay.portal.kernel.search.Indexable;
027    import com.liferay.portal.kernel.search.IndexableType;
028    import com.liferay.portal.kernel.util.OrderByComparator;
029    import com.liferay.portal.model.PersistedModel;
030    import com.liferay.portal.service.BaseLocalServiceImpl;
031    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
032    import com.liferay.portal.service.persistence.UserFinder;
033    import com.liferay.portal.service.persistence.UserPersistence;
034    
035    import com.liferay.portlet.shopping.model.ShoppingCoupon;
036    import com.liferay.portlet.shopping.service.ShoppingCouponLocalService;
037    import com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence;
038    import com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence;
039    import com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder;
040    import com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence;
041    import com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence;
042    import com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder;
043    import com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence;
044    import com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence;
045    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder;
046    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence;
047    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence;
048    
049    import java.io.Serializable;
050    
051    import java.util.List;
052    
053    import javax.sql.DataSource;
054    
055    /**
056     * Provides the base implementation for the shopping coupon local service.
057     *
058     * <p>
059     * 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}.
060     * </p>
061     *
062     * @author Brian Wing Shun Chan
063     * @see com.liferay.portlet.shopping.service.impl.ShoppingCouponLocalServiceImpl
064     * @see com.liferay.portlet.shopping.service.ShoppingCouponLocalServiceUtil
065     * @generated
066     */
067    public abstract class ShoppingCouponLocalServiceBaseImpl
068            extends BaseLocalServiceImpl implements ShoppingCouponLocalService,
069                    IdentifiableBean {
070            /*
071             * NOTE FOR DEVELOPERS:
072             *
073             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.shopping.service.ShoppingCouponLocalServiceUtil} to access the shopping coupon local service.
074             */
075    
076            /**
077             * Adds the shopping coupon to the database. Also notifies the appropriate model listeners.
078             *
079             * @param shoppingCoupon the shopping coupon
080             * @return the shopping coupon that was added
081             * @throws SystemException if a system exception occurred
082             */
083            @Indexable(type = IndexableType.REINDEX)
084            @Override
085            public ShoppingCoupon addShoppingCoupon(ShoppingCoupon shoppingCoupon)
086                    throws SystemException {
087                    shoppingCoupon.setNew(true);
088    
089                    return shoppingCouponPersistence.update(shoppingCoupon);
090            }
091    
092            /**
093             * Creates a new shopping coupon with the primary key. Does not add the shopping coupon to the database.
094             *
095             * @param couponId the primary key for the new shopping coupon
096             * @return the new shopping coupon
097             */
098            @Override
099            public ShoppingCoupon createShoppingCoupon(long couponId) {
100                    return shoppingCouponPersistence.create(couponId);
101            }
102    
103            /**
104             * Deletes the shopping coupon with the primary key from the database. Also notifies the appropriate model listeners.
105             *
106             * @param couponId the primary key of the shopping coupon
107             * @return the shopping coupon that was removed
108             * @throws PortalException if a shopping coupon with the primary key could not be found
109             * @throws SystemException if a system exception occurred
110             */
111            @Indexable(type = IndexableType.DELETE)
112            @Override
113            public ShoppingCoupon deleteShoppingCoupon(long couponId)
114                    throws PortalException, SystemException {
115                    return shoppingCouponPersistence.remove(couponId);
116            }
117    
118            /**
119             * Deletes the shopping coupon from the database. Also notifies the appropriate model listeners.
120             *
121             * @param shoppingCoupon the shopping coupon
122             * @return the shopping coupon that was removed
123             * @throws SystemException if a system exception occurred
124             */
125            @Indexable(type = IndexableType.DELETE)
126            @Override
127            public ShoppingCoupon deleteShoppingCoupon(ShoppingCoupon shoppingCoupon)
128                    throws SystemException {
129                    return shoppingCouponPersistence.remove(shoppingCoupon);
130            }
131    
132            @Override
133            public DynamicQuery dynamicQuery() {
134                    Class<?> clazz = getClass();
135    
136                    return DynamicQueryFactoryUtil.forClass(ShoppingCoupon.class,
137                            clazz.getClassLoader());
138            }
139    
140            /**
141             * Performs a dynamic query on the database and returns the matching rows.
142             *
143             * @param dynamicQuery the dynamic query
144             * @return the matching rows
145             * @throws SystemException if a system exception occurred
146             */
147            @Override
148            @SuppressWarnings("rawtypes")
149            public List dynamicQuery(DynamicQuery dynamicQuery)
150                    throws SystemException {
151                    return shoppingCouponPersistence.findWithDynamicQuery(dynamicQuery);
152            }
153    
154            /**
155             * Performs a dynamic query on the database and returns a range of the matching rows.
156             *
157             * <p>
158             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingCouponModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
159             * </p>
160             *
161             * @param dynamicQuery the dynamic query
162             * @param start the lower bound of the range of model instances
163             * @param end the upper bound of the range of model instances (not inclusive)
164             * @return the range of matching rows
165             * @throws SystemException if a system exception occurred
166             */
167            @Override
168            @SuppressWarnings("rawtypes")
169            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
170                    throws SystemException {
171                    return shoppingCouponPersistence.findWithDynamicQuery(dynamicQuery,
172                            start, end);
173            }
174    
175            /**
176             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
177             *
178             * <p>
179             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingCouponModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
180             * </p>
181             *
182             * @param dynamicQuery the dynamic query
183             * @param start the lower bound of the range of model instances
184             * @param end the upper bound of the range of model instances (not inclusive)
185             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
186             * @return the ordered range of matching rows
187             * @throws SystemException if a system exception occurred
188             */
189            @Override
190            @SuppressWarnings("rawtypes")
191            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
192                    OrderByComparator orderByComparator) throws SystemException {
193                    return shoppingCouponPersistence.findWithDynamicQuery(dynamicQuery,
194                            start, end, orderByComparator);
195            }
196    
197            /**
198             * Returns the number of rows that match the dynamic query.
199             *
200             * @param dynamicQuery the dynamic query
201             * @return the number of rows that match the dynamic query
202             * @throws SystemException if a system exception occurred
203             */
204            @Override
205            public long dynamicQueryCount(DynamicQuery dynamicQuery)
206                    throws SystemException {
207                    return shoppingCouponPersistence.countWithDynamicQuery(dynamicQuery);
208            }
209    
210            /**
211             * Returns the number of rows that match the dynamic query.
212             *
213             * @param dynamicQuery the dynamic query
214             * @param projection the projection to apply to the query
215             * @return the number of rows that match the dynamic query
216             * @throws SystemException if a system exception occurred
217             */
218            @Override
219            public long dynamicQueryCount(DynamicQuery dynamicQuery,
220                    Projection projection) throws SystemException {
221                    return shoppingCouponPersistence.countWithDynamicQuery(dynamicQuery,
222                            projection);
223            }
224    
225            @Override
226            public ShoppingCoupon fetchShoppingCoupon(long couponId)
227                    throws SystemException {
228                    return shoppingCouponPersistence.fetchByPrimaryKey(couponId);
229            }
230    
231            /**
232             * Returns the shopping coupon with the primary key.
233             *
234             * @param couponId the primary key of the shopping coupon
235             * @return the shopping coupon
236             * @throws PortalException if a shopping coupon with the primary key could not be found
237             * @throws SystemException if a system exception occurred
238             */
239            @Override
240            public ShoppingCoupon getShoppingCoupon(long couponId)
241                    throws PortalException, SystemException {
242                    return shoppingCouponPersistence.findByPrimaryKey(couponId);
243            }
244    
245            @Override
246            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
247                    throws PortalException, SystemException {
248                    return shoppingCouponPersistence.findByPrimaryKey(primaryKeyObj);
249            }
250    
251            /**
252             * Returns a range of all the shopping coupons.
253             *
254             * <p>
255             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingCouponModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
256             * </p>
257             *
258             * @param start the lower bound of the range of shopping coupons
259             * @param end the upper bound of the range of shopping coupons (not inclusive)
260             * @return the range of shopping coupons
261             * @throws SystemException if a system exception occurred
262             */
263            @Override
264            public List<ShoppingCoupon> getShoppingCoupons(int start, int end)
265                    throws SystemException {
266                    return shoppingCouponPersistence.findAll(start, end);
267            }
268    
269            /**
270             * Returns the number of shopping coupons.
271             *
272             * @return the number of shopping coupons
273             * @throws SystemException if a system exception occurred
274             */
275            @Override
276            public int getShoppingCouponsCount() throws SystemException {
277                    return shoppingCouponPersistence.countAll();
278            }
279    
280            /**
281             * Updates the shopping coupon in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
282             *
283             * @param shoppingCoupon the shopping coupon
284             * @return the shopping coupon that was updated
285             * @throws SystemException if a system exception occurred
286             */
287            @Indexable(type = IndexableType.REINDEX)
288            @Override
289            public ShoppingCoupon updateShoppingCoupon(ShoppingCoupon shoppingCoupon)
290                    throws SystemException {
291                    return shoppingCouponPersistence.update(shoppingCoupon);
292            }
293    
294            /**
295             * Returns the shopping cart local service.
296             *
297             * @return the shopping cart local service
298             */
299            public com.liferay.portlet.shopping.service.ShoppingCartLocalService getShoppingCartLocalService() {
300                    return shoppingCartLocalService;
301            }
302    
303            /**
304             * Sets the shopping cart local service.
305             *
306             * @param shoppingCartLocalService the shopping cart local service
307             */
308            public void setShoppingCartLocalService(
309                    com.liferay.portlet.shopping.service.ShoppingCartLocalService shoppingCartLocalService) {
310                    this.shoppingCartLocalService = shoppingCartLocalService;
311            }
312    
313            /**
314             * Returns the shopping cart persistence.
315             *
316             * @return the shopping cart persistence
317             */
318            public ShoppingCartPersistence getShoppingCartPersistence() {
319                    return shoppingCartPersistence;
320            }
321    
322            /**
323             * Sets the shopping cart persistence.
324             *
325             * @param shoppingCartPersistence the shopping cart persistence
326             */
327            public void setShoppingCartPersistence(
328                    ShoppingCartPersistence shoppingCartPersistence) {
329                    this.shoppingCartPersistence = shoppingCartPersistence;
330            }
331    
332            /**
333             * Returns the shopping category local service.
334             *
335             * @return the shopping category local service
336             */
337            public com.liferay.portlet.shopping.service.ShoppingCategoryLocalService getShoppingCategoryLocalService() {
338                    return shoppingCategoryLocalService;
339            }
340    
341            /**
342             * Sets the shopping category local service.
343             *
344             * @param shoppingCategoryLocalService the shopping category local service
345             */
346            public void setShoppingCategoryLocalService(
347                    com.liferay.portlet.shopping.service.ShoppingCategoryLocalService shoppingCategoryLocalService) {
348                    this.shoppingCategoryLocalService = shoppingCategoryLocalService;
349            }
350    
351            /**
352             * Returns the shopping category remote service.
353             *
354             * @return the shopping category remote service
355             */
356            public com.liferay.portlet.shopping.service.ShoppingCategoryService getShoppingCategoryService() {
357                    return shoppingCategoryService;
358            }
359    
360            /**
361             * Sets the shopping category remote service.
362             *
363             * @param shoppingCategoryService the shopping category remote service
364             */
365            public void setShoppingCategoryService(
366                    com.liferay.portlet.shopping.service.ShoppingCategoryService shoppingCategoryService) {
367                    this.shoppingCategoryService = shoppingCategoryService;
368            }
369    
370            /**
371             * Returns the shopping category persistence.
372             *
373             * @return the shopping category persistence
374             */
375            public ShoppingCategoryPersistence getShoppingCategoryPersistence() {
376                    return shoppingCategoryPersistence;
377            }
378    
379            /**
380             * Sets the shopping category persistence.
381             *
382             * @param shoppingCategoryPersistence the shopping category persistence
383             */
384            public void setShoppingCategoryPersistence(
385                    ShoppingCategoryPersistence shoppingCategoryPersistence) {
386                    this.shoppingCategoryPersistence = shoppingCategoryPersistence;
387            }
388    
389            /**
390             * Returns the shopping coupon local service.
391             *
392             * @return the shopping coupon local service
393             */
394            public com.liferay.portlet.shopping.service.ShoppingCouponLocalService getShoppingCouponLocalService() {
395                    return shoppingCouponLocalService;
396            }
397    
398            /**
399             * Sets the shopping coupon local service.
400             *
401             * @param shoppingCouponLocalService the shopping coupon local service
402             */
403            public void setShoppingCouponLocalService(
404                    com.liferay.portlet.shopping.service.ShoppingCouponLocalService shoppingCouponLocalService) {
405                    this.shoppingCouponLocalService = shoppingCouponLocalService;
406            }
407    
408            /**
409             * Returns the shopping coupon remote service.
410             *
411             * @return the shopping coupon remote service
412             */
413            public com.liferay.portlet.shopping.service.ShoppingCouponService getShoppingCouponService() {
414                    return shoppingCouponService;
415            }
416    
417            /**
418             * Sets the shopping coupon remote service.
419             *
420             * @param shoppingCouponService the shopping coupon remote service
421             */
422            public void setShoppingCouponService(
423                    com.liferay.portlet.shopping.service.ShoppingCouponService shoppingCouponService) {
424                    this.shoppingCouponService = shoppingCouponService;
425            }
426    
427            /**
428             * Returns the shopping coupon persistence.
429             *
430             * @return the shopping coupon persistence
431             */
432            public ShoppingCouponPersistence getShoppingCouponPersistence() {
433                    return shoppingCouponPersistence;
434            }
435    
436            /**
437             * Sets the shopping coupon persistence.
438             *
439             * @param shoppingCouponPersistence the shopping coupon persistence
440             */
441            public void setShoppingCouponPersistence(
442                    ShoppingCouponPersistence shoppingCouponPersistence) {
443                    this.shoppingCouponPersistence = shoppingCouponPersistence;
444            }
445    
446            /**
447             * Returns the shopping coupon finder.
448             *
449             * @return the shopping coupon finder
450             */
451            public ShoppingCouponFinder getShoppingCouponFinder() {
452                    return shoppingCouponFinder;
453            }
454    
455            /**
456             * Sets the shopping coupon finder.
457             *
458             * @param shoppingCouponFinder the shopping coupon finder
459             */
460            public void setShoppingCouponFinder(
461                    ShoppingCouponFinder shoppingCouponFinder) {
462                    this.shoppingCouponFinder = shoppingCouponFinder;
463            }
464    
465            /**
466             * Returns the shopping item local service.
467             *
468             * @return the shopping item local service
469             */
470            public com.liferay.portlet.shopping.service.ShoppingItemLocalService getShoppingItemLocalService() {
471                    return shoppingItemLocalService;
472            }
473    
474            /**
475             * Sets the shopping item local service.
476             *
477             * @param shoppingItemLocalService the shopping item local service
478             */
479            public void setShoppingItemLocalService(
480                    com.liferay.portlet.shopping.service.ShoppingItemLocalService shoppingItemLocalService) {
481                    this.shoppingItemLocalService = shoppingItemLocalService;
482            }
483    
484            /**
485             * Returns the shopping item remote service.
486             *
487             * @return the shopping item remote service
488             */
489            public com.liferay.portlet.shopping.service.ShoppingItemService getShoppingItemService() {
490                    return shoppingItemService;
491            }
492    
493            /**
494             * Sets the shopping item remote service.
495             *
496             * @param shoppingItemService the shopping item remote service
497             */
498            public void setShoppingItemService(
499                    com.liferay.portlet.shopping.service.ShoppingItemService shoppingItemService) {
500                    this.shoppingItemService = shoppingItemService;
501            }
502    
503            /**
504             * Returns the shopping item persistence.
505             *
506             * @return the shopping item persistence
507             */
508            public ShoppingItemPersistence getShoppingItemPersistence() {
509                    return shoppingItemPersistence;
510            }
511    
512            /**
513             * Sets the shopping item persistence.
514             *
515             * @param shoppingItemPersistence the shopping item persistence
516             */
517            public void setShoppingItemPersistence(
518                    ShoppingItemPersistence shoppingItemPersistence) {
519                    this.shoppingItemPersistence = shoppingItemPersistence;
520            }
521    
522            /**
523             * Returns the shopping item finder.
524             *
525             * @return the shopping item finder
526             */
527            public ShoppingItemFinder getShoppingItemFinder() {
528                    return shoppingItemFinder;
529            }
530    
531            /**
532             * Sets the shopping item finder.
533             *
534             * @param shoppingItemFinder the shopping item finder
535             */
536            public void setShoppingItemFinder(ShoppingItemFinder shoppingItemFinder) {
537                    this.shoppingItemFinder = shoppingItemFinder;
538            }
539    
540            /**
541             * Returns the shopping item field local service.
542             *
543             * @return the shopping item field local service
544             */
545            public com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService getShoppingItemFieldLocalService() {
546                    return shoppingItemFieldLocalService;
547            }
548    
549            /**
550             * Sets the shopping item field local service.
551             *
552             * @param shoppingItemFieldLocalService the shopping item field local service
553             */
554            public void setShoppingItemFieldLocalService(
555                    com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService shoppingItemFieldLocalService) {
556                    this.shoppingItemFieldLocalService = shoppingItemFieldLocalService;
557            }
558    
559            /**
560             * Returns the shopping item field persistence.
561             *
562             * @return the shopping item field persistence
563             */
564            public ShoppingItemFieldPersistence getShoppingItemFieldPersistence() {
565                    return shoppingItemFieldPersistence;
566            }
567    
568            /**
569             * Sets the shopping item field persistence.
570             *
571             * @param shoppingItemFieldPersistence the shopping item field persistence
572             */
573            public void setShoppingItemFieldPersistence(
574                    ShoppingItemFieldPersistence shoppingItemFieldPersistence) {
575                    this.shoppingItemFieldPersistence = shoppingItemFieldPersistence;
576            }
577    
578            /**
579             * Returns the shopping item price local service.
580             *
581             * @return the shopping item price local service
582             */
583            public com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService getShoppingItemPriceLocalService() {
584                    return shoppingItemPriceLocalService;
585            }
586    
587            /**
588             * Sets the shopping item price local service.
589             *
590             * @param shoppingItemPriceLocalService the shopping item price local service
591             */
592            public void setShoppingItemPriceLocalService(
593                    com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService shoppingItemPriceLocalService) {
594                    this.shoppingItemPriceLocalService = shoppingItemPriceLocalService;
595            }
596    
597            /**
598             * Returns the shopping item price persistence.
599             *
600             * @return the shopping item price persistence
601             */
602            public ShoppingItemPricePersistence getShoppingItemPricePersistence() {
603                    return shoppingItemPricePersistence;
604            }
605    
606            /**
607             * Sets the shopping item price persistence.
608             *
609             * @param shoppingItemPricePersistence the shopping item price persistence
610             */
611            public void setShoppingItemPricePersistence(
612                    ShoppingItemPricePersistence shoppingItemPricePersistence) {
613                    this.shoppingItemPricePersistence = shoppingItemPricePersistence;
614            }
615    
616            /**
617             * Returns the shopping order local service.
618             *
619             * @return the shopping order local service
620             */
621            public com.liferay.portlet.shopping.service.ShoppingOrderLocalService getShoppingOrderLocalService() {
622                    return shoppingOrderLocalService;
623            }
624    
625            /**
626             * Sets the shopping order local service.
627             *
628             * @param shoppingOrderLocalService the shopping order local service
629             */
630            public void setShoppingOrderLocalService(
631                    com.liferay.portlet.shopping.service.ShoppingOrderLocalService shoppingOrderLocalService) {
632                    this.shoppingOrderLocalService = shoppingOrderLocalService;
633            }
634    
635            /**
636             * Returns the shopping order remote service.
637             *
638             * @return the shopping order remote service
639             */
640            public com.liferay.portlet.shopping.service.ShoppingOrderService getShoppingOrderService() {
641                    return shoppingOrderService;
642            }
643    
644            /**
645             * Sets the shopping order remote service.
646             *
647             * @param shoppingOrderService the shopping order remote service
648             */
649            public void setShoppingOrderService(
650                    com.liferay.portlet.shopping.service.ShoppingOrderService shoppingOrderService) {
651                    this.shoppingOrderService = shoppingOrderService;
652            }
653    
654            /**
655             * Returns the shopping order persistence.
656             *
657             * @return the shopping order persistence
658             */
659            public ShoppingOrderPersistence getShoppingOrderPersistence() {
660                    return shoppingOrderPersistence;
661            }
662    
663            /**
664             * Sets the shopping order persistence.
665             *
666             * @param shoppingOrderPersistence the shopping order persistence
667             */
668            public void setShoppingOrderPersistence(
669                    ShoppingOrderPersistence shoppingOrderPersistence) {
670                    this.shoppingOrderPersistence = shoppingOrderPersistence;
671            }
672    
673            /**
674             * Returns the shopping order finder.
675             *
676             * @return the shopping order finder
677             */
678            public ShoppingOrderFinder getShoppingOrderFinder() {
679                    return shoppingOrderFinder;
680            }
681    
682            /**
683             * Sets the shopping order finder.
684             *
685             * @param shoppingOrderFinder the shopping order finder
686             */
687            public void setShoppingOrderFinder(ShoppingOrderFinder shoppingOrderFinder) {
688                    this.shoppingOrderFinder = shoppingOrderFinder;
689            }
690    
691            /**
692             * Returns the shopping order item local service.
693             *
694             * @return the shopping order item local service
695             */
696            public com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService getShoppingOrderItemLocalService() {
697                    return shoppingOrderItemLocalService;
698            }
699    
700            /**
701             * Sets the shopping order item local service.
702             *
703             * @param shoppingOrderItemLocalService the shopping order item local service
704             */
705            public void setShoppingOrderItemLocalService(
706                    com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService shoppingOrderItemLocalService) {
707                    this.shoppingOrderItemLocalService = shoppingOrderItemLocalService;
708            }
709    
710            /**
711             * Returns the shopping order item persistence.
712             *
713             * @return the shopping order item persistence
714             */
715            public ShoppingOrderItemPersistence getShoppingOrderItemPersistence() {
716                    return shoppingOrderItemPersistence;
717            }
718    
719            /**
720             * Sets the shopping order item persistence.
721             *
722             * @param shoppingOrderItemPersistence the shopping order item persistence
723             */
724            public void setShoppingOrderItemPersistence(
725                    ShoppingOrderItemPersistence shoppingOrderItemPersistence) {
726                    this.shoppingOrderItemPersistence = shoppingOrderItemPersistence;
727            }
728    
729            /**
730             * Returns the counter local service.
731             *
732             * @return the counter local service
733             */
734            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
735                    return counterLocalService;
736            }
737    
738            /**
739             * Sets the counter local service.
740             *
741             * @param counterLocalService the counter local service
742             */
743            public void setCounterLocalService(
744                    com.liferay.counter.service.CounterLocalService counterLocalService) {
745                    this.counterLocalService = counterLocalService;
746            }
747    
748            /**
749             * Returns the resource local service.
750             *
751             * @return the resource local service
752             */
753            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
754                    return resourceLocalService;
755            }
756    
757            /**
758             * Sets the resource local service.
759             *
760             * @param resourceLocalService the resource local service
761             */
762            public void setResourceLocalService(
763                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
764                    this.resourceLocalService = resourceLocalService;
765            }
766    
767            /**
768             * Returns the user local service.
769             *
770             * @return the user local service
771             */
772            public com.liferay.portal.service.UserLocalService getUserLocalService() {
773                    return userLocalService;
774            }
775    
776            /**
777             * Sets the user local service.
778             *
779             * @param userLocalService the user local service
780             */
781            public void setUserLocalService(
782                    com.liferay.portal.service.UserLocalService userLocalService) {
783                    this.userLocalService = userLocalService;
784            }
785    
786            /**
787             * Returns the user remote service.
788             *
789             * @return the user remote service
790             */
791            public com.liferay.portal.service.UserService getUserService() {
792                    return userService;
793            }
794    
795            /**
796             * Sets the user remote service.
797             *
798             * @param userService the user remote service
799             */
800            public void setUserService(
801                    com.liferay.portal.service.UserService userService) {
802                    this.userService = userService;
803            }
804    
805            /**
806             * Returns the user persistence.
807             *
808             * @return the user persistence
809             */
810            public UserPersistence getUserPersistence() {
811                    return userPersistence;
812            }
813    
814            /**
815             * Sets the user persistence.
816             *
817             * @param userPersistence the user persistence
818             */
819            public void setUserPersistence(UserPersistence userPersistence) {
820                    this.userPersistence = userPersistence;
821            }
822    
823            /**
824             * Returns the user finder.
825             *
826             * @return the user finder
827             */
828            public UserFinder getUserFinder() {
829                    return userFinder;
830            }
831    
832            /**
833             * Sets the user finder.
834             *
835             * @param userFinder the user finder
836             */
837            public void setUserFinder(UserFinder userFinder) {
838                    this.userFinder = userFinder;
839            }
840    
841            public void afterPropertiesSet() {
842                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.shopping.model.ShoppingCoupon",
843                            shoppingCouponLocalService);
844            }
845    
846            public void destroy() {
847                    persistedModelLocalServiceRegistry.unregister(
848                            "com.liferay.portlet.shopping.model.ShoppingCoupon");
849            }
850    
851            /**
852             * Returns the Spring bean ID for this bean.
853             *
854             * @return the Spring bean ID for this bean
855             */
856            @Override
857            public String getBeanIdentifier() {
858                    return _beanIdentifier;
859            }
860    
861            /**
862             * Sets the Spring bean ID for this bean.
863             *
864             * @param beanIdentifier the Spring bean ID for this bean
865             */
866            @Override
867            public void setBeanIdentifier(String beanIdentifier) {
868                    _beanIdentifier = beanIdentifier;
869            }
870    
871            protected Class<?> getModelClass() {
872                    return ShoppingCoupon.class;
873            }
874    
875            protected String getModelClassName() {
876                    return ShoppingCoupon.class.getName();
877            }
878    
879            /**
880             * Performs an SQL query.
881             *
882             * @param sql the sql query
883             */
884            protected void runSQL(String sql) throws SystemException {
885                    try {
886                            DataSource dataSource = shoppingCouponPersistence.getDataSource();
887    
888                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
889                                            sql, new int[0]);
890    
891                            sqlUpdate.update();
892                    }
893                    catch (Exception e) {
894                            throw new SystemException(e);
895                    }
896            }
897    
898            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingCartLocalService.class)
899            protected com.liferay.portlet.shopping.service.ShoppingCartLocalService shoppingCartLocalService;
900            @BeanReference(type = ShoppingCartPersistence.class)
901            protected ShoppingCartPersistence shoppingCartPersistence;
902            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingCategoryLocalService.class)
903            protected com.liferay.portlet.shopping.service.ShoppingCategoryLocalService shoppingCategoryLocalService;
904            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingCategoryService.class)
905            protected com.liferay.portlet.shopping.service.ShoppingCategoryService shoppingCategoryService;
906            @BeanReference(type = ShoppingCategoryPersistence.class)
907            protected ShoppingCategoryPersistence shoppingCategoryPersistence;
908            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingCouponLocalService.class)
909            protected com.liferay.portlet.shopping.service.ShoppingCouponLocalService shoppingCouponLocalService;
910            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingCouponService.class)
911            protected com.liferay.portlet.shopping.service.ShoppingCouponService shoppingCouponService;
912            @BeanReference(type = ShoppingCouponPersistence.class)
913            protected ShoppingCouponPersistence shoppingCouponPersistence;
914            @BeanReference(type = ShoppingCouponFinder.class)
915            protected ShoppingCouponFinder shoppingCouponFinder;
916            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemLocalService.class)
917            protected com.liferay.portlet.shopping.service.ShoppingItemLocalService shoppingItemLocalService;
918            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemService.class)
919            protected com.liferay.portlet.shopping.service.ShoppingItemService shoppingItemService;
920            @BeanReference(type = ShoppingItemPersistence.class)
921            protected ShoppingItemPersistence shoppingItemPersistence;
922            @BeanReference(type = ShoppingItemFinder.class)
923            protected ShoppingItemFinder shoppingItemFinder;
924            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService.class)
925            protected com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService shoppingItemFieldLocalService;
926            @BeanReference(type = ShoppingItemFieldPersistence.class)
927            protected ShoppingItemFieldPersistence shoppingItemFieldPersistence;
928            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService.class)
929            protected com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService shoppingItemPriceLocalService;
930            @BeanReference(type = ShoppingItemPricePersistence.class)
931            protected ShoppingItemPricePersistence shoppingItemPricePersistence;
932            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingOrderLocalService.class)
933            protected com.liferay.portlet.shopping.service.ShoppingOrderLocalService shoppingOrderLocalService;
934            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingOrderService.class)
935            protected com.liferay.portlet.shopping.service.ShoppingOrderService shoppingOrderService;
936            @BeanReference(type = ShoppingOrderPersistence.class)
937            protected ShoppingOrderPersistence shoppingOrderPersistence;
938            @BeanReference(type = ShoppingOrderFinder.class)
939            protected ShoppingOrderFinder shoppingOrderFinder;
940            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService.class)
941            protected com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService shoppingOrderItemLocalService;
942            @BeanReference(type = ShoppingOrderItemPersistence.class)
943            protected ShoppingOrderItemPersistence shoppingOrderItemPersistence;
944            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
945            protected com.liferay.counter.service.CounterLocalService counterLocalService;
946            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
947            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
948            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
949            protected com.liferay.portal.service.UserLocalService userLocalService;
950            @BeanReference(type = com.liferay.portal.service.UserService.class)
951            protected com.liferay.portal.service.UserService userService;
952            @BeanReference(type = UserPersistence.class)
953            protected UserPersistence userPersistence;
954            @BeanReference(type = UserFinder.class)
955            protected UserFinder userFinder;
956            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
957            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
958            private String _beanIdentifier;
959    }