1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.shopping.service.base;
24  
25  import com.liferay.counter.service.CounterLocalService;
26  import com.liferay.counter.service.CounterService;
27  
28  import com.liferay.portal.PortalException;
29  import com.liferay.portal.SystemException;
30  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
31  import com.liferay.portal.service.ImageLocalService;
32  import com.liferay.portal.service.ResourceLocalService;
33  import com.liferay.portal.service.ResourceService;
34  import com.liferay.portal.service.UserLocalService;
35  import com.liferay.portal.service.UserService;
36  import com.liferay.portal.service.persistence.ImagePersistence;
37  import com.liferay.portal.service.persistence.ResourceFinder;
38  import com.liferay.portal.service.persistence.ResourcePersistence;
39  import com.liferay.portal.service.persistence.UserFinder;
40  import com.liferay.portal.service.persistence.UserPersistence;
41  
42  import com.liferay.portlet.shopping.model.ShoppingItem;
43  import com.liferay.portlet.shopping.service.ShoppingCartLocalService;
44  import com.liferay.portlet.shopping.service.ShoppingCategoryLocalService;
45  import com.liferay.portlet.shopping.service.ShoppingCategoryService;
46  import com.liferay.portlet.shopping.service.ShoppingCouponLocalService;
47  import com.liferay.portlet.shopping.service.ShoppingCouponService;
48  import com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService;
49  import com.liferay.portlet.shopping.service.ShoppingItemLocalService;
50  import com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService;
51  import com.liferay.portlet.shopping.service.ShoppingItemService;
52  import com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService;
53  import com.liferay.portlet.shopping.service.ShoppingOrderLocalService;
54  import com.liferay.portlet.shopping.service.ShoppingOrderService;
55  import com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence;
56  import com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence;
57  import com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder;
58  import com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence;
59  import com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence;
60  import com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder;
61  import com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence;
62  import com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence;
63  import com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder;
64  import com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence;
65  import com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence;
66  
67  import java.util.List;
68  
69  /**
70   * <a href="ShoppingItemLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
71   *
72   * @author Brian Wing Shun Chan
73   *
74   */
75  public abstract class ShoppingItemLocalServiceBaseImpl
76      implements ShoppingItemLocalService {
77      public ShoppingItem addShoppingItem(ShoppingItem shoppingItem)
78          throws SystemException {
79          shoppingItem.setNew(true);
80  
81          return shoppingItemPersistence.update(shoppingItem, false);
82      }
83  
84      public ShoppingItem createShoppingItem(long itemId) {
85          return shoppingItemPersistence.create(itemId);
86      }
87  
88      public void deleteShoppingItem(long itemId)
89          throws PortalException, SystemException {
90          shoppingItemPersistence.remove(itemId);
91      }
92  
93      public void deleteShoppingItem(ShoppingItem shoppingItem)
94          throws SystemException {
95          shoppingItemPersistence.remove(shoppingItem);
96      }
97  
98      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
99          throws SystemException {
100         return shoppingItemPersistence.findWithDynamicQuery(dynamicQuery);
101     }
102 
103     public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
104         int end) throws SystemException {
105         return shoppingItemPersistence.findWithDynamicQuery(dynamicQuery,
106             start, end);
107     }
108 
109     public ShoppingItem getShoppingItem(long itemId)
110         throws PortalException, SystemException {
111         return shoppingItemPersistence.findByPrimaryKey(itemId);
112     }
113 
114     public List<ShoppingItem> getShoppingItems(int start, int end)
115         throws SystemException {
116         return shoppingItemPersistence.findAll(start, end);
117     }
118 
119     public int getShoppingItemsCount() throws SystemException {
120         return shoppingItemPersistence.countAll();
121     }
122 
123     public ShoppingItem updateShoppingItem(ShoppingItem shoppingItem)
124         throws SystemException {
125         shoppingItem.setNew(false);
126 
127         return shoppingItemPersistence.update(shoppingItem, true);
128     }
129 
130     public ShoppingCartLocalService getShoppingCartLocalService() {
131         return shoppingCartLocalService;
132     }
133 
134     public void setShoppingCartLocalService(
135         ShoppingCartLocalService shoppingCartLocalService) {
136         this.shoppingCartLocalService = shoppingCartLocalService;
137     }
138 
139     public ShoppingCartPersistence getShoppingCartPersistence() {
140         return shoppingCartPersistence;
141     }
142 
143     public void setShoppingCartPersistence(
144         ShoppingCartPersistence shoppingCartPersistence) {
145         this.shoppingCartPersistence = shoppingCartPersistence;
146     }
147 
148     public ShoppingCategoryLocalService getShoppingCategoryLocalService() {
149         return shoppingCategoryLocalService;
150     }
151 
152     public void setShoppingCategoryLocalService(
153         ShoppingCategoryLocalService shoppingCategoryLocalService) {
154         this.shoppingCategoryLocalService = shoppingCategoryLocalService;
155     }
156 
157     public ShoppingCategoryService getShoppingCategoryService() {
158         return shoppingCategoryService;
159     }
160 
161     public void setShoppingCategoryService(
162         ShoppingCategoryService shoppingCategoryService) {
163         this.shoppingCategoryService = shoppingCategoryService;
164     }
165 
166     public ShoppingCategoryPersistence getShoppingCategoryPersistence() {
167         return shoppingCategoryPersistence;
168     }
169 
170     public void setShoppingCategoryPersistence(
171         ShoppingCategoryPersistence shoppingCategoryPersistence) {
172         this.shoppingCategoryPersistence = shoppingCategoryPersistence;
173     }
174 
175     public ShoppingCouponLocalService getShoppingCouponLocalService() {
176         return shoppingCouponLocalService;
177     }
178 
179     public void setShoppingCouponLocalService(
180         ShoppingCouponLocalService shoppingCouponLocalService) {
181         this.shoppingCouponLocalService = shoppingCouponLocalService;
182     }
183 
184     public ShoppingCouponService getShoppingCouponService() {
185         return shoppingCouponService;
186     }
187 
188     public void setShoppingCouponService(
189         ShoppingCouponService shoppingCouponService) {
190         this.shoppingCouponService = shoppingCouponService;
191     }
192 
193     public ShoppingCouponPersistence getShoppingCouponPersistence() {
194         return shoppingCouponPersistence;
195     }
196 
197     public void setShoppingCouponPersistence(
198         ShoppingCouponPersistence shoppingCouponPersistence) {
199         this.shoppingCouponPersistence = shoppingCouponPersistence;
200     }
201 
202     public ShoppingCouponFinder getShoppingCouponFinder() {
203         return shoppingCouponFinder;
204     }
205 
206     public void setShoppingCouponFinder(
207         ShoppingCouponFinder shoppingCouponFinder) {
208         this.shoppingCouponFinder = shoppingCouponFinder;
209     }
210 
211     public ShoppingItemLocalService getShoppingItemLocalService() {
212         return shoppingItemLocalService;
213     }
214 
215     public void setShoppingItemLocalService(
216         ShoppingItemLocalService shoppingItemLocalService) {
217         this.shoppingItemLocalService = shoppingItemLocalService;
218     }
219 
220     public ShoppingItemService getShoppingItemService() {
221         return shoppingItemService;
222     }
223 
224     public void setShoppingItemService(ShoppingItemService shoppingItemService) {
225         this.shoppingItemService = shoppingItemService;
226     }
227 
228     public ShoppingItemPersistence getShoppingItemPersistence() {
229         return shoppingItemPersistence;
230     }
231 
232     public void setShoppingItemPersistence(
233         ShoppingItemPersistence shoppingItemPersistence) {
234         this.shoppingItemPersistence = shoppingItemPersistence;
235     }
236 
237     public ShoppingItemFinder getShoppingItemFinder() {
238         return shoppingItemFinder;
239     }
240 
241     public void setShoppingItemFinder(ShoppingItemFinder shoppingItemFinder) {
242         this.shoppingItemFinder = shoppingItemFinder;
243     }
244 
245     public ShoppingItemFieldLocalService getShoppingItemFieldLocalService() {
246         return shoppingItemFieldLocalService;
247     }
248 
249     public void setShoppingItemFieldLocalService(
250         ShoppingItemFieldLocalService shoppingItemFieldLocalService) {
251         this.shoppingItemFieldLocalService = shoppingItemFieldLocalService;
252     }
253 
254     public ShoppingItemFieldPersistence getShoppingItemFieldPersistence() {
255         return shoppingItemFieldPersistence;
256     }
257 
258     public void setShoppingItemFieldPersistence(
259         ShoppingItemFieldPersistence shoppingItemFieldPersistence) {
260         this.shoppingItemFieldPersistence = shoppingItemFieldPersistence;
261     }
262 
263     public ShoppingItemPriceLocalService getShoppingItemPriceLocalService() {
264         return shoppingItemPriceLocalService;
265     }
266 
267     public void setShoppingItemPriceLocalService(
268         ShoppingItemPriceLocalService shoppingItemPriceLocalService) {
269         this.shoppingItemPriceLocalService = shoppingItemPriceLocalService;
270     }
271 
272     public ShoppingItemPricePersistence getShoppingItemPricePersistence() {
273         return shoppingItemPricePersistence;
274     }
275 
276     public void setShoppingItemPricePersistence(
277         ShoppingItemPricePersistence shoppingItemPricePersistence) {
278         this.shoppingItemPricePersistence = shoppingItemPricePersistence;
279     }
280 
281     public ShoppingOrderLocalService getShoppingOrderLocalService() {
282         return shoppingOrderLocalService;
283     }
284 
285     public void setShoppingOrderLocalService(
286         ShoppingOrderLocalService shoppingOrderLocalService) {
287         this.shoppingOrderLocalService = shoppingOrderLocalService;
288     }
289 
290     public ShoppingOrderService getShoppingOrderService() {
291         return shoppingOrderService;
292     }
293 
294     public void setShoppingOrderService(
295         ShoppingOrderService shoppingOrderService) {
296         this.shoppingOrderService = shoppingOrderService;
297     }
298 
299     public ShoppingOrderPersistence getShoppingOrderPersistence() {
300         return shoppingOrderPersistence;
301     }
302 
303     public void setShoppingOrderPersistence(
304         ShoppingOrderPersistence shoppingOrderPersistence) {
305         this.shoppingOrderPersistence = shoppingOrderPersistence;
306     }
307 
308     public ShoppingOrderFinder getShoppingOrderFinder() {
309         return shoppingOrderFinder;
310     }
311 
312     public void setShoppingOrderFinder(ShoppingOrderFinder shoppingOrderFinder) {
313         this.shoppingOrderFinder = shoppingOrderFinder;
314     }
315 
316     public ShoppingOrderItemLocalService getShoppingOrderItemLocalService() {
317         return shoppingOrderItemLocalService;
318     }
319 
320     public void setShoppingOrderItemLocalService(
321         ShoppingOrderItemLocalService shoppingOrderItemLocalService) {
322         this.shoppingOrderItemLocalService = shoppingOrderItemLocalService;
323     }
324 
325     public ShoppingOrderItemPersistence getShoppingOrderItemPersistence() {
326         return shoppingOrderItemPersistence;
327     }
328 
329     public void setShoppingOrderItemPersistence(
330         ShoppingOrderItemPersistence shoppingOrderItemPersistence) {
331         this.shoppingOrderItemPersistence = shoppingOrderItemPersistence;
332     }
333 
334     public CounterLocalService getCounterLocalService() {
335         return counterLocalService;
336     }
337 
338     public void setCounterLocalService(CounterLocalService counterLocalService) {
339         this.counterLocalService = counterLocalService;
340     }
341 
342     public CounterService getCounterService() {
343         return counterService;
344     }
345 
346     public void setCounterService(CounterService counterService) {
347         this.counterService = counterService;
348     }
349 
350     public ImageLocalService getImageLocalService() {
351         return imageLocalService;
352     }
353 
354     public void setImageLocalService(ImageLocalService imageLocalService) {
355         this.imageLocalService = imageLocalService;
356     }
357 
358     public ImagePersistence getImagePersistence() {
359         return imagePersistence;
360     }
361 
362     public void setImagePersistence(ImagePersistence imagePersistence) {
363         this.imagePersistence = imagePersistence;
364     }
365 
366     public ResourceLocalService getResourceLocalService() {
367         return resourceLocalService;
368     }
369 
370     public void setResourceLocalService(
371         ResourceLocalService resourceLocalService) {
372         this.resourceLocalService = resourceLocalService;
373     }
374 
375     public ResourceService getResourceService() {
376         return resourceService;
377     }
378 
379     public void setResourceService(ResourceService resourceService) {
380         this.resourceService = resourceService;
381     }
382 
383     public ResourcePersistence getResourcePersistence() {
384         return resourcePersistence;
385     }
386 
387     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
388         this.resourcePersistence = resourcePersistence;
389     }
390 
391     public ResourceFinder getResourceFinder() {
392         return resourceFinder;
393     }
394 
395     public void setResourceFinder(ResourceFinder resourceFinder) {
396         this.resourceFinder = resourceFinder;
397     }
398 
399     public UserLocalService getUserLocalService() {
400         return userLocalService;
401     }
402 
403     public void setUserLocalService(UserLocalService userLocalService) {
404         this.userLocalService = userLocalService;
405     }
406 
407     public UserService getUserService() {
408         return userService;
409     }
410 
411     public void setUserService(UserService userService) {
412         this.userService = userService;
413     }
414 
415     public UserPersistence getUserPersistence() {
416         return userPersistence;
417     }
418 
419     public void setUserPersistence(UserPersistence userPersistence) {
420         this.userPersistence = userPersistence;
421     }
422 
423     public UserFinder getUserFinder() {
424         return userFinder;
425     }
426 
427     public void setUserFinder(UserFinder userFinder) {
428         this.userFinder = userFinder;
429     }
430 
431     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.ShoppingCartLocalService.impl")
432     protected ShoppingCartLocalService shoppingCartLocalService;
433     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence.impl")
434     protected ShoppingCartPersistence shoppingCartPersistence;
435     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.ShoppingCategoryLocalService.impl")
436     protected ShoppingCategoryLocalService shoppingCategoryLocalService;
437     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.ShoppingCategoryService.impl")
438     protected ShoppingCategoryService shoppingCategoryService;
439     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence.impl")
440     protected ShoppingCategoryPersistence shoppingCategoryPersistence;
441     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.ShoppingCouponLocalService.impl")
442     protected ShoppingCouponLocalService shoppingCouponLocalService;
443     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.ShoppingCouponService.impl")
444     protected ShoppingCouponService shoppingCouponService;
445     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence.impl")
446     protected ShoppingCouponPersistence shoppingCouponPersistence;
447     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder.impl")
448     protected ShoppingCouponFinder shoppingCouponFinder;
449     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.ShoppingItemLocalService.impl")
450     protected ShoppingItemLocalService shoppingItemLocalService;
451     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.ShoppingItemService.impl")
452     protected ShoppingItemService shoppingItemService;
453     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence.impl")
454     protected ShoppingItemPersistence shoppingItemPersistence;
455     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder.impl")
456     protected ShoppingItemFinder shoppingItemFinder;
457     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService.impl")
458     protected ShoppingItemFieldLocalService shoppingItemFieldLocalService;
459     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence.impl")
460     protected ShoppingItemFieldPersistence shoppingItemFieldPersistence;
461     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService.impl")
462     protected ShoppingItemPriceLocalService shoppingItemPriceLocalService;
463     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence.impl")
464     protected ShoppingItemPricePersistence shoppingItemPricePersistence;
465     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.ShoppingOrderLocalService.impl")
466     protected ShoppingOrderLocalService shoppingOrderLocalService;
467     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.ShoppingOrderService.impl")
468     protected ShoppingOrderService shoppingOrderService;
469     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence.impl")
470     protected ShoppingOrderPersistence shoppingOrderPersistence;
471     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder.impl")
472     protected ShoppingOrderFinder shoppingOrderFinder;
473     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService.impl")
474     protected ShoppingOrderItemLocalService shoppingOrderItemLocalService;
475     @javax.annotation.Resource(name = "com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence.impl")
476     protected ShoppingOrderItemPersistence shoppingOrderItemPersistence;
477     @javax.annotation.Resource(name = "com.liferay.counter.service.CounterLocalService.impl")
478     protected CounterLocalService counterLocalService;
479     @javax.annotation.Resource(name = "com.liferay.counter.service.CounterService.impl")
480     protected CounterService counterService;
481     @javax.annotation.Resource(name = "com.liferay.portal.service.ImageLocalService.impl")
482     protected ImageLocalService imageLocalService;
483     @javax.annotation.Resource(name = "com.liferay.portal.service.persistence.ImagePersistence.impl")
484     protected ImagePersistence imagePersistence;
485     @javax.annotation.Resource(name = "com.liferay.portal.service.ResourceLocalService.impl")
486     protected ResourceLocalService resourceLocalService;
487     @javax.annotation.Resource(name = "com.liferay.portal.service.ResourceService.impl")
488     protected ResourceService resourceService;
489     @javax.annotation.Resource(name = "com.liferay.portal.service.persistence.ResourcePersistence.impl")
490     protected ResourcePersistence resourcePersistence;
491     @javax.annotation.Resource(name = "com.liferay.portal.service.persistence.ResourceFinder.impl")
492     protected ResourceFinder resourceFinder;
493     @javax.annotation.Resource(name = "com.liferay.portal.service.UserLocalService.impl")
494     protected UserLocalService userLocalService;
495     @javax.annotation.Resource(name = "com.liferay.portal.service.UserService.impl")
496     protected UserService userService;
497     @javax.annotation.Resource(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
498     protected UserPersistence userPersistence;
499     @javax.annotation.Resource(name = "com.liferay.portal.service.persistence.UserFinder.impl")
500     protected UserFinder userFinder;
501 }