001
014
015 package com.liferay.portlet.shopping.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018
019
032 public class ShoppingItemLocalServiceUtil {
033 public static com.liferay.portlet.shopping.model.ShoppingItem addShoppingItem(
034 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
035 throws com.liferay.portal.kernel.exception.SystemException {
036 return getService().addShoppingItem(shoppingItem);
037 }
038
039 public static com.liferay.portlet.shopping.model.ShoppingItem createShoppingItem(
040 long itemId) {
041 return getService().createShoppingItem(itemId);
042 }
043
044 public static void deleteShoppingItem(long itemId)
045 throws com.liferay.portal.kernel.exception.PortalException,
046 com.liferay.portal.kernel.exception.SystemException {
047 getService().deleteShoppingItem(itemId);
048 }
049
050 public static void deleteShoppingItem(
051 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
052 throws com.liferay.portal.kernel.exception.SystemException {
053 getService().deleteShoppingItem(shoppingItem);
054 }
055
056 @SuppressWarnings("unchecked")
057 public static java.util.List dynamicQuery(
058 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059 throws com.liferay.portal.kernel.exception.SystemException {
060 return getService().dynamicQuery(dynamicQuery);
061 }
062
063 @SuppressWarnings("unchecked")
064 public static java.util.List dynamicQuery(
065 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
066 int end) throws com.liferay.portal.kernel.exception.SystemException {
067 return getService().dynamicQuery(dynamicQuery, start, end);
068 }
069
070 @SuppressWarnings("unchecked")
071 public static java.util.List dynamicQuery(
072 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
073 int end,
074 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
075 throws com.liferay.portal.kernel.exception.SystemException {
076 return getService()
077 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
078 }
079
080 public static long dynamicQueryCount(
081 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
082 throws com.liferay.portal.kernel.exception.SystemException {
083 return getService().dynamicQueryCount(dynamicQuery);
084 }
085
086 public static com.liferay.portlet.shopping.model.ShoppingItem getShoppingItem(
087 long itemId)
088 throws com.liferay.portal.kernel.exception.PortalException,
089 com.liferay.portal.kernel.exception.SystemException {
090 return getService().getShoppingItem(itemId);
091 }
092
093 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getShoppingItems(
094 int start, int end)
095 throws com.liferay.portal.kernel.exception.SystemException {
096 return getService().getShoppingItems(start, end);
097 }
098
099 public static int getShoppingItemsCount()
100 throws com.liferay.portal.kernel.exception.SystemException {
101 return getService().getShoppingItemsCount();
102 }
103
104 public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
105 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
106 throws com.liferay.portal.kernel.exception.SystemException {
107 return getService().updateShoppingItem(shoppingItem);
108 }
109
110 public static com.liferay.portlet.shopping.model.ShoppingItem updateShoppingItem(
111 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
112 boolean merge)
113 throws com.liferay.portal.kernel.exception.SystemException {
114 return getService().updateShoppingItem(shoppingItem, merge);
115 }
116
117 public static void addBookItems(long userId, long groupId, long categoryId,
118 java.lang.String[] isbns)
119 throws com.liferay.portal.kernel.exception.PortalException,
120 com.liferay.portal.kernel.exception.SystemException {
121 getService().addBookItems(userId, groupId, categoryId, isbns);
122 }
123
124 public static com.liferay.portlet.shopping.model.ShoppingItem addItem(
125 long userId, long groupId, long categoryId, java.lang.String sku,
126 java.lang.String name, java.lang.String description,
127 java.lang.String properties, java.lang.String fieldsQuantities,
128 boolean requiresShipping, int stockQuantity, boolean featured,
129 java.lang.Boolean sale, boolean smallImage,
130 java.lang.String smallImageURL, java.io.File smallFile,
131 boolean mediumImage, java.lang.String mediumImageURL,
132 java.io.File mediumFile, boolean largeImage,
133 java.lang.String largeImageURL, java.io.File largeFile,
134 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
135 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
136 com.liferay.portal.service.ServiceContext serviceContext)
137 throws com.liferay.portal.kernel.exception.PortalException,
138 com.liferay.portal.kernel.exception.SystemException {
139 return getService()
140 .addItem(userId, groupId, categoryId, sku, name,
141 description, properties, fieldsQuantities, requiresShipping,
142 stockQuantity, featured, sale, smallImage, smallImageURL,
143 smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
144 largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
145 }
146
147 public static void addItemResources(long itemId,
148 boolean addCommunityPermissions, boolean addGuestPermissions)
149 throws com.liferay.portal.kernel.exception.PortalException,
150 com.liferay.portal.kernel.exception.SystemException {
151 getService()
152 .addItemResources(itemId, 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.kernel.exception.PortalException,
160 com.liferay.portal.kernel.exception.SystemException {
161 getService()
162 .addItemResources(itemId, communityPermissions, guestPermissions);
163 }
164
165 public static void addItemResources(
166 com.liferay.portlet.shopping.model.ShoppingItem item,
167 boolean addCommunityPermissions, boolean addGuestPermissions)
168 throws com.liferay.portal.kernel.exception.PortalException,
169 com.liferay.portal.kernel.exception.SystemException {
170 getService()
171 .addItemResources(item, addCommunityPermissions, addGuestPermissions);
172 }
173
174 public static void addItemResources(
175 com.liferay.portlet.shopping.model.ShoppingItem item,
176 java.lang.String[] communityPermissions,
177 java.lang.String[] guestPermissions)
178 throws com.liferay.portal.kernel.exception.PortalException,
179 com.liferay.portal.kernel.exception.SystemException {
180 getService()
181 .addItemResources(item, communityPermissions, guestPermissions);
182 }
183
184 public static void deleteItem(long itemId)
185 throws com.liferay.portal.kernel.exception.PortalException,
186 com.liferay.portal.kernel.exception.SystemException {
187 getService().deleteItem(itemId);
188 }
189
190 public static void deleteItem(
191 com.liferay.portlet.shopping.model.ShoppingItem item)
192 throws com.liferay.portal.kernel.exception.PortalException,
193 com.liferay.portal.kernel.exception.SystemException {
194 getService().deleteItem(item);
195 }
196
197 public static void deleteItems(long groupId, long categoryId)
198 throws com.liferay.portal.kernel.exception.PortalException,
199 com.liferay.portal.kernel.exception.SystemException {
200 getService().deleteItems(groupId, categoryId);
201 }
202
203 public static int getCategoriesItemsCount(long groupId,
204 java.util.List<java.lang.Long> categoryIds)
205 throws com.liferay.portal.kernel.exception.SystemException {
206 return getService().getCategoriesItemsCount(groupId, categoryIds);
207 }
208
209 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getFeaturedItems(
210 long groupId, long categoryId, int numOfItems)
211 throws com.liferay.portal.kernel.exception.SystemException {
212 return getService().getFeaturedItems(groupId, categoryId, numOfItems);
213 }
214
215 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
216 long itemId)
217 throws com.liferay.portal.kernel.exception.PortalException,
218 com.liferay.portal.kernel.exception.SystemException {
219 return getService().getItem(itemId);
220 }
221
222 public static com.liferay.portlet.shopping.model.ShoppingItem getItem(
223 long companyId, java.lang.String sku)
224 throws com.liferay.portal.kernel.exception.PortalException,
225 com.liferay.portal.kernel.exception.SystemException {
226 return getService().getItem(companyId, sku);
227 }
228
229 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByLargeImageId(
230 long largeImageId)
231 throws com.liferay.portal.kernel.exception.PortalException,
232 com.liferay.portal.kernel.exception.SystemException {
233 return getService().getItemByLargeImageId(largeImageId);
234 }
235
236 public static com.liferay.portlet.shopping.model.ShoppingItem getItemByMediumImageId(
237 long mediumImageId)
238 throws com.liferay.portal.kernel.exception.PortalException,
239 com.liferay.portal.kernel.exception.SystemException {
240 return getService().getItemByMediumImageId(mediumImageId);
241 }
242
243 public static com.liferay.portlet.shopping.model.ShoppingItem getItemBySmallImageId(
244 long smallImageId)
245 throws com.liferay.portal.kernel.exception.PortalException,
246 com.liferay.portal.kernel.exception.SystemException {
247 return getService().getItemBySmallImageId(smallImageId);
248 }
249
250 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
251 long groupId, long categoryId)
252 throws com.liferay.portal.kernel.exception.SystemException {
253 return getService().getItems(groupId, categoryId);
254 }
255
256 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getItems(
257 long groupId, long categoryId, int start, int end,
258 com.liferay.portal.kernel.util.OrderByComparator obc)
259 throws com.liferay.portal.kernel.exception.SystemException {
260 return getService().getItems(groupId, categoryId, start, end, obc);
261 }
262
263 public static int getItemsCount(long groupId, long categoryId)
264 throws com.liferay.portal.kernel.exception.SystemException {
265 return getService().getItemsCount(groupId, categoryId);
266 }
267
268 public static com.liferay.portlet.shopping.model.ShoppingItem[] getItemsPrevAndNext(
269 long itemId, com.liferay.portal.kernel.util.OrderByComparator obc)
270 throws com.liferay.portal.kernel.exception.PortalException,
271 com.liferay.portal.kernel.exception.SystemException {
272 return getService().getItemsPrevAndNext(itemId, obc);
273 }
274
275 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> getSaleItems(
276 long groupId, long categoryId, int numOfItems)
277 throws com.liferay.portal.kernel.exception.SystemException {
278 return getService().getSaleItems(groupId, categoryId, numOfItems);
279 }
280
281 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> search(
282 long groupId, long[] categoryIds, java.lang.String keywords, int start,
283 int end) throws com.liferay.portal.kernel.exception.SystemException {
284 return getService().search(groupId, categoryIds, keywords, start, end);
285 }
286
287 public static int searchCount(long groupId, long[] categoryIds,
288 java.lang.String keywords)
289 throws com.liferay.portal.kernel.exception.SystemException {
290 return getService().searchCount(groupId, categoryIds, keywords);
291 }
292
293 public static com.liferay.portlet.shopping.model.ShoppingItem updateItem(
294 long userId, long itemId, long groupId, long categoryId,
295 java.lang.String sku, java.lang.String name,
296 java.lang.String description, java.lang.String properties,
297 java.lang.String fieldsQuantities, boolean requiresShipping,
298 int stockQuantity, boolean featured, java.lang.Boolean sale,
299 boolean smallImage, java.lang.String smallImageURL,
300 java.io.File smallFile, boolean mediumImage,
301 java.lang.String mediumImageURL, java.io.File mediumFile,
302 boolean largeImage, java.lang.String largeImageURL,
303 java.io.File largeFile,
304 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemField> itemFields,
305 java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> itemPrices,
306 com.liferay.portal.service.ServiceContext serviceContext)
307 throws com.liferay.portal.kernel.exception.PortalException,
308 com.liferay.portal.kernel.exception.SystemException {
309 return getService()
310 .updateItem(userId, itemId, groupId, categoryId, sku, name,
311 description, properties, fieldsQuantities, requiresShipping,
312 stockQuantity, featured, sale, smallImage, smallImageURL,
313 smallFile, mediumImage, mediumImageURL, mediumFile, largeImage,
314 largeImageURL, largeFile, itemFields, itemPrices, serviceContext);
315 }
316
317 public static ShoppingItemLocalService getService() {
318 if (_service == null) {
319 _service = (ShoppingItemLocalService)PortalBeanLocatorUtil.locate(ShoppingItemLocalService.class.getName());
320 }
321
322 return _service;
323 }
324
325 public void setService(ShoppingItemLocalService service) {
326 _service = service;
327 }
328
329 private static ShoppingItemLocalService _service;
330 }