001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.shopping.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.shopping.model.ShoppingItem;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the shopping item service. This utility wraps {@link ShoppingItemPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see ShoppingItemPersistence
037     * @see ShoppingItemPersistenceImpl
038     * @generated
039     */
040    public class ShoppingItemUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(ShoppingItem shoppingItem) {
058                    getPersistence().clearCache(shoppingItem);
059            }
060    
061            /**
062             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
063             */
064            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
065                    throws SystemException {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<ShoppingItem> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) throws SystemException {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<ShoppingItem> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end)
082                    throws SystemException {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<ShoppingItem> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator orderByComparator) throws SystemException {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
099             */
100            public static ShoppingItem remove(ShoppingItem shoppingItem)
101                    throws SystemException {
102                    return getPersistence().remove(shoppingItem);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
107             */
108            public static ShoppingItem update(ShoppingItem shoppingItem, boolean merge)
109                    throws SystemException {
110                    return getPersistence().update(shoppingItem, merge);
111            }
112    
113            /**
114             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
115             */
116            public static ShoppingItem update(ShoppingItem shoppingItem, boolean merge,
117                    ServiceContext serviceContext) throws SystemException {
118                    return getPersistence().update(shoppingItem, merge, serviceContext);
119            }
120    
121            /**
122            * Caches the shopping item in the entity cache if it is enabled.
123            *
124            * @param shoppingItem the shopping item
125            */
126            public static void cacheResult(
127                    com.liferay.portlet.shopping.model.ShoppingItem shoppingItem) {
128                    getPersistence().cacheResult(shoppingItem);
129            }
130    
131            /**
132            * Caches the shopping items in the entity cache if it is enabled.
133            *
134            * @param shoppingItems the shopping items
135            */
136            public static void cacheResult(
137                    java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> shoppingItems) {
138                    getPersistence().cacheResult(shoppingItems);
139            }
140    
141            /**
142            * Creates a new shopping item with the primary key. Does not add the shopping item to the database.
143            *
144            * @param itemId the primary key for the new shopping item
145            * @return the new shopping item
146            */
147            public static com.liferay.portlet.shopping.model.ShoppingItem create(
148                    long itemId) {
149                    return getPersistence().create(itemId);
150            }
151    
152            /**
153            * Removes the shopping item with the primary key from the database. Also notifies the appropriate model listeners.
154            *
155            * @param itemId the primary key of the shopping item
156            * @return the shopping item that was removed
157            * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            public static com.liferay.portlet.shopping.model.ShoppingItem remove(
161                    long itemId)
162                    throws com.liferay.portal.kernel.exception.SystemException,
163                            com.liferay.portlet.shopping.NoSuchItemException {
164                    return getPersistence().remove(itemId);
165            }
166    
167            public static com.liferay.portlet.shopping.model.ShoppingItem updateImpl(
168                    com.liferay.portlet.shopping.model.ShoppingItem shoppingItem,
169                    boolean merge)
170                    throws com.liferay.portal.kernel.exception.SystemException {
171                    return getPersistence().updateImpl(shoppingItem, merge);
172            }
173    
174            /**
175            * Returns the shopping item with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found.
176            *
177            * @param itemId the primary key of the shopping item
178            * @return the shopping item
179            * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found
180            * @throws SystemException if a system exception occurred
181            */
182            public static com.liferay.portlet.shopping.model.ShoppingItem findByPrimaryKey(
183                    long itemId)
184                    throws com.liferay.portal.kernel.exception.SystemException,
185                            com.liferay.portlet.shopping.NoSuchItemException {
186                    return getPersistence().findByPrimaryKey(itemId);
187            }
188    
189            /**
190            * Returns the shopping item with the primary key or returns <code>null</code> if it could not be found.
191            *
192            * @param itemId the primary key of the shopping item
193            * @return the shopping item, or <code>null</code> if a shopping item with the primary key could not be found
194            * @throws SystemException if a system exception occurred
195            */
196            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByPrimaryKey(
197                    long itemId) throws com.liferay.portal.kernel.exception.SystemException {
198                    return getPersistence().fetchByPrimaryKey(itemId);
199            }
200    
201            /**
202            * Returns the shopping item where smallImageId = &#63; or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found.
203            *
204            * @param smallImageId the small image ID
205            * @return the matching shopping item
206            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
207            * @throws SystemException if a system exception occurred
208            */
209            public static com.liferay.portlet.shopping.model.ShoppingItem findBySmallImageId(
210                    long smallImageId)
211                    throws com.liferay.portal.kernel.exception.SystemException,
212                            com.liferay.portlet.shopping.NoSuchItemException {
213                    return getPersistence().findBySmallImageId(smallImageId);
214            }
215    
216            /**
217            * Returns the shopping item where smallImageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
218            *
219            * @param smallImageId the small image ID
220            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
221            * @throws SystemException if a system exception occurred
222            */
223            public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
224                    long smallImageId)
225                    throws com.liferay.portal.kernel.exception.SystemException {
226                    return getPersistence().fetchBySmallImageId(smallImageId);
227            }
228    
229            /**
230            * Returns the shopping item where smallImageId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
231            *
232            * @param smallImageId the small image ID
233            * @param retrieveFromCache whether to use the finder cache
234            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
235            * @throws SystemException if a system exception occurred
236            */
237            public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
238                    long smallImageId, boolean retrieveFromCache)
239                    throws com.liferay.portal.kernel.exception.SystemException {
240                    return getPersistence()
241                                       .fetchBySmallImageId(smallImageId, retrieveFromCache);
242            }
243    
244            /**
245            * Returns the shopping item where mediumImageId = &#63; or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found.
246            *
247            * @param mediumImageId the medium image ID
248            * @return the matching shopping item
249            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
250            * @throws SystemException if a system exception occurred
251            */
252            public static com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId(
253                    long mediumImageId)
254                    throws com.liferay.portal.kernel.exception.SystemException,
255                            com.liferay.portlet.shopping.NoSuchItemException {
256                    return getPersistence().findByMediumImageId(mediumImageId);
257            }
258    
259            /**
260            * Returns the shopping item where mediumImageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
261            *
262            * @param mediumImageId the medium image ID
263            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
264            * @throws SystemException if a system exception occurred
265            */
266            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
267                    long mediumImageId)
268                    throws com.liferay.portal.kernel.exception.SystemException {
269                    return getPersistence().fetchByMediumImageId(mediumImageId);
270            }
271    
272            /**
273            * Returns the shopping item where mediumImageId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
274            *
275            * @param mediumImageId the medium image ID
276            * @param retrieveFromCache whether to use the finder cache
277            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
278            * @throws SystemException if a system exception occurred
279            */
280            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
281                    long mediumImageId, boolean retrieveFromCache)
282                    throws com.liferay.portal.kernel.exception.SystemException {
283                    return getPersistence()
284                                       .fetchByMediumImageId(mediumImageId, retrieveFromCache);
285            }
286    
287            /**
288            * Returns the shopping item where largeImageId = &#63; or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found.
289            *
290            * @param largeImageId the large image ID
291            * @return the matching shopping item
292            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
293            * @throws SystemException if a system exception occurred
294            */
295            public static com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId(
296                    long largeImageId)
297                    throws com.liferay.portal.kernel.exception.SystemException,
298                            com.liferay.portlet.shopping.NoSuchItemException {
299                    return getPersistence().findByLargeImageId(largeImageId);
300            }
301    
302            /**
303            * Returns the shopping item where largeImageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
304            *
305            * @param largeImageId the large image ID
306            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
307            * @throws SystemException if a system exception occurred
308            */
309            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
310                    long largeImageId)
311                    throws com.liferay.portal.kernel.exception.SystemException {
312                    return getPersistence().fetchByLargeImageId(largeImageId);
313            }
314    
315            /**
316            * Returns the shopping item where largeImageId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
317            *
318            * @param largeImageId the large image ID
319            * @param retrieveFromCache whether to use the finder cache
320            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
321            * @throws SystemException if a system exception occurred
322            */
323            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
324                    long largeImageId, boolean retrieveFromCache)
325                    throws com.liferay.portal.kernel.exception.SystemException {
326                    return getPersistence()
327                                       .fetchByLargeImageId(largeImageId, retrieveFromCache);
328            }
329    
330            /**
331            * Returns all the shopping items where groupId = &#63; and categoryId = &#63;.
332            *
333            * @param groupId the group ID
334            * @param categoryId the category ID
335            * @return the matching shopping items
336            * @throws SystemException if a system exception occurred
337            */
338            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
339                    long groupId, long categoryId)
340                    throws com.liferay.portal.kernel.exception.SystemException {
341                    return getPersistence().findByG_C(groupId, categoryId);
342            }
343    
344            /**
345            * Returns a range of all the shopping items where groupId = &#63; and categoryId = &#63;.
346            *
347            * <p>
348            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
349            * </p>
350            *
351            * @param groupId the group ID
352            * @param categoryId the category ID
353            * @param start the lower bound of the range of shopping items
354            * @param end the upper bound of the range of shopping items (not inclusive)
355            * @return the range of matching shopping items
356            * @throws SystemException if a system exception occurred
357            */
358            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
359                    long groupId, long categoryId, int start, int end)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getPersistence().findByG_C(groupId, categoryId, start, end);
362            }
363    
364            /**
365            * Returns an ordered range of all the shopping items where groupId = &#63; and categoryId = &#63;.
366            *
367            * <p>
368            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
369            * </p>
370            *
371            * @param groupId the group ID
372            * @param categoryId the category ID
373            * @param start the lower bound of the range of shopping items
374            * @param end the upper bound of the range of shopping items (not inclusive)
375            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
376            * @return the ordered range of matching shopping items
377            * @throws SystemException if a system exception occurred
378            */
379            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
380                    long groupId, long categoryId, int start, int end,
381                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
382                    throws com.liferay.portal.kernel.exception.SystemException {
383                    return getPersistence()
384                                       .findByG_C(groupId, categoryId, start, end, orderByComparator);
385            }
386    
387            /**
388            * Returns the first shopping item in the ordered set where groupId = &#63; and categoryId = &#63;.
389            *
390            * <p>
391            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
392            * </p>
393            *
394            * @param groupId the group ID
395            * @param categoryId the category ID
396            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
397            * @return the first matching shopping item
398            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
399            * @throws SystemException if a system exception occurred
400            */
401            public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_First(
402                    long groupId, long categoryId,
403                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
404                    throws com.liferay.portal.kernel.exception.SystemException,
405                            com.liferay.portlet.shopping.NoSuchItemException {
406                    return getPersistence()
407                                       .findByG_C_First(groupId, categoryId, orderByComparator);
408            }
409    
410            /**
411            * Returns the last shopping item in the ordered set where groupId = &#63; and categoryId = &#63;.
412            *
413            * <p>
414            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
415            * </p>
416            *
417            * @param groupId the group ID
418            * @param categoryId the category ID
419            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
420            * @return the last matching shopping item
421            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
422            * @throws SystemException if a system exception occurred
423            */
424            public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_Last(
425                    long groupId, long categoryId,
426                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
427                    throws com.liferay.portal.kernel.exception.SystemException,
428                            com.liferay.portlet.shopping.NoSuchItemException {
429                    return getPersistence()
430                                       .findByG_C_Last(groupId, categoryId, orderByComparator);
431            }
432    
433            /**
434            * Returns the shopping items before and after the current shopping item in the ordered set where groupId = &#63; and categoryId = &#63;.
435            *
436            * <p>
437            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
438            * </p>
439            *
440            * @param itemId the primary key of the current shopping item
441            * @param groupId the group ID
442            * @param categoryId the category ID
443            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
444            * @return the previous, current, and next shopping item
445            * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found
446            * @throws SystemException if a system exception occurred
447            */
448            public static com.liferay.portlet.shopping.model.ShoppingItem[] findByG_C_PrevAndNext(
449                    long itemId, long groupId, long categoryId,
450                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
451                    throws com.liferay.portal.kernel.exception.SystemException,
452                            com.liferay.portlet.shopping.NoSuchItemException {
453                    return getPersistence()
454                                       .findByG_C_PrevAndNext(itemId, groupId, categoryId,
455                            orderByComparator);
456            }
457    
458            /**
459            * Returns all the shopping items that the user has permission to view where groupId = &#63; and categoryId = &#63;.
460            *
461            * @param groupId the group ID
462            * @param categoryId the category ID
463            * @return the matching shopping items that the user has permission to view
464            * @throws SystemException if a system exception occurred
465            */
466            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C(
467                    long groupId, long categoryId)
468                    throws com.liferay.portal.kernel.exception.SystemException {
469                    return getPersistence().filterFindByG_C(groupId, categoryId);
470            }
471    
472            /**
473            * Returns a range of all the shopping items that the user has permission to view where groupId = &#63; and categoryId = &#63;.
474            *
475            * <p>
476            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
477            * </p>
478            *
479            * @param groupId the group ID
480            * @param categoryId the category ID
481            * @param start the lower bound of the range of shopping items
482            * @param end the upper bound of the range of shopping items (not inclusive)
483            * @return the range of matching shopping items that the user has permission to view
484            * @throws SystemException if a system exception occurred
485            */
486            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C(
487                    long groupId, long categoryId, int start, int end)
488                    throws com.liferay.portal.kernel.exception.SystemException {
489                    return getPersistence().filterFindByG_C(groupId, categoryId, start, end);
490            }
491    
492            /**
493            * Returns an ordered range of all the shopping items that the user has permissions to view where groupId = &#63; and categoryId = &#63;.
494            *
495            * <p>
496            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
497            * </p>
498            *
499            * @param groupId the group ID
500            * @param categoryId the category ID
501            * @param start the lower bound of the range of shopping items
502            * @param end the upper bound of the range of shopping items (not inclusive)
503            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
504            * @return the ordered range of matching shopping items that the user has permission to view
505            * @throws SystemException if a system exception occurred
506            */
507            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C(
508                    long groupId, long categoryId, int start, int end,
509                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
510                    throws com.liferay.portal.kernel.exception.SystemException {
511                    return getPersistence()
512                                       .filterFindByG_C(groupId, categoryId, start, end,
513                            orderByComparator);
514            }
515    
516            /**
517            * Returns the shopping items before and after the current shopping item in the ordered set of shopping items that the user has permission to view where groupId = &#63; and categoryId = &#63;.
518            *
519            * @param itemId the primary key of the current shopping item
520            * @param groupId the group ID
521            * @param categoryId the category ID
522            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
523            * @return the previous, current, and next shopping item
524            * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found
525            * @throws SystemException if a system exception occurred
526            */
527            public static com.liferay.portlet.shopping.model.ShoppingItem[] filterFindByG_C_PrevAndNext(
528                    long itemId, long groupId, long categoryId,
529                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
530                    throws com.liferay.portal.kernel.exception.SystemException,
531                            com.liferay.portlet.shopping.NoSuchItemException {
532                    return getPersistence()
533                                       .filterFindByG_C_PrevAndNext(itemId, groupId, categoryId,
534                            orderByComparator);
535            }
536    
537            /**
538            * Returns the shopping item where companyId = &#63; and sku = &#63; or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found.
539            *
540            * @param companyId the company ID
541            * @param sku the sku
542            * @return the matching shopping item
543            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
544            * @throws SystemException if a system exception occurred
545            */
546            public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S(
547                    long companyId, java.lang.String sku)
548                    throws com.liferay.portal.kernel.exception.SystemException,
549                            com.liferay.portlet.shopping.NoSuchItemException {
550                    return getPersistence().findByC_S(companyId, sku);
551            }
552    
553            /**
554            * Returns the shopping item where companyId = &#63; and sku = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
555            *
556            * @param companyId the company ID
557            * @param sku the sku
558            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
559            * @throws SystemException if a system exception occurred
560            */
561            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
562                    long companyId, java.lang.String sku)
563                    throws com.liferay.portal.kernel.exception.SystemException {
564                    return getPersistence().fetchByC_S(companyId, sku);
565            }
566    
567            /**
568            * Returns the shopping item where companyId = &#63; and sku = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
569            *
570            * @param companyId the company ID
571            * @param sku the sku
572            * @param retrieveFromCache whether to use the finder cache
573            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
574            * @throws SystemException if a system exception occurred
575            */
576            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
577                    long companyId, java.lang.String sku, boolean retrieveFromCache)
578                    throws com.liferay.portal.kernel.exception.SystemException {
579                    return getPersistence().fetchByC_S(companyId, sku, retrieveFromCache);
580            }
581    
582            /**
583            * Returns all the shopping items.
584            *
585            * @return the shopping items
586            * @throws SystemException if a system exception occurred
587            */
588            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll()
589                    throws com.liferay.portal.kernel.exception.SystemException {
590                    return getPersistence().findAll();
591            }
592    
593            /**
594            * Returns a range of all the shopping items.
595            *
596            * <p>
597            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
598            * </p>
599            *
600            * @param start the lower bound of the range of shopping items
601            * @param end the upper bound of the range of shopping items (not inclusive)
602            * @return the range of shopping items
603            * @throws SystemException if a system exception occurred
604            */
605            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
606                    int start, int end)
607                    throws com.liferay.portal.kernel.exception.SystemException {
608                    return getPersistence().findAll(start, end);
609            }
610    
611            /**
612            * Returns an ordered range of all the shopping items.
613            *
614            * <p>
615            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
616            * </p>
617            *
618            * @param start the lower bound of the range of shopping items
619            * @param end the upper bound of the range of shopping items (not inclusive)
620            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
621            * @return the ordered range of shopping items
622            * @throws SystemException if a system exception occurred
623            */
624            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
625                    int start, int end,
626                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
627                    throws com.liferay.portal.kernel.exception.SystemException {
628                    return getPersistence().findAll(start, end, orderByComparator);
629            }
630    
631            /**
632            * Removes the shopping item where smallImageId = &#63; from the database.
633            *
634            * @param smallImageId the small image ID
635            * @throws SystemException if a system exception occurred
636            */
637            public static void removeBySmallImageId(long smallImageId)
638                    throws com.liferay.portal.kernel.exception.SystemException,
639                            com.liferay.portlet.shopping.NoSuchItemException {
640                    getPersistence().removeBySmallImageId(smallImageId);
641            }
642    
643            /**
644            * Removes the shopping item where mediumImageId = &#63; from the database.
645            *
646            * @param mediumImageId the medium image ID
647            * @throws SystemException if a system exception occurred
648            */
649            public static void removeByMediumImageId(long mediumImageId)
650                    throws com.liferay.portal.kernel.exception.SystemException,
651                            com.liferay.portlet.shopping.NoSuchItemException {
652                    getPersistence().removeByMediumImageId(mediumImageId);
653            }
654    
655            /**
656            * Removes the shopping item where largeImageId = &#63; from the database.
657            *
658            * @param largeImageId the large image ID
659            * @throws SystemException if a system exception occurred
660            */
661            public static void removeByLargeImageId(long largeImageId)
662                    throws com.liferay.portal.kernel.exception.SystemException,
663                            com.liferay.portlet.shopping.NoSuchItemException {
664                    getPersistence().removeByLargeImageId(largeImageId);
665            }
666    
667            /**
668            * Removes all the shopping items where groupId = &#63; and categoryId = &#63; from the database.
669            *
670            * @param groupId the group ID
671            * @param categoryId the category ID
672            * @throws SystemException if a system exception occurred
673            */
674            public static void removeByG_C(long groupId, long categoryId)
675                    throws com.liferay.portal.kernel.exception.SystemException {
676                    getPersistence().removeByG_C(groupId, categoryId);
677            }
678    
679            /**
680            * Removes the shopping item where companyId = &#63; and sku = &#63; from the database.
681            *
682            * @param companyId the company ID
683            * @param sku the sku
684            * @throws SystemException if a system exception occurred
685            */
686            public static void removeByC_S(long companyId, java.lang.String sku)
687                    throws com.liferay.portal.kernel.exception.SystemException,
688                            com.liferay.portlet.shopping.NoSuchItemException {
689                    getPersistence().removeByC_S(companyId, sku);
690            }
691    
692            /**
693            * Removes all the shopping items from the database.
694            *
695            * @throws SystemException if a system exception occurred
696            */
697            public static void removeAll()
698                    throws com.liferay.portal.kernel.exception.SystemException {
699                    getPersistence().removeAll();
700            }
701    
702            /**
703            * Returns the number of shopping items where smallImageId = &#63;.
704            *
705            * @param smallImageId the small image ID
706            * @return the number of matching shopping items
707            * @throws SystemException if a system exception occurred
708            */
709            public static int countBySmallImageId(long smallImageId)
710                    throws com.liferay.portal.kernel.exception.SystemException {
711                    return getPersistence().countBySmallImageId(smallImageId);
712            }
713    
714            /**
715            * Returns the number of shopping items where mediumImageId = &#63;.
716            *
717            * @param mediumImageId the medium image ID
718            * @return the number of matching shopping items
719            * @throws SystemException if a system exception occurred
720            */
721            public static int countByMediumImageId(long mediumImageId)
722                    throws com.liferay.portal.kernel.exception.SystemException {
723                    return getPersistence().countByMediumImageId(mediumImageId);
724            }
725    
726            /**
727            * Returns the number of shopping items where largeImageId = &#63;.
728            *
729            * @param largeImageId the large image ID
730            * @return the number of matching shopping items
731            * @throws SystemException if a system exception occurred
732            */
733            public static int countByLargeImageId(long largeImageId)
734                    throws com.liferay.portal.kernel.exception.SystemException {
735                    return getPersistence().countByLargeImageId(largeImageId);
736            }
737    
738            /**
739            * Returns the number of shopping items where groupId = &#63; and categoryId = &#63;.
740            *
741            * @param groupId the group ID
742            * @param categoryId the category ID
743            * @return the number of matching shopping items
744            * @throws SystemException if a system exception occurred
745            */
746            public static int countByG_C(long groupId, long categoryId)
747                    throws com.liferay.portal.kernel.exception.SystemException {
748                    return getPersistence().countByG_C(groupId, categoryId);
749            }
750    
751            /**
752            * Returns the number of shopping items that the user has permission to view where groupId = &#63; and categoryId = &#63;.
753            *
754            * @param groupId the group ID
755            * @param categoryId the category ID
756            * @return the number of matching shopping items that the user has permission to view
757            * @throws SystemException if a system exception occurred
758            */
759            public static int filterCountByG_C(long groupId, long categoryId)
760                    throws com.liferay.portal.kernel.exception.SystemException {
761                    return getPersistence().filterCountByG_C(groupId, categoryId);
762            }
763    
764            /**
765            * Returns the number of shopping items where companyId = &#63; and sku = &#63;.
766            *
767            * @param companyId the company ID
768            * @param sku the sku
769            * @return the number of matching shopping items
770            * @throws SystemException if a system exception occurred
771            */
772            public static int countByC_S(long companyId, java.lang.String sku)
773                    throws com.liferay.portal.kernel.exception.SystemException {
774                    return getPersistence().countByC_S(companyId, sku);
775            }
776    
777            /**
778            * Returns the number of shopping items.
779            *
780            * @return the number of shopping items
781            * @throws SystemException if a system exception occurred
782            */
783            public static int countAll()
784                    throws com.liferay.portal.kernel.exception.SystemException {
785                    return getPersistence().countAll();
786            }
787    
788            /**
789            * Returns all the shopping item prices associated with the shopping item.
790            *
791            * @param pk the primary key of the shopping item
792            * @return the shopping item prices associated with the shopping item
793            * @throws SystemException if a system exception occurred
794            */
795            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
796                    long pk) throws com.liferay.portal.kernel.exception.SystemException {
797                    return getPersistence().getShoppingItemPrices(pk);
798            }
799    
800            /**
801            * Returns a range of all the shopping item prices associated with the shopping item.
802            *
803            * <p>
804            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
805            * </p>
806            *
807            * @param pk the primary key of the shopping item
808            * @param start the lower bound of the range of shopping items
809            * @param end the upper bound of the range of shopping items (not inclusive)
810            * @return the range of shopping item prices associated with the shopping item
811            * @throws SystemException if a system exception occurred
812            */
813            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
814                    long pk, int start, int end)
815                    throws com.liferay.portal.kernel.exception.SystemException {
816                    return getPersistence().getShoppingItemPrices(pk, start, end);
817            }
818    
819            /**
820            * Returns an ordered range of all the shopping item prices associated with the shopping item.
821            *
822            * <p>
823            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
824            * </p>
825            *
826            * @param pk the primary key of the shopping item
827            * @param start the lower bound of the range of shopping items
828            * @param end the upper bound of the range of shopping items (not inclusive)
829            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
830            * @return the ordered range of shopping item prices associated with the shopping item
831            * @throws SystemException if a system exception occurred
832            */
833            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItemPrice> getShoppingItemPrices(
834                    long pk, int start, int end,
835                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
836                    throws com.liferay.portal.kernel.exception.SystemException {
837                    return getPersistence()
838                                       .getShoppingItemPrices(pk, start, end, orderByComparator);
839            }
840    
841            /**
842            * Returns the number of shopping item prices associated with the shopping item.
843            *
844            * @param pk the primary key of the shopping item
845            * @return the number of shopping item prices associated with the shopping item
846            * @throws SystemException if a system exception occurred
847            */
848            public static int getShoppingItemPricesSize(long pk)
849                    throws com.liferay.portal.kernel.exception.SystemException {
850                    return getPersistence().getShoppingItemPricesSize(pk);
851            }
852    
853            /**
854            * Returns <code>true</code> if the shopping item price is associated with the shopping item.
855            *
856            * @param pk the primary key of the shopping item
857            * @param shoppingItemPricePK the primary key of the shopping item price
858            * @return <code>true</code> if the shopping item price is associated with the shopping item; <code>false</code> otherwise
859            * @throws SystemException if a system exception occurred
860            */
861            public static boolean containsShoppingItemPrice(long pk,
862                    long shoppingItemPricePK)
863                    throws com.liferay.portal.kernel.exception.SystemException {
864                    return getPersistence()
865                                       .containsShoppingItemPrice(pk, shoppingItemPricePK);
866            }
867    
868            /**
869            * Returns <code>true</code> if the shopping item has any shopping item prices associated with it.
870            *
871            * @param pk the primary key of the shopping item to check for associations with shopping item prices
872            * @return <code>true</code> if the shopping item has any shopping item prices associated with it; <code>false</code> otherwise
873            * @throws SystemException if a system exception occurred
874            */
875            public static boolean containsShoppingItemPrices(long pk)
876                    throws com.liferay.portal.kernel.exception.SystemException {
877                    return getPersistence().containsShoppingItemPrices(pk);
878            }
879    
880            public static ShoppingItemPersistence getPersistence() {
881                    if (_persistence == null) {
882                            _persistence = (ShoppingItemPersistence)PortalBeanLocatorUtil.locate(ShoppingItemPersistence.class.getName());
883    
884                            ReferenceRegistry.registerReference(ShoppingItemUtil.class,
885                                    "_persistence");
886                    }
887    
888                    return _persistence;
889            }
890    
891            public void setPersistence(ShoppingItemPersistence persistence) {
892                    _persistence = persistence;
893    
894                    ReferenceRegistry.registerReference(ShoppingItemUtil.class,
895                            "_persistence");
896            }
897    
898            private static ShoppingItemPersistence _persistence;
899    }