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