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