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 com.liferay.portal.service.ServiceContext serviceContext)
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, serviceContext);
140 }
141
142 public static void addItemResources(long itemId,
143 boolean addCommunityPermissions, boolean addGuestPermissions)
144 throws com.liferay.portal.PortalException,
145 com.liferay.portal.SystemException {
146 getService()
147 .addItemResources(itemId, addCommunityPermissions,
148 addGuestPermissions);
149 }
150
151 public static void addItemResources(
152 com.liferay.portlet.shopping.model.ShoppingCategory category,
153 com.liferay.portlet.shopping.model.ShoppingItem item,
154 boolean addCommunityPermissions, boolean addGuestPermissions)
155 throws com.liferay.portal.PortalException,
156 com.liferay.portal.SystemException {
157 getService()
158 .addItemResources(category, item, addCommunityPermissions,
159 addGuestPermissions);
160 }
161
162 public static void addItemResources(long itemId,
163 java.lang.String[] communityPermissions,
164 java.lang.String[] guestPermissions)
165 throws com.liferay.portal.PortalException,
166 com.liferay.portal.SystemException {
167 getService()
168 .addItemResources(itemId, communityPermissions, guestPermissions);
169 }
170
171 public static void addItemResources(
172 com.liferay.portlet.shopping.model.ShoppingCategory category,
173 com.liferay.portlet.shopping.model.ShoppingItem item,
174 java.lang.String[] communityPermissions,
175 java.lang.String[] guestPermissions)
176 throws com.liferay.portal.PortalException,
177 com.liferay.portal.SystemException {
178 getService()
179 .addItemResources(category, item, communityPermissions,
180 guestPermissions);
181 }
182
183 public static void deleteItem(long itemId)
184 throws com.liferay.portal.PortalException,
185 com.liferay.portal.SystemException {
186 getService().deleteItem(itemId);
187 }
188
189 public static void deleteItem(
190 com.liferay.portlet.shopping.model.ShoppingItem item)
191 throws com.liferay.portal.PortalException,
192 com.liferay.portal.SystemException {
193 getService().deleteItem(item);
194 }
195
196 public static void deleteItems(long categoryId)
197 throws com.liferay.portal.PortalException,
198 com.liferay.portal.SystemException {
199 getService().deleteItems(categoryId);
200 }
201
202 public static int getCategoriesItemsCount(java.util.List<Long> categoryIds)
203 throws com.liferay.portal.SystemException {
204 return getService().getCategoriesItemsCount(categoryIds);
205 }
206
207 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
208 long groupId, long categoryId, int numOfItems)
209 throws com.liferay.portal.SystemException {
210 return getService().getFeaturedItems(groupId, categoryId, numOfItems);
211 }
212
213 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
214 long itemId)
215 throws com.liferay.portal.PortalException,
216 com.liferay.portal.SystemException {
217 return getService().getItem(itemId);
218 }
219
220 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
221 long companyId, java.lang.String sku)
222 throws com.liferay.portal.PortalException,
223 com.liferay.portal.SystemException {
224 return getService().getItem(companyId, sku);
225 }
226
227 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
228 long largeImageId)
229 throws com.liferay.portal.PortalException,
230 com.liferay.portal.SystemException {
231 return getService().getItemByLargeImageId(largeImageId);
232 }
233
234 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
235 long mediumImageId)
236 throws com.liferay.portal.PortalException,
237 com.liferay.portal.SystemException {
238 return getService().getItemByMediumImageId(mediumImageId);
239 }
240
241 public static com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
242 long smallImageId)
243 throws com.liferay.portal.PortalException,
244 com.liferay.portal.SystemException {
245 return getService().getItemBySmallImageId(smallImageId);
246 }
247
248 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
249 long categoryId) throws com.liferay.portal.SystemException {
250 return getService().getItems(categoryId);
251 }
252
253 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
254 long categoryId, int start, int end,
255 com.liferay.portal.kernel.util.OrderByComparator obc)
256 throws com.liferay.portal.SystemException {
257 return getService().getItems(categoryId, start, end, obc);
258 }
259
260 public static com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
261 long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
262 throws com.liferay.portal.PortalException,
263 com.liferay.portal.SystemException {
264 return getService().getItemsPrevAndNext(itemId, obc);
265 }
266
267 public static int getItemsCount(long categoryId)
268 throws com.liferay.portal.SystemException {
269 return getService().getItemsCount(categoryId);
270 }
271
272 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
273 long groupId, long categoryId, int numOfItems)
274 throws com.liferay.portal.SystemException {
275 return getService().getSaleItems(groupId, categoryId, numOfItems);
276 }
277
278 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
279 long groupId, long[] categoryIds, java.lang.String keywords, int start,
280 int end) throws com.liferay.portal.SystemException {
281 return getService().search(groupId, categoryIds, keywords, start, end);
282 }
283
284 public static int searchCount(long groupId, long[] categoryIds,
285 java.lang.String keywords) throws com.liferay.portal.SystemException {
286 return getService().searchCount(groupId, categoryIds, keywords);
287 }
288
289 public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
290 long userId, long itemId, long categoryId, java.lang.String sku,
291 java.lang.String name, java.lang.String description,
292 java.lang.String properties, java.lang.String fieldsQuantities,
293 boolean requiresShipping, int stockQuantity, boolean featured,
294 java.lang.Boolean sale, boolean smallImage,
295 java.lang.String smallImageURL, java.io.File smallFile,
296 boolean mediumImage, java.lang.String mediumImageURL,
297 java.io.File mediumFile, boolean largeImage,
298 java.lang.String largeImageURL, java.io.File largeFile,
299 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
300 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
301 com.liferay.portal.service.ServiceContext serviceContext)
302 throws com.liferay.portal.PortalException,
303 com.liferay.portal.SystemException {
304 return getService()
305 .updateItem(userId, itemId, categoryId, sku, name,
306 description, properties, fieldsQuantities, requiresShipping,
307 stockQuantity, featured, sale, smallImage, smallImageURL,
308 smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
309 largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
310 }
311
312 public static ShoppingItemLocalService getService() {
313 if (_service == null) {
314 throw new RuntimeException("ShoppingItemLocalService is not set");
315 }
316
317 return _service;
318 }
319
320 public void setService(ShoppingItemLocalService service) {
321 _service = service;
322 }
323
324 private static ShoppingItemLocalService _service;
325 }