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