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