001
014
015 package com.liferay.portlet.shopping.service.base;
016
017 import com.liferay.counter.service.CounterLocalService;
018
019 import com.liferay.portal.kernel.annotation.BeanReference;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
023 import com.liferay.portal.kernel.exception.PortalException;
024 import com.liferay.portal.kernel.exception.SystemException;
025 import com.liferay.portal.kernel.util.OrderByComparator;
026 import com.liferay.portal.service.ResourceLocalService;
027 import com.liferay.portal.service.ResourceService;
028 import com.liferay.portal.service.UserLocalService;
029 import com.liferay.portal.service.UserService;
030 import com.liferay.portal.service.persistence.ResourceFinder;
031 import com.liferay.portal.service.persistence.ResourcePersistence;
032 import com.liferay.portal.service.persistence.UserFinder;
033 import com.liferay.portal.service.persistence.UserPersistence;
034
035 import com.liferay.portlet.shopping.model.ShoppingCategory;
036 import com.liferay.portlet.shopping.service.ShoppingCartLocalService;
037 import com.liferay.portlet.shopping.service.ShoppingCategoryLocalService;
038 import com.liferay.portlet.shopping.service.ShoppingCategoryService;
039 import com.liferay.portlet.shopping.service.ShoppingCouponLocalService;
040 import com.liferay.portlet.shopping.service.ShoppingCouponService;
041 import com.liferay.portlet.shopping.service.ShoppingItemFieldLocalService;
042 import com.liferay.portlet.shopping.service.ShoppingItemLocalService;
043 import com.liferay.portlet.shopping.service.ShoppingItemPriceLocalService;
044 import com.liferay.portlet.shopping.service.ShoppingItemService;
045 import com.liferay.portlet.shopping.service.ShoppingOrderItemLocalService;
046 import com.liferay.portlet.shopping.service.ShoppingOrderLocalService;
047 import com.liferay.portlet.shopping.service.ShoppingOrderService;
048 import com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence;
049 import com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence;
050 import com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder;
051 import com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence;
052 import com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence;
053 import com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder;
054 import com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence;
055 import com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence;
056 import com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder;
057 import com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence;
058 import com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence;
059
060 import java.util.List;
061
062 import javax.sql.DataSource;
063
064
067 public abstract class ShoppingCategoryLocalServiceBaseImpl
068 implements ShoppingCategoryLocalService {
069 public ShoppingCategory addShoppingCategory(
070 ShoppingCategory shoppingCategory) throws SystemException {
071 shoppingCategory.setNew(true);
072
073 return shoppingCategoryPersistence.update(shoppingCategory, false);
074 }
075
076 public ShoppingCategory createShoppingCategory(long categoryId) {
077 return shoppingCategoryPersistence.create(categoryId);
078 }
079
080 public void deleteShoppingCategory(long categoryId)
081 throws PortalException, SystemException {
082 shoppingCategoryPersistence.remove(categoryId);
083 }
084
085 public void deleteShoppingCategory(ShoppingCategory shoppingCategory)
086 throws SystemException {
087 shoppingCategoryPersistence.remove(shoppingCategory);
088 }
089
090 @SuppressWarnings("unchecked")
091 public List dynamicQuery(DynamicQuery dynamicQuery)
092 throws SystemException {
093 return shoppingCategoryPersistence.findWithDynamicQuery(dynamicQuery);
094 }
095
096 @SuppressWarnings("unchecked")
097 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
098 throws SystemException {
099 return shoppingCategoryPersistence.findWithDynamicQuery(dynamicQuery,
100 start, end);
101 }
102
103 @SuppressWarnings("unchecked")
104 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
105 OrderByComparator orderByComparator) throws SystemException {
106 return shoppingCategoryPersistence.findWithDynamicQuery(dynamicQuery,
107 start, end, orderByComparator);
108 }
109
110 public long dynamicQueryCount(DynamicQuery dynamicQuery)
111 throws SystemException {
112 return shoppingCategoryPersistence.countWithDynamicQuery(dynamicQuery);
113 }
114
115 public ShoppingCategory getShoppingCategory(long categoryId)
116 throws PortalException, SystemException {
117 return shoppingCategoryPersistence.findByPrimaryKey(categoryId);
118 }
119
120 public List<ShoppingCategory> getShoppingCategories(int start, int end)
121 throws SystemException {
122 return shoppingCategoryPersistence.findAll(start, end);
123 }
124
125 public int getShoppingCategoriesCount() throws SystemException {
126 return shoppingCategoryPersistence.countAll();
127 }
128
129 public ShoppingCategory updateShoppingCategory(
130 ShoppingCategory shoppingCategory) throws SystemException {
131 shoppingCategory.setNew(false);
132
133 return shoppingCategoryPersistence.update(shoppingCategory, true);
134 }
135
136 public ShoppingCategory updateShoppingCategory(
137 ShoppingCategory shoppingCategory, boolean merge)
138 throws SystemException {
139 shoppingCategory.setNew(false);
140
141 return shoppingCategoryPersistence.update(shoppingCategory, merge);
142 }
143
144 public ShoppingCartLocalService getShoppingCartLocalService() {
145 return shoppingCartLocalService;
146 }
147
148 public void setShoppingCartLocalService(
149 ShoppingCartLocalService shoppingCartLocalService) {
150 this.shoppingCartLocalService = shoppingCartLocalService;
151 }
152
153 public ShoppingCartPersistence getShoppingCartPersistence() {
154 return shoppingCartPersistence;
155 }
156
157 public void setShoppingCartPersistence(
158 ShoppingCartPersistence shoppingCartPersistence) {
159 this.shoppingCartPersistence = shoppingCartPersistence;
160 }
161
162 public ShoppingCategoryLocalService getShoppingCategoryLocalService() {
163 return shoppingCategoryLocalService;
164 }
165
166 public void setShoppingCategoryLocalService(
167 ShoppingCategoryLocalService shoppingCategoryLocalService) {
168 this.shoppingCategoryLocalService = shoppingCategoryLocalService;
169 }
170
171 public ShoppingCategoryService getShoppingCategoryService() {
172 return shoppingCategoryService;
173 }
174
175 public void setShoppingCategoryService(
176 ShoppingCategoryService shoppingCategoryService) {
177 this.shoppingCategoryService = shoppingCategoryService;
178 }
179
180 public ShoppingCategoryPersistence getShoppingCategoryPersistence() {
181 return shoppingCategoryPersistence;
182 }
183
184 public void setShoppingCategoryPersistence(
185 ShoppingCategoryPersistence shoppingCategoryPersistence) {
186 this.shoppingCategoryPersistence = shoppingCategoryPersistence;
187 }
188
189 public ShoppingCouponLocalService getShoppingCouponLocalService() {
190 return shoppingCouponLocalService;
191 }
192
193 public void setShoppingCouponLocalService(
194 ShoppingCouponLocalService shoppingCouponLocalService) {
195 this.shoppingCouponLocalService = shoppingCouponLocalService;
196 }
197
198 public ShoppingCouponService getShoppingCouponService() {
199 return shoppingCouponService;
200 }
201
202 public void setShoppingCouponService(
203 ShoppingCouponService shoppingCouponService) {
204 this.shoppingCouponService = shoppingCouponService;
205 }
206
207 public ShoppingCouponPersistence getShoppingCouponPersistence() {
208 return shoppingCouponPersistence;
209 }
210
211 public void setShoppingCouponPersistence(
212 ShoppingCouponPersistence shoppingCouponPersistence) {
213 this.shoppingCouponPersistence = shoppingCouponPersistence;
214 }
215
216 public ShoppingCouponFinder getShoppingCouponFinder() {
217 return shoppingCouponFinder;
218 }
219
220 public void setShoppingCouponFinder(
221 ShoppingCouponFinder shoppingCouponFinder) {
222 this.shoppingCouponFinder = shoppingCouponFinder;
223 }
224
225 public ShoppingItemLocalService getShoppingItemLocalService() {
226 return shoppingItemLocalService;
227 }
228
229 public void setShoppingItemLocalService(
230 ShoppingItemLocalService shoppingItemLocalService) {
231 this.shoppingItemLocalService = shoppingItemLocalService;
232 }
233
234 public ShoppingItemService getShoppingItemService() {
235 return shoppingItemService;
236 }
237
238 public void setShoppingItemService(ShoppingItemService shoppingItemService) {
239 this.shoppingItemService = shoppingItemService;
240 }
241
242 public ShoppingItemPersistence getShoppingItemPersistence() {
243 return shoppingItemPersistence;
244 }
245
246 public void setShoppingItemPersistence(
247 ShoppingItemPersistence shoppingItemPersistence) {
248 this.shoppingItemPersistence = shoppingItemPersistence;
249 }
250
251 public ShoppingItemFinder getShoppingItemFinder() {
252 return shoppingItemFinder;
253 }
254
255 public void setShoppingItemFinder(ShoppingItemFinder shoppingItemFinder) {
256 this.shoppingItemFinder = shoppingItemFinder;
257 }
258
259 public ShoppingItemFieldLocalService getShoppingItemFieldLocalService() {
260 return shoppingItemFieldLocalService;
261 }
262
263 public void setShoppingItemFieldLocalService(
264 ShoppingItemFieldLocalService shoppingItemFieldLocalService) {
265 this.shoppingItemFieldLocalService = shoppingItemFieldLocalService;
266 }
267
268 public ShoppingItemFieldPersistence getShoppingItemFieldPersistence() {
269 return shoppingItemFieldPersistence;
270 }
271
272 public void setShoppingItemFieldPersistence(
273 ShoppingItemFieldPersistence shoppingItemFieldPersistence) {
274 this.shoppingItemFieldPersistence = shoppingItemFieldPersistence;
275 }
276
277 public ShoppingItemPriceLocalService getShoppingItemPriceLocalService() {
278 return shoppingItemPriceLocalService;
279 }
280
281 public void setShoppingItemPriceLocalService(
282 ShoppingItemPriceLocalService shoppingItemPriceLocalService) {
283 this.shoppingItemPriceLocalService = shoppingItemPriceLocalService;
284 }
285
286 public ShoppingItemPricePersistence getShoppingItemPricePersistence() {
287 return shoppingItemPricePersistence;
288 }
289
290 public void setShoppingItemPricePersistence(
291 ShoppingItemPricePersistence shoppingItemPricePersistence) {
292 this.shoppingItemPricePersistence = shoppingItemPricePersistence;
293 }
294
295 public ShoppingOrderLocalService getShoppingOrderLocalService() {
296 return shoppingOrderLocalService;
297 }
298
299 public void setShoppingOrderLocalService(
300 ShoppingOrderLocalService shoppingOrderLocalService) {
301 this.shoppingOrderLocalService = shoppingOrderLocalService;
302 }
303
304 public ShoppingOrderService getShoppingOrderService() {
305 return shoppingOrderService;
306 }
307
308 public void setShoppingOrderService(
309 ShoppingOrderService shoppingOrderService) {
310 this.shoppingOrderService = shoppingOrderService;
311 }
312
313 public ShoppingOrderPersistence getShoppingOrderPersistence() {
314 return shoppingOrderPersistence;
315 }
316
317 public void setShoppingOrderPersistence(
318 ShoppingOrderPersistence shoppingOrderPersistence) {
319 this.shoppingOrderPersistence = shoppingOrderPersistence;
320 }
321
322 public ShoppingOrderFinder getShoppingOrderFinder() {
323 return shoppingOrderFinder;
324 }
325
326 public void setShoppingOrderFinder(ShoppingOrderFinder shoppingOrderFinder) {
327 this.shoppingOrderFinder = shoppingOrderFinder;
328 }
329
330 public ShoppingOrderItemLocalService getShoppingOrderItemLocalService() {
331 return shoppingOrderItemLocalService;
332 }
333
334 public void setShoppingOrderItemLocalService(
335 ShoppingOrderItemLocalService shoppingOrderItemLocalService) {
336 this.shoppingOrderItemLocalService = shoppingOrderItemLocalService;
337 }
338
339 public ShoppingOrderItemPersistence getShoppingOrderItemPersistence() {
340 return shoppingOrderItemPersistence;
341 }
342
343 public void setShoppingOrderItemPersistence(
344 ShoppingOrderItemPersistence shoppingOrderItemPersistence) {
345 this.shoppingOrderItemPersistence = shoppingOrderItemPersistence;
346 }
347
348 public CounterLocalService getCounterLocalService() {
349 return counterLocalService;
350 }
351
352 public void setCounterLocalService(CounterLocalService counterLocalService) {
353 this.counterLocalService = counterLocalService;
354 }
355
356 public ResourceLocalService getResourceLocalService() {
357 return resourceLocalService;
358 }
359
360 public void setResourceLocalService(
361 ResourceLocalService resourceLocalService) {
362 this.resourceLocalService = resourceLocalService;
363 }
364
365 public ResourceService getResourceService() {
366 return resourceService;
367 }
368
369 public void setResourceService(ResourceService resourceService) {
370 this.resourceService = resourceService;
371 }
372
373 public ResourcePersistence getResourcePersistence() {
374 return resourcePersistence;
375 }
376
377 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
378 this.resourcePersistence = resourcePersistence;
379 }
380
381 public ResourceFinder getResourceFinder() {
382 return resourceFinder;
383 }
384
385 public void setResourceFinder(ResourceFinder resourceFinder) {
386 this.resourceFinder = resourceFinder;
387 }
388
389 public UserLocalService getUserLocalService() {
390 return userLocalService;
391 }
392
393 public void setUserLocalService(UserLocalService userLocalService) {
394 this.userLocalService = userLocalService;
395 }
396
397 public UserService getUserService() {
398 return userService;
399 }
400
401 public void setUserService(UserService userService) {
402 this.userService = userService;
403 }
404
405 public UserPersistence getUserPersistence() {
406 return userPersistence;
407 }
408
409 public void setUserPersistence(UserPersistence userPersistence) {
410 this.userPersistence = userPersistence;
411 }
412
413 public UserFinder getUserFinder() {
414 return userFinder;
415 }
416
417 public void setUserFinder(UserFinder userFinder) {
418 this.userFinder = userFinder;
419 }
420
421 protected void runSQL(String sql) throws SystemException {
422 try {
423 DataSource dataSource = shoppingCategoryPersistence.getDataSource();
424
425 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
426 sql, new int[0]);
427
428 sqlUpdate.update();
429 }
430 catch (Exception e) {
431 throw new SystemException(e);
432 }
433 }
434
435 @BeanReference(type = ShoppingCartLocalService.class)
436 protected ShoppingCartLocalService shoppingCartLocalService;
437 @BeanReference(type = ShoppingCartPersistence.class)
438 protected ShoppingCartPersistence shoppingCartPersistence;
439 @BeanReference(type = ShoppingCategoryLocalService.class)
440 protected ShoppingCategoryLocalService shoppingCategoryLocalService;
441 @BeanReference(type = ShoppingCategoryService.class)
442 protected ShoppingCategoryService shoppingCategoryService;
443 @BeanReference(type = ShoppingCategoryPersistence.class)
444 protected ShoppingCategoryPersistence shoppingCategoryPersistence;
445 @BeanReference(type = ShoppingCouponLocalService.class)
446 protected ShoppingCouponLocalService shoppingCouponLocalService;
447 @BeanReference(type = ShoppingCouponService.class)
448 protected ShoppingCouponService shoppingCouponService;
449 @BeanReference(type = ShoppingCouponPersistence.class)
450 protected ShoppingCouponPersistence shoppingCouponPersistence;
451 @BeanReference(type = ShoppingCouponFinder.class)
452 protected ShoppingCouponFinder shoppingCouponFinder;
453 @BeanReference(type = ShoppingItemLocalService.class)
454 protected ShoppingItemLocalService shoppingItemLocalService;
455 @BeanReference(type = ShoppingItemService.class)
456 protected ShoppingItemService shoppingItemService;
457 @BeanReference(type = ShoppingItemPersistence.class)
458 protected ShoppingItemPersistence shoppingItemPersistence;
459 @BeanReference(type = ShoppingItemFinder.class)
460 protected ShoppingItemFinder shoppingItemFinder;
461 @BeanReference(type = ShoppingItemFieldLocalService.class)
462 protected ShoppingItemFieldLocalService shoppingItemFieldLocalService;
463 @BeanReference(type = ShoppingItemFieldPersistence.class)
464 protected ShoppingItemFieldPersistence shoppingItemFieldPersistence;
465 @BeanReference(type = ShoppingItemPriceLocalService.class)
466 protected ShoppingItemPriceLocalService shoppingItemPriceLocalService;
467 @BeanReference(type = ShoppingItemPricePersistence.class)
468 protected ShoppingItemPricePersistence shoppingItemPricePersistence;
469 @BeanReference(type = ShoppingOrderLocalService.class)
470 protected ShoppingOrderLocalService shoppingOrderLocalService;
471 @BeanReference(type = ShoppingOrderService.class)
472 protected ShoppingOrderService shoppingOrderService;
473 @BeanReference(type = ShoppingOrderPersistence.class)
474 protected ShoppingOrderPersistence shoppingOrderPersistence;
475 @BeanReference(type = ShoppingOrderFinder.class)
476 protected ShoppingOrderFinder shoppingOrderFinder;
477 @BeanReference(type = ShoppingOrderItemLocalService.class)
478 protected ShoppingOrderItemLocalService shoppingOrderItemLocalService;
479 @BeanReference(type = ShoppingOrderItemPersistence.class)
480 protected ShoppingOrderItemPersistence shoppingOrderItemPersistence;
481 @BeanReference(type = CounterLocalService.class)
482 protected CounterLocalService counterLocalService;
483 @BeanReference(type = ResourceLocalService.class)
484 protected ResourceLocalService resourceLocalService;
485 @BeanReference(type = ResourceService.class)
486 protected ResourceService resourceService;
487 @BeanReference(type = ResourcePersistence.class)
488 protected ResourcePersistence resourcePersistence;
489 @BeanReference(type = ResourceFinder.class)
490 protected ResourceFinder resourceFinder;
491 @BeanReference(type = UserLocalService.class)
492 protected UserLocalService userLocalService;
493 @BeanReference(type = UserService.class)
494 protected UserService userService;
495 @BeanReference(type = UserPersistence.class)
496 protected UserPersistence userPersistence;
497 @BeanReference(type = UserFinder.class)
498 protected UserFinder userFinder;
499 }