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 orderByComparator)
141 throws com.liferay.portal.SystemException {
142 return getPersistence()
143 .findByCategoryId(categoryId, start, end, orderByComparator);
144 }
145
146 public static com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_First(
147 long categoryId,
148 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
149 throws com.liferay.portal.SystemException,
150 com.liferay.portlet.shopping.NoSuchItemException {
151 return getPersistence()
152 .findByCategoryId_First(categoryId, orderByComparator);
153 }
154
155 public static com.liferay.portlet.shopping.model.ShoppingItem findByCategoryId_Last(
156 long categoryId,
157 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
158 throws com.liferay.portal.SystemException,
159 com.liferay.portlet.shopping.NoSuchItemException {
160 return getPersistence()
161 .findByCategoryId_Last(categoryId, orderByComparator);
162 }
163
164 public static com.liferay.portlet.shopping.model.ShoppingItem[] findByCategoryId_PrevAndNext(
165 long itemId, long categoryId,
166 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167 throws com.liferay.portal.SystemException,
168 com.liferay.portlet.shopping.NoSuchItemException {
169 return getPersistence()
170 .findByCategoryId_PrevAndNext(itemId, categoryId,
171 orderByComparator);
172 }
173
174 public static com.liferay.portlet.shopping.model.ShoppingItem findBySmallImageId(
175 long smallImageId)
176 throws com.liferay.portal.SystemException,
177 com.liferay.portlet.shopping.NoSuchItemException {
178 return getPersistence().findBySmallImageId(smallImageId);
179 }
180
181 public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
182 long smallImageId) throws com.liferay.portal.SystemException {
183 return getPersistence().fetchBySmallImageId(smallImageId);
184 }
185
186 public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
187 long smallImageId, boolean retrieveFromCache)
188 throws com.liferay.portal.SystemException {
189 return getPersistence()
190 .fetchBySmallImageId(smallImageId, retrieveFromCache);
191 }
192
193 public static com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId(
194 long mediumImageId)
195 throws com.liferay.portal.SystemException,
196 com.liferay.portlet.shopping.NoSuchItemException {
197 return getPersistence().findByMediumImageId(mediumImageId);
198 }
199
200 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
201 long mediumImageId) throws com.liferay.portal.SystemException {
202 return getPersistence().fetchByMediumImageId(mediumImageId);
203 }
204
205 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
206 long mediumImageId, boolean retrieveFromCache)
207 throws com.liferay.portal.SystemException {
208 return getPersistence()
209 .fetchByMediumImageId(mediumImageId, retrieveFromCache);
210 }
211
212 public static com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId(
213 long largeImageId)
214 throws com.liferay.portal.SystemException,
215 com.liferay.portlet.shopping.NoSuchItemException {
216 return getPersistence().findByLargeImageId(largeImageId);
217 }
218
219 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
220 long largeImageId) throws com.liferay.portal.SystemException {
221 return getPersistence().fetchByLargeImageId(largeImageId);
222 }
223
224 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
225 long largeImageId, boolean retrieveFromCache)
226 throws com.liferay.portal.SystemException {
227 return getPersistence()
228 .fetchByLargeImageId(largeImageId, retrieveFromCache);
229 }
230
231 public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S(
232 long companyId, java.lang.String sku)
233 throws com.liferay.portal.SystemException,
234 com.liferay.portlet.shopping.NoSuchItemException {
235 return getPersistence().findByC_S(companyId, sku);
236 }
237
238 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
239 long companyId, java.lang.String sku)
240 throws com.liferay.portal.SystemException {
241 return getPersistence().fetchByC_S(companyId, sku);
242 }
243
244 public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
245 long companyId, java.lang.String sku, boolean retrieveFromCache)
246 throws com.liferay.portal.SystemException {
247 return getPersistence().fetchByC_S(companyId, sku, retrieveFromCache);
248 }
249
250 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll()
251 throws com.liferay.portal.SystemException {
252 return getPersistence().findAll();
253 }
254
255 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
256 int start, int end) throws com.liferay.portal.SystemException {
257 return getPersistence().findAll(start, end);
258 }
259
260 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
261 int start, int end,
262 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
263 throws com.liferay.portal.SystemException {
264 return getPersistence().findAll(start, end, orderByComparator);
265 }
266
267 public static void removeByCategoryId(long categoryId)
268 throws com.liferay.portal.SystemException {
269 getPersistence().removeByCategoryId(categoryId);
270 }
271
272 public static void removeBySmallImageId(long smallImageId)
273 throws com.liferay.portal.SystemException,
274 com.liferay.portlet.shopping.NoSuchItemException {
275 getPersistence().removeBySmallImageId(smallImageId);
276 }
277
278 public static void removeByMediumImageId(long mediumImageId)
279 throws com.liferay.portal.SystemException,
280 com.liferay.portlet.shopping.NoSuchItemException {
281 getPersistence().removeByMediumImageId(mediumImageId);
282 }
283
284 public static void removeByLargeImageId(long largeImageId)
285 throws com.liferay.portal.SystemException,
286 com.liferay.portlet.shopping.NoSuchItemException {
287 getPersistence().removeByLargeImageId(largeImageId);
288 }
289
290 public static void removeByC_S(long companyId, java.lang.String sku)
291 throws com.liferay.portal.SystemException,
292 com.liferay.portlet.shopping.NoSuchItemException {
293 getPersistence().removeByC_S(companyId, sku);
294 }
295
296 public static void removeAll() throws com.liferay.portal.SystemException {
297 getPersistence().removeAll();
298 }
299
300 public static int countByCategoryId(long categoryId)
301 throws com.liferay.portal.SystemException {
302 return getPersistence().countByCategoryId(categoryId);
303 }
304
305 public static int countBySmallImageId(long smallImageId)
306 throws com.liferay.portal.SystemException {
307 return getPersistence().countBySmallImageId(smallImageId);
308 }
309
310 public static int countByMediumImageId(long mediumImageId)
311 throws com.liferay.portal.SystemException {
312 return getPersistence().countByMediumImageId(mediumImageId);
313 }
314
315 public static int countByLargeImageId(long largeImageId)
316 throws com.liferay.portal.SystemException {
317 return getPersistence().countByLargeImageId(largeImageId);
318 }
319
320 public static int countByC_S(long companyId, java.lang.String sku)
321 throws com.liferay.portal.SystemException {
322 return getPersistence().countByC_S(companyId, sku);
323 }
324
325 public static int countAll() throws com.liferay.portal.SystemException {
326 return getPersistence().countAll();
327 }
328
329 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
330 long pk) throws com.liferay.portal.SystemException {
331 return getPersistence().getShoppingItemPrices(pk);
332 }
333
334 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
335 long pk, int start, int end) throws com.liferay.portal.SystemException {
336 return getPersistence().getShoppingItemPrices(pk, start, end);
337 }
338
339 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
340 long pk, int start, int end,
341 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
342 throws com.liferay.portal.SystemException {
343 return getPersistence()
344 .getShoppingItemPrices(pk, start, end, orderByComparator);
345 }
346
347 public static int getShoppingItemPricesSize(long pk)
348 throws com.liferay.portal.SystemException {
349 return getPersistence().getShoppingItemPricesSize(pk);
350 }
351
352 public static boolean containsShoppingItemPrice(long pk,
353 long shoppingItemPricePK) throws com.liferay.portal.SystemException {
354 return getPersistence()
355 .containsShoppingItemPrice(pk, shoppingItemPricePK);
356 }
357
358 public static boolean containsShoppingItemPrices(long pk)
359 throws com.liferay.portal.SystemException {
360 return getPersistence().containsShoppingItemPrices(pk);
361 }
362
363 public static ShoppingItemPersistence getPersistence() {
364 if (_persistence == null) {
365 _persistence = (ShoppingItemPersistence)PortalBeanLocatorUtil.locate(ShoppingItemPersistence.class.getName());
366 }
367
368 return _persistence;
369 }
370
371 public void setPersistence(ShoppingItemPersistence persistence) {
372 _persistence = persistence;
373 }
374
375 private static ShoppingItemPersistence _persistence;
376 }