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 com.liferay.portal.kernel.bean.BeanReference;
018    import com.liferay.portal.kernel.bean.IdentifiableBean;
019    import com.liferay.portal.kernel.dao.db.DB;
020    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.exception.SystemException;
024    import com.liferay.portal.service.BaseServiceImpl;
025    import com.liferay.portal.service.persistence.CompanyPersistence;
026    import com.liferay.portal.service.persistence.SubscriptionPersistence;
027    import com.liferay.portal.service.persistence.UserFinder;
028    import com.liferay.portal.service.persistence.UserPersistence;
029    import com.liferay.portal.util.PortalUtil;
030    
031    import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
032    import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
033    import com.liferay.portlet.shopping.model.ShoppingOrder;
034    import com.liferay.portlet.shopping.service.ShoppingOrderService;
035    import com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence;
036    import com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder;
037    import com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence;
038    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder;
039    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence;
040    import com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence;
041    
042    import javax.sql.DataSource;
043    
044    /**
045     * Provides the base implementation for the shopping order remote service.
046     *
047     * <p>
048     * 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.ShoppingOrderServiceImpl}.
049     * </p>
050     *
051     * @author Brian Wing Shun Chan
052     * @see com.liferay.portlet.shopping.service.impl.ShoppingOrderServiceImpl
053     * @see com.liferay.portlet.shopping.service.ShoppingOrderServiceUtil
054     * @generated
055     */
056    public abstract class ShoppingOrderServiceBaseImpl extends BaseServiceImpl
057            implements ShoppingOrderService, IdentifiableBean {
058            /*
059             * NOTE FOR DEVELOPERS:
060             *
061             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.shopping.service.ShoppingOrderServiceUtil} to access the shopping order remote service.
062             */
063    
064            /**
065             * Returns the shopping order local service.
066             *
067             * @return the shopping order local service
068             */
069            public com.liferay.portlet.shopping.service.ShoppingOrderLocalService getShoppingOrderLocalService() {
070                    return shoppingOrderLocalService;
071            }
072    
073            /**
074             * Sets the shopping order local service.
075             *
076             * @param shoppingOrderLocalService the shopping order local service
077             */
078            public void setShoppingOrderLocalService(
079                    com.liferay.portlet.shopping.service.ShoppingOrderLocalService shoppingOrderLocalService) {
080                    this.shoppingOrderLocalService = shoppingOrderLocalService;
081            }
082    
083            /**
084             * Returns the shopping order remote service.
085             *
086             * @return the shopping order remote service
087             */
088            public ShoppingOrderService getShoppingOrderService() {
089                    return shoppingOrderService;
090            }
091    
092            /**
093             * Sets the shopping order remote service.
094             *
095             * @param shoppingOrderService the shopping order remote service
096             */
097            public void setShoppingOrderService(
098                    ShoppingOrderService shoppingOrderService) {
099                    this.shoppingOrderService = shoppingOrderService;
100            }
101    
102            /**
103             * Returns the shopping order persistence.
104             *
105             * @return the shopping order persistence
106             */
107            public ShoppingOrderPersistence getShoppingOrderPersistence() {
108                    return shoppingOrderPersistence;
109            }
110    
111            /**
112             * Sets the shopping order persistence.
113             *
114             * @param shoppingOrderPersistence the shopping order persistence
115             */
116            public void setShoppingOrderPersistence(
117                    ShoppingOrderPersistence shoppingOrderPersistence) {
118                    this.shoppingOrderPersistence = shoppingOrderPersistence;
119            }
120    
121            /**
122             * Returns the shopping order finder.
123             *
124             * @return the shopping order finder
125             */
126            public ShoppingOrderFinder getShoppingOrderFinder() {
127                    return shoppingOrderFinder;
128            }
129    
130            /**
131             * Sets the shopping order finder.
132             *
133             * @param shoppingOrderFinder the shopping order finder
134             */
135            public void setShoppingOrderFinder(ShoppingOrderFinder shoppingOrderFinder) {
136                    this.shoppingOrderFinder = shoppingOrderFinder;
137            }
138    
139            /**
140             * Returns the counter local service.
141             *
142             * @return the counter local service
143             */
144            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
145                    return counterLocalService;
146            }
147    
148            /**
149             * Sets the counter local service.
150             *
151             * @param counterLocalService the counter local service
152             */
153            public void setCounterLocalService(
154                    com.liferay.counter.service.CounterLocalService counterLocalService) {
155                    this.counterLocalService = counterLocalService;
156            }
157    
158            /**
159             * Returns the mail remote service.
160             *
161             * @return the mail remote service
162             */
163            public com.liferay.mail.service.MailService getMailService() {
164                    return mailService;
165            }
166    
167            /**
168             * Sets the mail remote service.
169             *
170             * @param mailService the mail remote service
171             */
172            public void setMailService(com.liferay.mail.service.MailService mailService) {
173                    this.mailService = mailService;
174            }
175    
176            /**
177             * Returns the company local service.
178             *
179             * @return the company local service
180             */
181            public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() {
182                    return companyLocalService;
183            }
184    
185            /**
186             * Sets the company local service.
187             *
188             * @param companyLocalService the company local service
189             */
190            public void setCompanyLocalService(
191                    com.liferay.portal.service.CompanyLocalService companyLocalService) {
192                    this.companyLocalService = companyLocalService;
193            }
194    
195            /**
196             * Returns the company remote service.
197             *
198             * @return the company remote service
199             */
200            public com.liferay.portal.service.CompanyService getCompanyService() {
201                    return companyService;
202            }
203    
204            /**
205             * Sets the company remote service.
206             *
207             * @param companyService the company remote service
208             */
209            public void setCompanyService(
210                    com.liferay.portal.service.CompanyService companyService) {
211                    this.companyService = companyService;
212            }
213    
214            /**
215             * Returns the company persistence.
216             *
217             * @return the company persistence
218             */
219            public CompanyPersistence getCompanyPersistence() {
220                    return companyPersistence;
221            }
222    
223            /**
224             * Sets the company persistence.
225             *
226             * @param companyPersistence the company persistence
227             */
228            public void setCompanyPersistence(CompanyPersistence companyPersistence) {
229                    this.companyPersistence = companyPersistence;
230            }
231    
232            /**
233             * Returns the subscription local service.
234             *
235             * @return the subscription local service
236             */
237            public com.liferay.portal.service.SubscriptionLocalService getSubscriptionLocalService() {
238                    return subscriptionLocalService;
239            }
240    
241            /**
242             * Sets the subscription local service.
243             *
244             * @param subscriptionLocalService the subscription local service
245             */
246            public void setSubscriptionLocalService(
247                    com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService) {
248                    this.subscriptionLocalService = subscriptionLocalService;
249            }
250    
251            /**
252             * Returns the subscription persistence.
253             *
254             * @return the subscription persistence
255             */
256            public SubscriptionPersistence getSubscriptionPersistence() {
257                    return subscriptionPersistence;
258            }
259    
260            /**
261             * Sets the subscription persistence.
262             *
263             * @param subscriptionPersistence the subscription persistence
264             */
265            public void setSubscriptionPersistence(
266                    SubscriptionPersistence subscriptionPersistence) {
267                    this.subscriptionPersistence = subscriptionPersistence;
268            }
269    
270            /**
271             * Returns the user local service.
272             *
273             * @return the user local service
274             */
275            public com.liferay.portal.service.UserLocalService getUserLocalService() {
276                    return userLocalService;
277            }
278    
279            /**
280             * Sets the user local service.
281             *
282             * @param userLocalService the user local service
283             */
284            public void setUserLocalService(
285                    com.liferay.portal.service.UserLocalService userLocalService) {
286                    this.userLocalService = userLocalService;
287            }
288    
289            /**
290             * Returns the user remote service.
291             *
292             * @return the user remote service
293             */
294            public com.liferay.portal.service.UserService getUserService() {
295                    return userService;
296            }
297    
298            /**
299             * Sets the user remote service.
300             *
301             * @param userService the user remote service
302             */
303            public void setUserService(
304                    com.liferay.portal.service.UserService userService) {
305                    this.userService = userService;
306            }
307    
308            /**
309             * Returns the user persistence.
310             *
311             * @return the user persistence
312             */
313            public UserPersistence getUserPersistence() {
314                    return userPersistence;
315            }
316    
317            /**
318             * Sets the user persistence.
319             *
320             * @param userPersistence the user persistence
321             */
322            public void setUserPersistence(UserPersistence userPersistence) {
323                    this.userPersistence = userPersistence;
324            }
325    
326            /**
327             * Returns the user finder.
328             *
329             * @return the user finder
330             */
331            public UserFinder getUserFinder() {
332                    return userFinder;
333            }
334    
335            /**
336             * Sets the user finder.
337             *
338             * @param userFinder the user finder
339             */
340            public void setUserFinder(UserFinder userFinder) {
341                    this.userFinder = userFinder;
342            }
343    
344            /**
345             * Returns the message-boards message local service.
346             *
347             * @return the message-boards message local service
348             */
349            public com.liferay.portlet.messageboards.service.MBMessageLocalService getMBMessageLocalService() {
350                    return mbMessageLocalService;
351            }
352    
353            /**
354             * Sets the message-boards message local service.
355             *
356             * @param mbMessageLocalService the message-boards message local service
357             */
358            public void setMBMessageLocalService(
359                    com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService) {
360                    this.mbMessageLocalService = mbMessageLocalService;
361            }
362    
363            /**
364             * Returns the message-boards message remote service.
365             *
366             * @return the message-boards message remote service
367             */
368            public com.liferay.portlet.messageboards.service.MBMessageService getMBMessageService() {
369                    return mbMessageService;
370            }
371    
372            /**
373             * Sets the message-boards message remote service.
374             *
375             * @param mbMessageService the message-boards message remote service
376             */
377            public void setMBMessageService(
378                    com.liferay.portlet.messageboards.service.MBMessageService mbMessageService) {
379                    this.mbMessageService = mbMessageService;
380            }
381    
382            /**
383             * Returns the message-boards message persistence.
384             *
385             * @return the message-boards message persistence
386             */
387            public MBMessagePersistence getMBMessagePersistence() {
388                    return mbMessagePersistence;
389            }
390    
391            /**
392             * Sets the message-boards message persistence.
393             *
394             * @param mbMessagePersistence the message-boards message persistence
395             */
396            public void setMBMessagePersistence(
397                    MBMessagePersistence mbMessagePersistence) {
398                    this.mbMessagePersistence = mbMessagePersistence;
399            }
400    
401            /**
402             * Returns the message-boards message finder.
403             *
404             * @return the message-boards message finder
405             */
406            public MBMessageFinder getMBMessageFinder() {
407                    return mbMessageFinder;
408            }
409    
410            /**
411             * Sets the message-boards message finder.
412             *
413             * @param mbMessageFinder the message-boards message finder
414             */
415            public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
416                    this.mbMessageFinder = mbMessageFinder;
417            }
418    
419            /**
420             * Returns the shopping item local service.
421             *
422             * @return the shopping item local service
423             */
424            public com.liferay.portlet.shopping.service.ShoppingItemLocalService getShoppingItemLocalService() {
425                    return shoppingItemLocalService;
426            }
427    
428            /**
429             * Sets the shopping item local service.
430             *
431             * @param shoppingItemLocalService the shopping item local service
432             */
433            public void setShoppingItemLocalService(
434                    com.liferay.portlet.shopping.service.ShoppingItemLocalService shoppingItemLocalService) {
435                    this.shoppingItemLocalService = shoppingItemLocalService;
436            }
437    
438            /**
439             * Returns the shopping item remote service.
440             *
441             * @return the shopping item remote service
442             */
443            public com.liferay.portlet.shopping.service.ShoppingItemService getShoppingItemService() {
444                    return shoppingItemService;
445            }
446    
447            /**
448             * Sets the shopping item remote service.
449             *
450             * @param shoppingItemService the shopping item remote service
451             */
452            public void setShoppingItemService(
453                    com.liferay.portlet.shopping.service.ShoppingItemService shoppingItemService) {
454                    this.shoppingItemService = shoppingItemService;
455            }
456    
457            /**
458             * Returns the shopping item persistence.
459             *
460             * @return the shopping item persistence
461             */
462            public ShoppingItemPersistence getShoppingItemPersistence() {
463                    return shoppingItemPersistence;
464            }
465    
466            /**
467             * Sets the shopping item persistence.
468             *
469             * @param shoppingItemPersistence the shopping item persistence
470             */
471            public void setShoppingItemPersistence(
472                    ShoppingItemPersistence shoppingItemPersistence) {
473                    this.shoppingItemPersistence = shoppingItemPersistence;
474            }
475    
476            /**
477             * Returns the shopping item finder.
478             *
479             * @return the shopping item finder
480             */
481            public ShoppingItemFinder getShoppingItemFinder() {
482                    return shoppingItemFinder;
483            }
484    
485            /**
486             * Sets the shopping item finder.
487             *
488             * @param shoppingItemFinder the shopping item finder
489             */
490            public void setShoppingItemFinder(ShoppingItemFinder shoppingItemFinder) {
491                    this.shoppingItemFinder = shoppingItemFinder;
492            }
493    
494            /**
495             * Returns the shopping item field local service.
496             *
497             * @return the shopping item field local service
498             */
499            public com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService getShoppingItemFieldLocalService() {
500                    return shoppingItemFieldLocalService;
501            }
502    
503            /**
504             * Sets the shopping item field local service.
505             *
506             * @param shoppingItemFieldLocalService the shopping item field local service
507             */
508            public void setShoppingItemFieldLocalService(
509                    com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService shoppingItemFieldLocalService) {
510                    this.shoppingItemFieldLocalService = shoppingItemFieldLocalService;
511            }
512    
513            /**
514             * Returns the shopping item field persistence.
515             *
516             * @return the shopping item field persistence
517             */
518            public ShoppingItemFieldPersistence getShoppingItemFieldPersistence() {
519                    return shoppingItemFieldPersistence;
520            }
521    
522            /**
523             * Sets the shopping item field persistence.
524             *
525             * @param shoppingItemFieldPersistence the shopping item field persistence
526             */
527            public void setShoppingItemFieldPersistence(
528                    ShoppingItemFieldPersistence shoppingItemFieldPersistence) {
529                    this.shoppingItemFieldPersistence = shoppingItemFieldPersistence;
530            }
531    
532            /**
533             * Returns the shopping order item local service.
534             *
535             * @return the shopping order item local service
536             */
537            public com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService getShoppingOrderItemLocalService() {
538                    return shoppingOrderItemLocalService;
539            }
540    
541            /**
542             * Sets the shopping order item local service.
543             *
544             * @param shoppingOrderItemLocalService the shopping order item local service
545             */
546            public void setShoppingOrderItemLocalService(
547                    com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService shoppingOrderItemLocalService) {
548                    this.shoppingOrderItemLocalService = shoppingOrderItemLocalService;
549            }
550    
551            /**
552             * Returns the shopping order item persistence.
553             *
554             * @return the shopping order item persistence
555             */
556            public ShoppingOrderItemPersistence getShoppingOrderItemPersistence() {
557                    return shoppingOrderItemPersistence;
558            }
559    
560            /**
561             * Sets the shopping order item persistence.
562             *
563             * @param shoppingOrderItemPersistence the shopping order item persistence
564             */
565            public void setShoppingOrderItemPersistence(
566                    ShoppingOrderItemPersistence shoppingOrderItemPersistence) {
567                    this.shoppingOrderItemPersistence = shoppingOrderItemPersistence;
568            }
569    
570            public void afterPropertiesSet() {
571            }
572    
573            public void destroy() {
574            }
575    
576            /**
577             * Returns the Spring bean ID for this bean.
578             *
579             * @return the Spring bean ID for this bean
580             */
581            @Override
582            public String getBeanIdentifier() {
583                    return _beanIdentifier;
584            }
585    
586            /**
587             * Sets the Spring bean ID for this bean.
588             *
589             * @param beanIdentifier the Spring bean ID for this bean
590             */
591            @Override
592            public void setBeanIdentifier(String beanIdentifier) {
593                    _beanIdentifier = beanIdentifier;
594            }
595    
596            protected Class<?> getModelClass() {
597                    return ShoppingOrder.class;
598            }
599    
600            protected String getModelClassName() {
601                    return ShoppingOrder.class.getName();
602            }
603    
604            /**
605             * Performs a SQL query.
606             *
607             * @param sql the sql query
608             */
609            protected void runSQL(String sql) {
610                    try {
611                            DataSource dataSource = shoppingOrderPersistence.getDataSource();
612    
613                            DB db = DBFactoryUtil.getDB();
614    
615                            sql = db.buildSQL(sql);
616                            sql = PortalUtil.transformSQL(sql);
617    
618                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
619                                            sql, new int[0]);
620    
621                            sqlUpdate.update();
622                    }
623                    catch (Exception e) {
624                            throw new SystemException(e);
625                    }
626            }
627    
628            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingOrderLocalService.class)
629            protected com.liferay.portlet.shopping.service.ShoppingOrderLocalService shoppingOrderLocalService;
630            @BeanReference(type = ShoppingOrderService.class)
631            protected ShoppingOrderService shoppingOrderService;
632            @BeanReference(type = ShoppingOrderPersistence.class)
633            protected ShoppingOrderPersistence shoppingOrderPersistence;
634            @BeanReference(type = ShoppingOrderFinder.class)
635            protected ShoppingOrderFinder shoppingOrderFinder;
636            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
637            protected com.liferay.counter.service.CounterLocalService counterLocalService;
638            @BeanReference(type = com.liferay.mail.service.MailService.class)
639            protected com.liferay.mail.service.MailService mailService;
640            @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class)
641            protected com.liferay.portal.service.CompanyLocalService companyLocalService;
642            @BeanReference(type = com.liferay.portal.service.CompanyService.class)
643            protected com.liferay.portal.service.CompanyService companyService;
644            @BeanReference(type = CompanyPersistence.class)
645            protected CompanyPersistence companyPersistence;
646            @BeanReference(type = com.liferay.portal.service.SubscriptionLocalService.class)
647            protected com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService;
648            @BeanReference(type = SubscriptionPersistence.class)
649            protected SubscriptionPersistence subscriptionPersistence;
650            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
651            protected com.liferay.portal.service.UserLocalService userLocalService;
652            @BeanReference(type = com.liferay.portal.service.UserService.class)
653            protected com.liferay.portal.service.UserService userService;
654            @BeanReference(type = UserPersistence.class)
655            protected UserPersistence userPersistence;
656            @BeanReference(type = UserFinder.class)
657            protected UserFinder userFinder;
658            @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageLocalService.class)
659            protected com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService;
660            @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageService.class)
661            protected com.liferay.portlet.messageboards.service.MBMessageService mbMessageService;
662            @BeanReference(type = MBMessagePersistence.class)
663            protected MBMessagePersistence mbMessagePersistence;
664            @BeanReference(type = MBMessageFinder.class)
665            protected MBMessageFinder mbMessageFinder;
666            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemLocalService.class)
667            protected com.liferay.portlet.shopping.service.ShoppingItemLocalService shoppingItemLocalService;
668            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemService.class)
669            protected com.liferay.portlet.shopping.service.ShoppingItemService shoppingItemService;
670            @BeanReference(type = ShoppingItemPersistence.class)
671            protected ShoppingItemPersistence shoppingItemPersistence;
672            @BeanReference(type = ShoppingItemFinder.class)
673            protected ShoppingItemFinder shoppingItemFinder;
674            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService.class)
675            protected com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService shoppingItemFieldLocalService;
676            @BeanReference(type = ShoppingItemFieldPersistence.class)
677            protected ShoppingItemFieldPersistence shoppingItemFieldPersistence;
678            @BeanReference(type = com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService.class)
679            protected com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService shoppingOrderItemLocalService;
680            @BeanReference(type = ShoppingOrderItemPersistence.class)
681            protected ShoppingOrderItemPersistence shoppingOrderItemPersistence;
682            private String _beanIdentifier;
683    }