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