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