001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.shopping.service;
022:
023: /**
024: * <a href="ShoppingItemLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.shopping.service.ShoppingItemLocalService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.shopping.service.ShoppingItemLocalServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.shopping.service.ShoppingItemLocalService
047: * @see com.liferay.portlet.shopping.service.ShoppingItemLocalServiceFactory
048: *
049: */
050: public class ShoppingItemLocalServiceUtil {
051: public static com.liferay.portlet.shopping.model.ShoppingItem addShoppingItem(
052: com.liferay.portlet.shopping.model.ShoppingItem model)
053: throws com.liferay.portal.SystemException {
054: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
055: .getService();
056:
057: return shoppingItemLocalService.addShoppingItem(model);
058: }
059:
060: public static java.util.List dynamicQuery(
061: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
062: throws com.liferay.portal.SystemException {
063: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
064: .getService();
065:
066: return shoppingItemLocalService.dynamicQuery(queryInitializer);
067: }
068:
069: public static java.util.List dynamicQuery(
070: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
071: int begin, int end)
072: throws com.liferay.portal.SystemException {
073: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
074: .getService();
075:
076: return shoppingItemLocalService.dynamicQuery(queryInitializer,
077: begin, end);
078: }
079:
080: public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
081: com.liferay.portlet.shopping.model.ShoppingItem model)
082: throws com.liferay.portal.SystemException {
083: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
084: .getService();
085:
086: return shoppingItemLocalService.updateShoppingItem(model);
087: }
088:
089: public static com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence getShoppingCartPersistence() {
090: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
091: .getService();
092:
093: return shoppingItemLocalService.getShoppingCartPersistence();
094: }
095:
096: public static void setShoppingCartPersistence(
097: com.liferay.portlet.shopping.service.persistence.ShoppingCartPersistence shoppingCartPersistence) {
098: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
099: .getService();
100:
101: shoppingItemLocalService
102: .setShoppingCartPersistence(shoppingCartPersistence);
103: }
104:
105: public static com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence getShoppingCategoryPersistence() {
106: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
107: .getService();
108:
109: return shoppingItemLocalService
110: .getShoppingCategoryPersistence();
111: }
112:
113: public static void setShoppingCategoryPersistence(
114: com.liferay.portlet.shopping.service.persistence.ShoppingCategoryPersistence shoppingCategoryPersistence) {
115: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
116: .getService();
117:
118: shoppingItemLocalService
119: .setShoppingCategoryPersistence(shoppingCategoryPersistence);
120: }
121:
122: public static com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence getShoppingCouponPersistence() {
123: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
124: .getService();
125:
126: return shoppingItemLocalService.getShoppingCouponPersistence();
127: }
128:
129: public static void setShoppingCouponPersistence(
130: com.liferay.portlet.shopping.service.persistence.ShoppingCouponPersistence shoppingCouponPersistence) {
131: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
132: .getService();
133:
134: shoppingItemLocalService
135: .setShoppingCouponPersistence(shoppingCouponPersistence);
136: }
137:
138: public static com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder getShoppingCouponFinder() {
139: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
140: .getService();
141:
142: return shoppingItemLocalService.getShoppingCouponFinder();
143: }
144:
145: public static void setShoppingCouponFinder(
146: com.liferay.portlet.shopping.service.persistence.ShoppingCouponFinder shoppingCouponFinder) {
147: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
148: .getService();
149:
150: shoppingItemLocalService
151: .setShoppingCouponFinder(shoppingCouponFinder);
152: }
153:
154: public static com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence getShoppingItemPersistence() {
155: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
156: .getService();
157:
158: return shoppingItemLocalService.getShoppingItemPersistence();
159: }
160:
161: public static void setShoppingItemPersistence(
162: com.liferay.portlet.shopping.service.persistence.ShoppingItemPersistence shoppingItemPersistence) {
163: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
164: .getService();
165:
166: shoppingItemLocalService
167: .setShoppingItemPersistence(shoppingItemPersistence);
168: }
169:
170: public static com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder getShoppingItemFinder() {
171: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
172: .getService();
173:
174: return shoppingItemLocalService.getShoppingItemFinder();
175: }
176:
177: public static void setShoppingItemFinder(
178: com.liferay.portlet.shopping.service.persistence.ShoppingItemFinder shoppingItemFinder) {
179: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
180: .getService();
181:
182: shoppingItemLocalService
183: .setShoppingItemFinder(shoppingItemFinder);
184: }
185:
186: public static com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence getShoppingItemFieldPersistence() {
187: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
188: .getService();
189:
190: return shoppingItemLocalService
191: .getShoppingItemFieldPersistence();
192: }
193:
194: public static void setShoppingItemFieldPersistence(
195: com.liferay.portlet.shopping.service.persistence.ShoppingItemFieldPersistence shoppingItemFieldPersistence) {
196: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
197: .getService();
198:
199: shoppingItemLocalService
200: .setShoppingItemFieldPersistence(shoppingItemFieldPersistence);
201: }
202:
203: public static com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence getShoppingItemPricePersistence() {
204: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
205: .getService();
206:
207: return shoppingItemLocalService
208: .getShoppingItemPricePersistence();
209: }
210:
211: public static void setShoppingItemPricePersistence(
212: com.liferay.portlet.shopping.service.persistence.ShoppingItemPricePersistence shoppingItemPricePersistence) {
213: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
214: .getService();
215:
216: shoppingItemLocalService
217: .setShoppingItemPricePersistence(shoppingItemPricePersistence);
218: }
219:
220: public static com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence getShoppingOrderPersistence() {
221: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
222: .getService();
223:
224: return shoppingItemLocalService.getShoppingOrderPersistence();
225: }
226:
227: public static void setShoppingOrderPersistence(
228: com.liferay.portlet.shopping.service.persistence.ShoppingOrderPersistence shoppingOrderPersistence) {
229: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
230: .getService();
231:
232: shoppingItemLocalService
233: .setShoppingOrderPersistence(shoppingOrderPersistence);
234: }
235:
236: public static com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder getShoppingOrderFinder() {
237: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
238: .getService();
239:
240: return shoppingItemLocalService.getShoppingOrderFinder();
241: }
242:
243: public static void setShoppingOrderFinder(
244: com.liferay.portlet.shopping.service.persistence.ShoppingOrderFinder shoppingOrderFinder) {
245: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
246: .getService();
247:
248: shoppingItemLocalService
249: .setShoppingOrderFinder(shoppingOrderFinder);
250: }
251:
252: public static com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence getShoppingOrderItemPersistence() {
253: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
254: .getService();
255:
256: return shoppingItemLocalService
257: .getShoppingOrderItemPersistence();
258: }
259:
260: public static void setShoppingOrderItemPersistence(
261: com.liferay.portlet.shopping.service.persistence.ShoppingOrderItemPersistence shoppingOrderItemPersistence) {
262: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
263: .getService();
264:
265: shoppingItemLocalService
266: .setShoppingOrderItemPersistence(shoppingOrderItemPersistence);
267: }
268:
269: public static com.liferay.portal.service.persistence.ResourcePersistence getResourcePersistence() {
270: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
271: .getService();
272:
273: return shoppingItemLocalService.getResourcePersistence();
274: }
275:
276: public static void setResourcePersistence(
277: com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence) {
278: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
279: .getService();
280:
281: shoppingItemLocalService
282: .setResourcePersistence(resourcePersistence);
283: }
284:
285: public static com.liferay.portal.service.persistence.ResourceFinder getResourceFinder() {
286: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
287: .getService();
288:
289: return shoppingItemLocalService.getResourceFinder();
290: }
291:
292: public static void setResourceFinder(
293: com.liferay.portal.service.persistence.ResourceFinder resourceFinder) {
294: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
295: .getService();
296:
297: shoppingItemLocalService.setResourceFinder(resourceFinder);
298: }
299:
300: public static com.liferay.portal.service.persistence.UserPersistence getUserPersistence() {
301: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
302: .getService();
303:
304: return shoppingItemLocalService.getUserPersistence();
305: }
306:
307: public static void setUserPersistence(
308: com.liferay.portal.service.persistence.UserPersistence userPersistence) {
309: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
310: .getService();
311:
312: shoppingItemLocalService.setUserPersistence(userPersistence);
313: }
314:
315: public static com.liferay.portal.service.persistence.UserFinder getUserFinder() {
316: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
317: .getService();
318:
319: return shoppingItemLocalService.getUserFinder();
320: }
321:
322: public static void setUserFinder(
323: com.liferay.portal.service.persistence.UserFinder userFinder) {
324: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
325: .getService();
326:
327: shoppingItemLocalService.setUserFinder(userFinder);
328: }
329:
330: public static void afterPropertiesSet() {
331: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
332: .getService();
333:
334: shoppingItemLocalService.afterPropertiesSet();
335: }
336:
337: public static void addBookItems(long userId, long categoryId,
338: java.lang.String[] isbns)
339: throws com.liferay.portal.PortalException,
340: com.liferay.portal.SystemException {
341: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
342: .getService();
343:
344: shoppingItemLocalService
345: .addBookItems(userId, categoryId, isbns);
346: }
347:
348: public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
349: long userId, long categoryId, java.lang.String sku,
350: java.lang.String name, java.lang.String description,
351: java.lang.String properties,
352: java.lang.String fieldsQuantities,
353: boolean requiresShipping, int stockQuantity,
354: boolean featured, java.lang.Boolean sale,
355: boolean smallImage, java.lang.String smallImageURL,
356: java.io.File smallFile, boolean mediumImage,
357: java.lang.String mediumImageURL, java.io.File mediumFile,
358: boolean largeImage, java.lang.String largeImageURL,
359: java.io.File largeFile, java.util.List itemFields,
360: java.util.List itemPrices, boolean addCommunityPermissions,
361: boolean addGuestPermissions)
362: throws com.liferay.portal.PortalException,
363: com.liferay.portal.SystemException {
364: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
365: .getService();
366:
367: return shoppingItemLocalService.addItem(userId, categoryId,
368: sku, name, description, properties, fieldsQuantities,
369: requiresShipping, stockQuantity, featured, sale,
370: smallImage, smallImageURL, smallFile, mediumImage,
371: mediumImageURL, mediumFile, largeImage, largeImageURL,
372: largeFile, itemFields, itemPrices,
373: addCommunityPermissions, addGuestPermissions);
374: }
375:
376: public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
377: long userId, long categoryId, java.lang.String sku,
378: java.lang.String name, java.lang.String description,
379: java.lang.String properties,
380: java.lang.String fieldsQuantities,
381: boolean requiresShipping, int stockQuantity,
382: boolean featured, java.lang.Boolean sale,
383: boolean smallImage, java.lang.String smallImageURL,
384: java.io.File smallFile, boolean mediumImage,
385: java.lang.String mediumImageURL, java.io.File mediumFile,
386: boolean largeImage, java.lang.String largeImageURL,
387: java.io.File largeFile, java.util.List itemFields,
388: java.util.List itemPrices,
389: java.lang.String[] communityPermissions,
390: java.lang.String[] guestPermissions)
391: throws com.liferay.portal.PortalException,
392: com.liferay.portal.SystemException {
393: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
394: .getService();
395:
396: return shoppingItemLocalService.addItem(userId, categoryId,
397: sku, name, description, properties, fieldsQuantities,
398: requiresShipping, stockQuantity, featured, sale,
399: smallImage, smallImageURL, smallFile, mediumImage,
400: mediumImageURL, mediumFile, largeImage, largeImageURL,
401: largeFile, itemFields, itemPrices,
402: communityPermissions, guestPermissions);
403: }
404:
405: public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
406: long userId, long categoryId, java.lang.String sku,
407: java.lang.String name, java.lang.String description,
408: java.lang.String properties,
409: java.lang.String fieldsQuantities,
410: boolean requiresShipping, int stockQuantity,
411: boolean featured, java.lang.Boolean sale,
412: boolean smallImage, java.lang.String smallImageURL,
413: java.io.File smallFile, boolean mediumImage,
414: java.lang.String mediumImageURL, java.io.File mediumFile,
415: boolean largeImage, java.lang.String largeImageURL,
416: java.io.File largeFile, java.util.List itemFields,
417: java.util.List itemPrices,
418: java.lang.Boolean addCommunityPermissions,
419: java.lang.Boolean addGuestPermissions,
420: java.lang.String[] communityPermissions,
421: java.lang.String[] guestPermissions)
422: throws com.liferay.portal.PortalException,
423: com.liferay.portal.SystemException {
424: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
425: .getService();
426:
427: return shoppingItemLocalService.addItem(userId, categoryId,
428: sku, name, description, properties, fieldsQuantities,
429: requiresShipping, stockQuantity, featured, sale,
430: smallImage, smallImageURL, smallFile, mediumImage,
431: mediumImageURL, mediumFile, largeImage, largeImageURL,
432: largeFile, itemFields, itemPrices,
433: addCommunityPermissions, addGuestPermissions,
434: communityPermissions, guestPermissions);
435: }
436:
437: public static void addItemResources(long itemId,
438: boolean addCommunityPermissions, boolean addGuestPermissions)
439: throws com.liferay.portal.PortalException,
440: com.liferay.portal.SystemException {
441: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
442: .getService();
443:
444: shoppingItemLocalService.addItemResources(itemId,
445: addCommunityPermissions, addGuestPermissions);
446: }
447:
448: public static void addItemResources(
449: com.liferay.portlet.shopping.model.ShoppingCategory category,
450: com.liferay.portlet.shopping.model.ShoppingItem item,
451: boolean addCommunityPermissions, boolean addGuestPermissions)
452: throws com.liferay.portal.PortalException,
453: com.liferay.portal.SystemException {
454: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
455: .getService();
456:
457: shoppingItemLocalService.addItemResources(category, item,
458: addCommunityPermissions, addGuestPermissions);
459: }
460:
461: public static void addItemResources(long itemId,
462: java.lang.String[] communityPermissions,
463: java.lang.String[] guestPermissions)
464: throws com.liferay.portal.PortalException,
465: com.liferay.portal.SystemException {
466: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
467: .getService();
468:
469: shoppingItemLocalService.addItemResources(itemId,
470: communityPermissions, guestPermissions);
471: }
472:
473: public static void addItemResources(
474: com.liferay.portlet.shopping.model.ShoppingCategory category,
475: com.liferay.portlet.shopping.model.ShoppingItem item,
476: java.lang.String[] communityPermissions,
477: java.lang.String[] guestPermissions)
478: throws com.liferay.portal.PortalException,
479: com.liferay.portal.SystemException {
480: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
481: .getService();
482:
483: shoppingItemLocalService.addItemResources(category, item,
484: communityPermissions, guestPermissions);
485: }
486:
487: public static void deleteItem(long itemId)
488: throws com.liferay.portal.PortalException,
489: com.liferay.portal.SystemException {
490: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
491: .getService();
492:
493: shoppingItemLocalService.deleteItem(itemId);
494: }
495:
496: public static void deleteItem(
497: com.liferay.portlet.shopping.model.ShoppingItem item)
498: throws com.liferay.portal.PortalException,
499: com.liferay.portal.SystemException {
500: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
501: .getService();
502:
503: shoppingItemLocalService.deleteItem(item);
504: }
505:
506: public static void deleteItems(long categoryId)
507: throws com.liferay.portal.PortalException,
508: com.liferay.portal.SystemException {
509: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
510: .getService();
511:
512: shoppingItemLocalService.deleteItems(categoryId);
513: }
514:
515: public static int getCategoriesItemsCount(java.util.List categoryIds)
516: throws com.liferay.portal.SystemException {
517: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
518: .getService();
519:
520: return shoppingItemLocalService
521: .getCategoriesItemsCount(categoryIds);
522: }
523:
524: public static java.util.List getFeaturedItems(long groupId,
525: long categoryId, int numOfItems)
526: throws com.liferay.portal.SystemException {
527: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
528: .getService();
529:
530: return shoppingItemLocalService.getFeaturedItems(groupId,
531: categoryId, numOfItems);
532: }
533:
534: public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
535: long itemId) throws com.liferay.portal.PortalException,
536: com.liferay.portal.SystemException {
537: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
538: .getService();
539:
540: return shoppingItemLocalService.getItem(itemId);
541: }
542:
543: public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
544: long companyId, java.lang.String sku)
545: throws com.liferay.portal.PortalException,
546: com.liferay.portal.SystemException {
547: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
548: .getService();
549:
550: return shoppingItemLocalService.getItem(companyId, sku);
551: }
552:
553: public static com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
554: long largeImageId)
555: throws com.liferay.portal.PortalException,
556: com.liferay.portal.SystemException {
557: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
558: .getService();
559:
560: return shoppingItemLocalService
561: .getItemByLargeImageId(largeImageId);
562: }
563:
564: public static com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
565: long mediumImageId)
566: throws com.liferay.portal.PortalException,
567: com.liferay.portal.SystemException {
568: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
569: .getService();
570:
571: return shoppingItemLocalService
572: .getItemByMediumImageId(mediumImageId);
573: }
574:
575: public static com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
576: long smallImageId)
577: throws com.liferay.portal.PortalException,
578: com.liferay.portal.SystemException {
579: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
580: .getService();
581:
582: return shoppingItemLocalService
583: .getItemBySmallImageId(smallImageId);
584: }
585:
586: public static java.util.List getItems(long categoryId)
587: throws com.liferay.portal.SystemException {
588: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
589: .getService();
590:
591: return shoppingItemLocalService.getItems(categoryId);
592: }
593:
594: public static java.util.List getItems(long categoryId, int begin,
595: int end,
596: com.liferay.portal.kernel.util.OrderByComparator obc)
597: throws com.liferay.portal.SystemException {
598: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
599: .getService();
600:
601: return shoppingItemLocalService.getItems(categoryId, begin,
602: end, obc);
603: }
604:
605: public static com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
606: long itemId,
607: com.liferay.portal.kernel.util.OrderByComparator obc)
608: throws com.liferay.portal.PortalException,
609: com.liferay.portal.SystemException {
610: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
611: .getService();
612:
613: return shoppingItemLocalService
614: .getItemsPrevAndNext(itemId, obc);
615: }
616:
617: public static int getItemsCount(long categoryId)
618: throws com.liferay.portal.SystemException {
619: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
620: .getService();
621:
622: return shoppingItemLocalService.getItemsCount(categoryId);
623: }
624:
625: public static java.util.List getSaleItems(long groupId,
626: long categoryId, int numOfItems)
627: throws com.liferay.portal.SystemException {
628: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
629: .getService();
630:
631: return shoppingItemLocalService.getSaleItems(groupId,
632: categoryId, numOfItems);
633: }
634:
635: public static java.util.List search(long groupId,
636: long[] categoryIds, java.lang.String keywords, int begin,
637: int end) throws com.liferay.portal.SystemException {
638: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
639: .getService();
640:
641: return shoppingItemLocalService.search(groupId, categoryIds,
642: keywords, begin, end);
643: }
644:
645: public static int searchCount(long groupId, long[] categoryIds,
646: java.lang.String keywords)
647: throws com.liferay.portal.SystemException {
648: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
649: .getService();
650:
651: return shoppingItemLocalService.searchCount(groupId,
652: categoryIds, keywords);
653: }
654:
655: public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
656: long userId, long itemId, long categoryId,
657: java.lang.String sku, java.lang.String name,
658: java.lang.String description, java.lang.String properties,
659: java.lang.String fieldsQuantities,
660: boolean requiresShipping, int stockQuantity,
661: boolean featured, java.lang.Boolean sale,
662: boolean smallImage, java.lang.String smallImageURL,
663: java.io.File smallFile, boolean mediumImage,
664: java.lang.String mediumImageURL, java.io.File mediumFile,
665: boolean largeImage, java.lang.String largeImageURL,
666: java.io.File largeFile, java.util.List itemFields,
667: java.util.List itemPrices)
668: throws com.liferay.portal.PortalException,
669: com.liferay.portal.SystemException {
670: ShoppingItemLocalService shoppingItemLocalService = ShoppingItemLocalServiceFactory
671: .getService();
672:
673: return shoppingItemLocalService.updateItem(userId, itemId,
674: categoryId, sku, name, description, properties,
675: fieldsQuantities, requiresShipping, stockQuantity,
676: featured, sale, smallImage, smallImageURL, smallFile,
677: mediumImage, mediumImageURL, mediumFile, largeImage,
678: largeImageURL, largeFile, itemFields, itemPrices);
679: }
680: }
|