1
14
15 package com.liferay.portlet.shopping.service.persistence;
16
17 import com.liferay.portal.SystemException;
18 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20
21 import com.liferay.portlet.shopping.model.ShoppingItem;
22
23 import java.util.List;
24
25
38 public class ShoppingItemUtil {
39
42 public static void clearCache() {
43 getPersistence().clearCache();
44 }
45
46
49 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
50 throws SystemException {
51 return getPersistence().findWithDynamicQuery(dynamicQuery);
52 }
53
54
57 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
58 int start, int end) throws SystemException {
59 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
60 }
61
62
65 public static ShoppingItem remove(ShoppingItem shoppingItem)
66 throws SystemException {
67 return getPersistence().remove(shoppingItem);
68 }
69
70
73 public static ShoppingItem update(ShoppingItem shoppingItem, boolean merge)
74 throws SystemException {
75 return getPersistence().update(shoppingItem, merge);
76 }
77
78 public static void cacheResult(
79 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem) {
80 getPersistence().cacheResult(shoppingItem);
81 }
82
83 public static void cacheResult(
84 java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> shoppingItems) {
85 getPersistence().cacheResult(shoppingItems);
86 }
87
88 public static com.liferay.portlet.shopping.model.ShoppingItem create(
89 long itemId) {
90 return getPersistence().create(itemId);
91 }
92
93 public static com.liferay.portlet.shopping.model.ShoppingItem remove(
94 long itemId)
95 throws com.liferay.portal.SystemException,
96 com.liferay.portlet.shopping.NoSuchItemException {
97 return getPersistence().remove(itemId);
98 }
99
100
103 public static com.liferay.portlet.shopping.model.ShoppingItem update(
104 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
105 throws com.liferay.portal.SystemException {
106 return getPersistence().update(shoppingItem);
107 }
108
109 public static com.liferay.portlet.shopping.model.ShoppingItem updateImpl(
110 com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
111 boolean merge) throws com.liferay.portal.SystemException {
112 return getPersistence().updateImpl(shoppingItem, merge);
113 }
114
115 public static com.liferay.portlet.shopping.model.ShoppingItem findByPrimaryKey(
116 long itemId)
117 throws com.liferay.portal.SystemException,
118 com.liferay.portlet.shopping.NoSuchItemException {
119 return getPersistence().findByPrimaryKey(itemId);
120 }
121
122 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByPrimaryKey(
123 long itemId) throws com.liferay.portal.SystemException {
124 return getPersistence().fetchByPrimaryKey(itemId);
125 }
126
127 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
128 long categoryId) throws com.liferay.portal.SystemException {
129 return getPersistence().findByCategoryId(categoryId);
130 }
131
132 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
133 long categoryId, int start, int end)
134 throws com.liferay.portal.SystemException {
135 return getPersistence().findByCategoryId(categoryId, start, end);
136 }
137
138 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByCategoryId(
139 long categoryId, int start, int end,
140 com.liferay.portal.kernel.util.OrderByComparator obc)
141 throws com.liferay.portal.SystemException {
142 return getPersistence().findByCategoryId(categoryId, start, end, obc);
143 }
144
145 public static com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_First(
146 long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
147 throws com.liferay.portal.SystemException,
148 com.liferay.portlet.shopping.NoSuchItemException {
149 return getPersistence().findByCategoryId_First(categoryId, obc);
150 }
151
152 public static com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_Last(
153 long categoryId, com.liferay.portal.kernel.util.OrderByComparator obc)
154 throws com.liferay.portal.SystemException,
155 com.liferay.portlet.shopping.NoSuchItemException {
156 return getPersistence().findByCategoryId_Last(categoryId, obc);
157 }
158
159 public static com.liferay.portlet.shopping.model.ShoppingItem[] findByCategoryId_PrevAndNext(
160 long itemId, long categoryId,
161 com.liferay.portal.kernel.util.OrderByComparator obc)
162 throws com.liferay.portal.SystemException,
163 com.liferay.portlet.shopping.NoSuchItemException {
164 return getPersistence()
165 .findByCategoryId_PrevAndNext(itemId, categoryId, obc);
166 }
167
168 public static com.liferay.portlet.shopping.model.ShoppingItem findBySmallImageId(
169 long smallImageId)
170 throws com.liferay.portal.SystemException,
171 com.liferay.portlet.shopping.NoSuchItemException {
172 return getPersistence().findBySmallImageId(smallImageId);
173 }
174
175 public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
176 long smallImageId) throws com.liferay.portal.SystemException {
177 return getPersistence().fetchBySmallImageId(smallImageId);
178 }
179
180 public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
181 long smallImageId, boolean retrieveFromCache)
182 throws com.liferay.portal.SystemException {
183 return getPersistence()
184 .fetchBySmallImageId(smallImageId, retrieveFromCache);
185 }
186
187 public static com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId(
188 long mediumImageId)
189 throws com.liferay.portal.SystemException,
190 com.liferay.portlet.shopping.NoSuchItemException {
191 return getPersistence().findByMediumImageId(mediumImageId);
192 }
193
194 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
195 long mediumImageId) throws com.liferay.portal.SystemException {
196 return getPersistence().fetchByMediumImageId(mediumImageId);
197 }
198
199 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
200 long mediumImageId, boolean retrieveFromCache)
201 throws com.liferay.portal.SystemException {
202 return getPersistence()
203 .fetchByMediumImageId(mediumImageId, retrieveFromCache);
204 }
205
206 public static com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId(
207 long largeImageId)
208 throws com.liferay.portal.SystemException,
209 com.liferay.portlet.shopping.NoSuchItemException {
210 return getPersistence().findByLargeImageId(largeImageId);
211 }
212
213 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
214 long largeImageId) throws com.liferay.portal.SystemException {
215 return getPersistence().fetchByLargeImageId(largeImageId);
216 }
217
218 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
219 long largeImageId, boolean retrieveFromCache)
220 throws com.liferay.portal.SystemException {
221 return getPersistence()
222 .fetchByLargeImageId(largeImageId, retrieveFromCache);
223 }
224
225 public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S(
226 long companyId, java.lang.String sku)
227 throws com.liferay.portal.SystemException,
228 com.liferay.portlet.shopping.NoSuchItemException {
229 return getPersistence().findByC_S(companyId, sku);
230 }
231
232 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
233 long companyId, java.lang.String sku)
234 throws com.liferay.portal.SystemException {
235 return getPersistence().fetchByC_S(companyId, sku);
236 }
237
238 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
239 long companyId, java.lang.String sku, boolean retrieveFromCache)
240 throws com.liferay.portal.SystemException {
241 return getPersistence().fetchByC_S(companyId, sku, retrieveFromCache);
242 }
243
244 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll()
245 throws com.liferay.portal.SystemException {
246 return getPersistence().findAll();
247 }
248
249 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
250 int start, int end) throws com.liferay.portal.SystemException {
251 return getPersistence().findAll(start, end);
252 }
253
254 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
255 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
256 throws com.liferay.portal.SystemException {
257 return getPersistence().findAll(start, end, obc);
258 }
259
260 public static void removeByCategoryId(long categoryId)
261 throws com.liferay.portal.SystemException {
262 getPersistence().removeByCategoryId(categoryId);
263 }
264
265 public static void removeBySmallImageId(long smallImageId)
266 throws com.liferay.portal.SystemException,
267 com.liferay.portlet.shopping.NoSuchItemException {
268 getPersistence().removeBySmallImageId(smallImageId);
269 }
270
271 public static void removeByMediumImageId(long mediumImageId)
272 throws com.liferay.portal.SystemException,
273 com.liferay.portlet.shopping.NoSuchItemException {
274 getPersistence().removeByMediumImageId(mediumImageId);
275 }
276
277 public static void removeByLargeImageId(long largeImageId)
278 throws com.liferay.portal.SystemException,
279 com.liferay.portlet.shopping.NoSuchItemException {
280 getPersistence().removeByLargeImageId(largeImageId);
281 }
282
283 public static void removeByC_S(long companyId, java.lang.String sku)
284 throws com.liferay.portal.SystemException,
285 com.liferay.portlet.shopping.NoSuchItemException {
286 getPersistence().removeByC_S(companyId, sku);
287 }
288
289 public static void removeAll() throws com.liferay.portal.SystemException {
290 getPersistence().removeAll();
291 }
292
293 public static int countByCategoryId(long categoryId)
294 throws com.liferay.portal.SystemException {
295 return getPersistence().countByCategoryId(categoryId);
296 }
297
298 public static int countBySmallImageId(long smallImageId)
299 throws com.liferay.portal.SystemException {
300 return getPersistence().countBySmallImageId(smallImageId);
301 }
302
303 public static int countByMediumImageId(long mediumImageId)
304 throws com.liferay.portal.SystemException {
305 return getPersistence().countByMediumImageId(mediumImageId);
306 }
307
308 public static int countByLargeImageId(long largeImageId)
309 throws com.liferay.portal.SystemException {
310 return getPersistence().countByLargeImageId(largeImageId);
311 }
312
313 public static int countByC_S(long companyId, java.lang.String sku)
314 throws com.liferay.portal.SystemException {
315 return getPersistence().countByC_S(companyId, sku);
316 }
317
318 public static int countAll() throws com.liferay.portal.SystemException {
319 return getPersistence().countAll();
320 }
321
322 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
323 long pk) throws com.liferay.portal.SystemException {
324 return getPersistence().getShoppingItemPrices(pk);
325 }
326
327 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
328 long pk, int start, int end) throws com.liferay.portal.SystemException {
329 return getPersistence().getShoppingItemPrices(pk, start, end);
330 }
331
332 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
333 long pk, int start, int end,
334 com.liferay.portal.kernel.util.OrderByComparator obc)
335 throws com.liferay.portal.SystemException {
336 return getPersistence().getShoppingItemPrices(pk, start, end, obc);
337 }
338
339 public static int getShoppingItemPricesSize(long pk)
340 throws com.liferay.portal.SystemException {
341 return getPersistence().getShoppingItemPricesSize(pk);
342 }
343
344 public static boolean containsShoppingItemPrice(long pk,
345 long shoppingItemPricePK) throws com.liferay.portal.SystemException {
346 return getPersistence()
347 .containsShoppingItemPrice(pk, shoppingItemPricePK);
348 }
349
350 public static boolean containsShoppingItemPrices(long pk)
351 throws com.liferay.portal.SystemException {
352 return getPersistence().containsShoppingItemPrices(pk);
353 }
354
355 public static ShoppingItemPersistence getPersistence() {
356 if (_persistence == null) {
357 _persistence = (ShoppingItemPersistence)PortalBeanLocatorUtil.locate(ShoppingItemPersistence.class.getName());
358 }
359
360 return _persistence;
361 }
362
363 public void setPersistence(ShoppingItemPersistence persistence) {
364 _persistence = persistence;
365 }
366
367 private static ShoppingItemPersistence _persistence;
368 }