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 void addBookItems(long userId, long categoryId,
107 java.lang.String[] isbns)
108 throws com.liferay.portal.PortalException,
109 com.liferay.portal.SystemException {
110 getService().addBookItems(userId, categoryId, isbns);
111 }
112
113 public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
114 long userId, long categoryId, java.lang.String sku,
115 java.lang.String name, java.lang.String description,
116 java.lang.String properties, java.lang.String fieldsQuantities,
117 boolean requiresShipping, int stockQuantity, boolean featured,
118 java.lang.Boolean sale, boolean smallImage,
119 java.lang.String smallImageURL, java.io.File smallFile,
120 boolean mediumImage, java.lang.String mediumImageURL,
121 java.io.File mediumFile, boolean largeImage,
122 java.lang.String largeImageURL, java.io.File largeFile,
123 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
124 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
125 boolean addCommunityPermissions, boolean addGuestPermissions)
126 throws com.liferay.portal.PortalException,
127 com.liferay.portal.SystemException {
128 return getService()
129 .addItem(userId, categoryId, sku, name, description,
130 properties, fieldsQuantities, requiresShipping, stockQuantity,
131 featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
132 mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
133 itemFields, itemPrices, addCommunityPermissions, addGuestPermissions);
134 }
135
136 public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
137 long userId, long categoryId, java.lang.String sku,
138 java.lang.String name, java.lang.String description,
139 java.lang.String properties, java.lang.String fieldsQuantities,
140 boolean requiresShipping, int stockQuantity, boolean featured,
141 java.lang.Boolean sale, boolean smallImage,
142 java.lang.String smallImageURL, java.io.File smallFile,
143 boolean mediumImage, java.lang.String mediumImageURL,
144 java.io.File mediumFile, boolean largeImage,
145 java.lang.String largeImageURL, java.io.File largeFile,
146 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
147 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
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, communityPermissions, guestPermissions);
158 }
159
160 public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
161 long userId, long categoryId, java.lang.String sku,
162 java.lang.String name, java.lang.String description,
163 java.lang.String properties, java.lang.String fieldsQuantities,
164 boolean requiresShipping, int stockQuantity, boolean featured,
165 java.lang.Boolean sale, boolean smallImage,
166 java.lang.String smallImageURL, java.io.File smallFile,
167 boolean mediumImage, java.lang.String mediumImageURL,
168 java.io.File mediumFile, boolean largeImage,
169 java.lang.String largeImageURL, java.io.File largeFile,
170 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
171 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
172 java.lang.Boolean addCommunityPermissions,
173 java.lang.Boolean addGuestPermissions,
174 java.lang.String[] communityPermissions,
175 java.lang.String[] guestPermissions)
176 throws com.liferay.portal.PortalException,
177 com.liferay.portal.SystemException {
178 return getService()
179 .addItem(userId, categoryId, sku, name, description,
180 properties, fieldsQuantities, requiresShipping, stockQuantity,
181 featured, sale, smallImage, smallImageURL, smallFile, mediumImage,
182 mediumImageURL, mediumFile, largeImage, largeImageURL, largeFile,
183 itemFields, itemPrices, addCommunityPermissions,
184 addGuestPermissions, communityPermissions, guestPermissions);
185 }
186
187 public static void addItemResources(long itemId,
188 boolean addCommunityPermissions, boolean addGuestPermissions)
189 throws com.liferay.portal.PortalException,
190 com.liferay.portal.SystemException {
191 getService()
192 .addItemResources(itemId, addCommunityPermissions,
193 addGuestPermissions);
194 }
195
196 public static void addItemResources(
197 com.liferay.portlet.shopping.model.ShoppingCategory category,
198 com.liferay.portlet.shopping.model.ShoppingItem item,
199 boolean addCommunityPermissions, boolean addGuestPermissions)
200 throws com.liferay.portal.PortalException,
201 com.liferay.portal.SystemException {
202 getService()
203 .addItemResources(category, item, addCommunityPermissions,
204 addGuestPermissions);
205 }
206
207 public static void addItemResources(long itemId,
208 java.lang.String[] communityPermissions,
209 java.lang.String[] guestPermissions)
210 throws com.liferay.portal.PortalException,
211 com.liferay.portal.SystemException {
212 getService()
213 .addItemResources(itemId, communityPermissions, guestPermissions);
214 }
215
216 public static void addItemResources(
217 com.liferay.portlet.shopping.model.ShoppingCategory category,
218 com.liferay.portlet.shopping.model.ShoppingItem item,
219 java.lang.String[] communityPermissions,
220 java.lang.String[] guestPermissions)
221 throws com.liferay.portal.PortalException,
222 com.liferay.portal.SystemException {
223 getService()
224 .addItemResources(category, item, communityPermissions,
225 guestPermissions);
226 }
227
228 public static void deleteItem(long itemId)
229 throws com.liferay.portal.PortalException,
230 com.liferay.portal.SystemException {
231 getService().deleteItem(itemId);
232 }
233
234 public static void deleteItem(
235 com.liferay.portlet.shopping.model.ShoppingItem item)
236 throws com.liferay.portal.PortalException,
237 com.liferay.portal.SystemException {
238 getService().deleteItem(item);
239 }
240
241 public static void deleteItems(long categoryId)
242 throws com.liferay.portal.PortalException,
243 com.liferay.portal.SystemException {
244 getService().deleteItems(categoryId);
245 }
246
247 public static int getCategoriesItemsCount(java.util.List<Long> categoryIds)
248 throws com.liferay.portal.SystemException {
249 return getService().getCategoriesItemsCount(categoryIds);
250 }
251
252 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
253 long groupId, long categoryId, int numOfItems)
254 throws com.liferay.portal.SystemException {
255 return getService().getFeaturedItems(groupId, categoryId, numOfItems);
256 }
257
258 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
259 long itemId)
260 throws com.liferay.portal.PortalException,
261 com.liferay.portal.SystemException {
262 return getService().getItem(itemId);
263 }
264
265 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
266 long companyId, java.lang.String sku)
267 throws com.liferay.portal.PortalException,
268 com.liferay.portal.SystemException {
269 return getService().getItem(companyId, sku);
270 }
271
272 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
273 long largeImageId)
274 throws com.liferay.portal.PortalException,
275 com.liferay.portal.SystemException {
276 return getService().getItemByLargeImageId(largeImageId);
277 }
278
279 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
280 long mediumImageId)
281 throws com.liferay.portal.PortalException,
282 com.liferay.portal.SystemException {
283 return getService().getItemByMediumImageId(mediumImageId);
284 }
285
286 public static com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
287 long smallImageId)
288 throws com.liferay.portal.PortalException,
289 com.liferay.portal.SystemException {
290 return getService().getItemBySmallImageId(smallImageId);
291 }
292
293 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
294 long categoryId) throws com.liferay.portal.SystemException {
295 return getService().getItems(categoryId);
296 }
297
298 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
299 long categoryId, int start, int end,
300 com.liferay.portal.kernel.util.OrderByComparator obc)
301 throws com.liferay.portal.SystemException {
302 return getService().getItems(categoryId, start, end, obc);
303 }
304
305 public static com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
306 long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
307 throws com.liferay.portal.PortalException,
308 com.liferay.portal.SystemException {
309 return getService().getItemsPrevAndNext(itemId, obc);
310 }
311
312 public static int getItemsCount(long categoryId)
313 throws com.liferay.portal.SystemException {
314 return getService().getItemsCount(categoryId);
315 }
316
317 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
318 long groupId, long categoryId, int numOfItems)
319 throws com.liferay.portal.SystemException {
320 return getService().getSaleItems(groupId, categoryId, numOfItems);
321 }
322
323 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
324 long groupId, long[] categoryIds, java.lang.String keywords, int start,
325 int end) throws com.liferay.portal.SystemException {
326 return getService().search(groupId, categoryIds, keywords, start, end);
327 }
328
329 public static int searchCount(long groupId, long[] categoryIds,
330 java.lang.String keywords) throws com.liferay.portal.SystemException {
331 return getService().searchCount(groupId, categoryIds, keywords);
332 }
333
334 public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
335 long userId, long itemId, long categoryId, java.lang.String sku,
336 java.lang.String name, java.lang.String description,
337 java.lang.String properties, java.lang.String fieldsQuantities,
338 boolean requiresShipping, int stockQuantity, boolean featured,
339 java.lang.Boolean sale, boolean smallImage,
340 java.lang.String smallImageURL, java.io.File smallFile,
341 boolean mediumImage, java.lang.String mediumImageURL,
342 java.io.File mediumFile, boolean largeImage,
343 java.lang.String largeImageURL, java.io.File largeFile,
344 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
345 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices)
346 throws com.liferay.portal.PortalException,
347 com.liferay.portal.SystemException {
348 return getService()
349 .updateItem(userId, itemId, categoryId, sku, name,
350 description, properties, fieldsQuantities, requiresShipping,
351 stockQuantity, featured, sale, smallImage, smallImageURL,
352 smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
353 largeImageURL, largeFile, itemFields, itemPrices);
354 }
355
356 public static ShoppingItemLocalService getService() {
357 if (_service == null) {
358 throw new RuntimeException("ShoppingItemLocalService is not set");
359 }
360
361 return _service;
362 }
363
364 public void setService(ShoppingItemLocalService service) {
365 _service = service;
366 }
367
368 private static ShoppingItemLocalService _service;
369 }