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