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