1
22
23 package com.liferay.portlet.shopping.service;
24
25
26
46 public class ShoppingItemLocalServiceUtil {
47 public static com.liferay.portlet.shopping.model.ShoppingItem addShoppingItem(
48 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
49 throws com.liferay.portal.SystemException {
50 return getService().addShoppingItem(shoppingItem);
51 }
52
53 public static com.liferay.portlet.shopping.model.ShoppingItem createShoppingItem(
54 long itemId) {
55 return getService().createShoppingItem(itemId);
56 }
57
58 public static void deleteShoppingItem(long itemId)
59 throws com.liferay.portal.PortalException,
60 com.liferay.portal.SystemException {
61 getService().deleteShoppingItem(itemId);
62 }
63
64 public static void deleteShoppingItem(
65 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
66 throws com.liferay.portal.SystemException {
67 getService().deleteShoppingItem(shoppingItem);
68 }
69
70 public static java.util.List<Object> dynamicQuery(
71 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
72 throws com.liferay.portal.SystemException {
73 return getService().dynamicQuery(dynamicQuery);
74 }
75
76 public static java.util.List<Object> dynamicQuery(
77 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78 int end) throws com.liferay.portal.SystemException {
79 return getService().dynamicQuery(dynamicQuery, start, end);
80 }
81
82 public static com.liferay.portlet.shopping.model.ShoppingItem getShoppingItem(
83 long itemId)
84 throws com.liferay.portal.PortalException,
85 com.liferay.portal.SystemException {
86 return getService().getShoppingItem(itemId);
87 }
88
89 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getShoppingItems(
90 int start, int end) throws com.liferay.portal.SystemException {
91 return getService().getShoppingItems(start, end);
92 }
93
94 public static int getShoppingItemsCount()
95 throws com.liferay.portal.SystemException {
96 return getService().getShoppingItemsCount();
97 }
98
99 public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
100 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
101 throws com.liferay.portal.SystemException {
102 return getService().updateShoppingItem(shoppingItem);
103 }
104
105 public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
106 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
107 boolean merge) throws com.liferay.portal.SystemException {
108 return getService().updateShoppingItem(shoppingItem, merge);
109 }
110
111 public static void addBookItems(long userId, long categoryId,
112 java.lang.String[] isbns)
113 throws com.liferay.portal.PortalException,
114 com.liferay.portal.SystemException {
115 getService().addBookItems(userId, categoryId, isbns);
116 }
117
118 public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
119 long userId, long categoryId, java.lang.String sku,
120 java.lang.String name, java.lang.String description,
121 java.lang.String properties, java.lang.String fieldsQuantities,
122 boolean requiresShipping, int stockQuantity, boolean featured,
123 java.lang.Boolean sale, boolean smallImage,
124 java.lang.String smallImageURL, java.io.File smallFile,
125 boolean mediumImage, java.lang.String mediumImageURL,
126 java.io.File mediumFile, boolean largeImage,
127 java.lang.String largeImageURL, java.io.File largeFile,
128 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
129 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
130 boolean addCommunityPermissions, boolean addGuestPermissions)
131 throws com.liferay.portal.PortalException,
132 com.liferay.portal.SystemException {
133 return getService()
134 .addItem(userId, categoryId, sku, name, description,
135 properties, fieldsQuantities, requiresShipping, stockQuantity,
136 featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
137 mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
138 itemFields, itemPrices, addCommunityPermissions, addGuestPermissions);
139 }
140
141 public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
142 long userId, long categoryId, java.lang.String sku,
143 java.lang.String name, java.lang.String description,
144 java.lang.String properties, java.lang.String fieldsQuantities,
145 boolean requiresShipping, int stockQuantity, boolean featured,
146 java.lang.Boolean sale, boolean smallImage,
147 java.lang.String smallImageURL, java.io.File smallFile,
148 boolean mediumImage, java.lang.String mediumImageURL,
149 java.io.File mediumFile, boolean largeImage,
150 java.lang.String largeImageURL, java.io.File largeFile,
151 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
152 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
153 java.lang.String[] communityPermissions,
154 java.lang.String[] guestPermissions)
155 throws com.liferay.portal.PortalException,
156 com.liferay.portal.SystemException {
157 return getService()
158 .addItem(userId, categoryId, sku, name, description,
159 properties, fieldsQuantities, requiresShipping, stockQuantity,
160 featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
161 mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
162 itemFields, itemPrices, communityPermissions, guestPermissions);
163 }
164
165 public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
166 long userId, long categoryId, java.lang.String sku,
167 java.lang.String name, java.lang.String description,
168 java.lang.String properties, java.lang.String fieldsQuantities,
169 boolean requiresShipping, int stockQuantity, boolean featured,
170 java.lang.Boolean sale, boolean smallImage,
171 java.lang.String smallImageURL, java.io.File smallFile,
172 boolean mediumImage, java.lang.String mediumImageURL,
173 java.io.File mediumFile, boolean largeImage,
174 java.lang.String largeImageURL, java.io.File largeFile,
175 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
176 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
177 java.lang.Boolean addCommunityPermissions,
178 java.lang.Boolean addGuestPermissions,
179 java.lang.String[] communityPermissions,
180 java.lang.String[] guestPermissions)
181 throws com.liferay.portal.PortalException,
182 com.liferay.portal.SystemException {
183 return getService()
184 .addItem(userId, categoryId, sku, name, description,
185 properties, fieldsQuantities, requiresShipping, stockQuantity,
186 featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
187 mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
188 itemFields, itemPrices, addCommunityPermissions,
189 addGuestPermissions, communityPermissions, guestPermissions);
190 }
191
192 public static void addItemResources(long itemId,
193 boolean addCommunityPermissions, boolean addGuestPermissions)
194 throws com.liferay.portal.PortalException,
195 com.liferay.portal.SystemException {
196 getService()
197 .addItemResources(itemId, addCommunityPermissions,
198 addGuestPermissions);
199 }
200
201 public static void addItemResources(
202 com.liferay.portlet.shopping.model.ShoppingCategory category,
203 com.liferay.portlet.shopping.model.ShoppingItem item,
204 boolean addCommunityPermissions, boolean addGuestPermissions)
205 throws com.liferay.portal.PortalException,
206 com.liferay.portal.SystemException {
207 getService()
208 .addItemResources(category, item, addCommunityPermissions,
209 addGuestPermissions);
210 }
211
212 public static void addItemResources(long itemId,
213 java.lang.String[] communityPermissions,
214 java.lang.String[] guestPermissions)
215 throws com.liferay.portal.PortalException,
216 com.liferay.portal.SystemException {
217 getService()
218 .addItemResources(itemId, communityPermissions, guestPermissions);
219 }
220
221 public static void addItemResources(
222 com.liferay.portlet.shopping.model.ShoppingCategory category,
223 com.liferay.portlet.shopping.model.ShoppingItem item,
224 java.lang.String[] communityPermissions,
225 java.lang.String[] guestPermissions)
226 throws com.liferay.portal.PortalException,
227 com.liferay.portal.SystemException {
228 getService()
229 .addItemResources(category, item, communityPermissions,
230 guestPermissions);
231 }
232
233 public static void deleteItem(long itemId)
234 throws com.liferay.portal.PortalException,
235 com.liferay.portal.SystemException {
236 getService().deleteItem(itemId);
237 }
238
239 public static void deleteItem(
240 com.liferay.portlet.shopping.model.ShoppingItem item)
241 throws com.liferay.portal.PortalException,
242 com.liferay.portal.SystemException {
243 getService().deleteItem(item);
244 }
245
246 public static void deleteItems(long categoryId)
247 throws com.liferay.portal.PortalException,
248 com.liferay.portal.SystemException {
249 getService().deleteItems(categoryId);
250 }
251
252 public static int getCategoriesItemsCount(java.util.List<Long> categoryIds)
253 throws com.liferay.portal.SystemException {
254 return getService().getCategoriesItemsCount(categoryIds);
255 }
256
257 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
258 long groupId, long categoryId, int numOfItems)
259 throws com.liferay.portal.SystemException {
260 return getService().getFeaturedItems(groupId, categoryId, numOfItems);
261 }
262
263 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
264 long itemId)
265 throws com.liferay.portal.PortalException,
266 com.liferay.portal.SystemException {
267 return getService().getItem(itemId);
268 }
269
270 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
271 long companyId, java.lang.String sku)
272 throws com.liferay.portal.PortalException,
273 com.liferay.portal.SystemException {
274 return getService().getItem(companyId, sku);
275 }
276
277 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
278 long largeImageId)
279 throws com.liferay.portal.PortalException,
280 com.liferay.portal.SystemException {
281 return getService().getItemByLargeImageId(largeImageId);
282 }
283
284 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
285 long mediumImageId)
286 throws com.liferay.portal.PortalException,
287 com.liferay.portal.SystemException {
288 return getService().getItemByMediumImageId(mediumImageId);
289 }
290
291 public static com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
292 long smallImageId)
293 throws com.liferay.portal.PortalException,
294 com.liferay.portal.SystemException {
295 return getService().getItemBySmallImageId(smallImageId);
296 }
297
298 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
299 long categoryId) throws com.liferay.portal.SystemException {
300 return getService().getItems(categoryId);
301 }
302
303 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
304 long categoryId, int start, int end,
305 com.liferay.portal.kernel.util.OrderByComparator obc)
306 throws com.liferay.portal.SystemException {
307 return getService().getItems(categoryId, start, end, obc);
308 }
309
310 public static com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
311 long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
312 throws com.liferay.portal.PortalException,
313 com.liferay.portal.SystemException {
314 return getService().getItemsPrevAndNext(itemId, obc);
315 }
316
317 public static int getItemsCount(long categoryId)
318 throws com.liferay.portal.SystemException {
319 return getService().getItemsCount(categoryId);
320 }
321
322 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
323 long groupId, long categoryId, int numOfItems)
324 throws com.liferay.portal.SystemException {
325 return getService().getSaleItems(groupId, categoryId, numOfItems);
326 }
327
328 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
329 long groupId, long[] categoryIds, java.lang.String keywords, int start,
330 int end) throws com.liferay.portal.SystemException {
331 return getService().search(groupId, categoryIds, keywords, start, end);
332 }
333
334 public static int searchCount(long groupId, long[] categoryIds,
335 java.lang.String keywords) throws com.liferay.portal.SystemException {
336 return getService().searchCount(groupId, categoryIds, keywords);
337 }
338
339 public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
340 long userId, long itemId, long categoryId, java.lang.String sku,
341 java.lang.String name, java.lang.String description,
342 java.lang.String properties, java.lang.String fieldsQuantities,
343 boolean requiresShipping, int stockQuantity, boolean featured,
344 java.lang.Boolean sale, boolean smallImage,
345 java.lang.String smallImageURL, java.io.File smallFile,
346 boolean mediumImage, java.lang.String mediumImageURL,
347 java.io.File mediumFile, boolean largeImage,
348 java.lang.String largeImageURL, java.io.File largeFile,
349 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
350 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices)
351 throws com.liferay.portal.PortalException,
352 com.liferay.portal.SystemException {
353 return getService()
354 .updateItem(userId, itemId, categoryId, sku, name,
355 description, properties, fieldsQuantities, requiresShipping,
356 stockQuantity, featured, sale, smallImage, smallImageURL,
357 smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
358 largeImageURL, largeFile, itemFields, itemPrices);
359 }
360
361 public static ShoppingItemLocalService getService() {
362 if (_service == null) {
363 throw new RuntimeException("ShoppingItemLocalService is not set");
364 }
365
366 return _service;
367 }
368
369 public void setService(ShoppingItemLocalService service) {
370 _service = service;
371 }
372
373 private static ShoppingItemLocalService _service;
374 }