001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 to cache
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 to cache
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 to remove
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            * Finds 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 to find
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            * Finds 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 to find
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            * Finds 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 to search with
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            * Finds 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 to search with
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            * Finds 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 to search with
233            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
234            * @throws SystemException if a system exception occurred
235            */
236            public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
237                    long smallImageId, boolean retrieveFromCache)
238                    throws com.liferay.portal.kernel.exception.SystemException {
239                    return getPersistence()
240                                       .fetchBySmallImageId(smallImageId, retrieveFromCache);
241            }
242    
243            /**
244            * Finds the shopping item where mediumImageId = &#63; or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found.
245            *
246            * @param mediumImageId the medium image ID to search with
247            * @return the matching shopping item
248            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
249            * @throws SystemException if a system exception occurred
250            */
251            public static com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId(
252                    long mediumImageId)
253                    throws com.liferay.portal.kernel.exception.SystemException,
254                            com.liferay.portlet.shopping.NoSuchItemException {
255                    return getPersistence().findByMediumImageId(mediumImageId);
256            }
257    
258            /**
259            * Finds the shopping item where mediumImageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
260            *
261            * @param mediumImageId the medium image ID to search with
262            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
263            * @throws SystemException if a system exception occurred
264            */
265            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
266                    long mediumImageId)
267                    throws com.liferay.portal.kernel.exception.SystemException {
268                    return getPersistence().fetchByMediumImageId(mediumImageId);
269            }
270    
271            /**
272            * Finds the shopping item where mediumImageId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
273            *
274            * @param mediumImageId the medium image ID to search with
275            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
276            * @throws SystemException if a system exception occurred
277            */
278            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
279                    long mediumImageId, boolean retrieveFromCache)
280                    throws com.liferay.portal.kernel.exception.SystemException {
281                    return getPersistence()
282                                       .fetchByMediumImageId(mediumImageId, retrieveFromCache);
283            }
284    
285            /**
286            * Finds the shopping item where largeImageId = &#63; or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found.
287            *
288            * @param largeImageId the large image ID to search with
289            * @return the matching shopping item
290            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
291            * @throws SystemException if a system exception occurred
292            */
293            public static com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId(
294                    long largeImageId)
295                    throws com.liferay.portal.kernel.exception.SystemException,
296                            com.liferay.portlet.shopping.NoSuchItemException {
297                    return getPersistence().findByLargeImageId(largeImageId);
298            }
299    
300            /**
301            * Finds the shopping item where largeImageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
302            *
303            * @param largeImageId the large image ID to search with
304            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
305            * @throws SystemException if a system exception occurred
306            */
307            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
308                    long largeImageId)
309                    throws com.liferay.portal.kernel.exception.SystemException {
310                    return getPersistence().fetchByLargeImageId(largeImageId);
311            }
312    
313            /**
314            * Finds the shopping item where largeImageId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
315            *
316            * @param largeImageId the large image ID to search with
317            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
318            * @throws SystemException if a system exception occurred
319            */
320            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
321                    long largeImageId, boolean retrieveFromCache)
322                    throws com.liferay.portal.kernel.exception.SystemException {
323                    return getPersistence()
324                                       .fetchByLargeImageId(largeImageId, retrieveFromCache);
325            }
326    
327            /**
328            * Finds all the shopping items where groupId = &#63; and categoryId = &#63;.
329            *
330            * @param groupId the group ID to search with
331            * @param categoryId the category ID to search with
332            * @return the matching shopping items
333            * @throws SystemException if a system exception occurred
334            */
335            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
336                    long groupId, long categoryId)
337                    throws com.liferay.portal.kernel.exception.SystemException {
338                    return getPersistence().findByG_C(groupId, categoryId);
339            }
340    
341            /**
342            * Finds a range of all the shopping items where groupId = &#63; and categoryId = &#63;.
343            *
344            * <p>
345            * 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.
346            * </p>
347            *
348            * @param groupId the group ID to search with
349            * @param categoryId the category ID to search with
350            * @param start the lower bound of the range of shopping items to return
351            * @param end the upper bound of the range of shopping items to return (not inclusive)
352            * @return the range of matching shopping items
353            * @throws SystemException if a system exception occurred
354            */
355            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
356                    long groupId, long categoryId, int start, int end)
357                    throws com.liferay.portal.kernel.exception.SystemException {
358                    return getPersistence().findByG_C(groupId, categoryId, start, end);
359            }
360    
361            /**
362            * Finds an ordered range of all the shopping items where groupId = &#63; and categoryId = &#63;.
363            *
364            * <p>
365            * 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.
366            * </p>
367            *
368            * @param groupId the group ID to search with
369            * @param categoryId the category ID to search with
370            * @param start the lower bound of the range of shopping items to return
371            * @param end the upper bound of the range of shopping items to return (not inclusive)
372            * @param orderByComparator the comparator to order the results by
373            * @return the ordered range of matching shopping items
374            * @throws SystemException if a system exception occurred
375            */
376            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
377                    long groupId, long categoryId, int start, int end,
378                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
379                    throws com.liferay.portal.kernel.exception.SystemException {
380                    return getPersistence()
381                                       .findByG_C(groupId, categoryId, start, end, orderByComparator);
382            }
383    
384            /**
385            * Finds the first shopping item in the ordered set where groupId = &#63; and categoryId = &#63;.
386            *
387            * <p>
388            * 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.
389            * </p>
390            *
391            * @param groupId the group ID to search with
392            * @param categoryId the category ID to search with
393            * @param orderByComparator the comparator to order the set by
394            * @return the first matching shopping item
395            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
396            * @throws SystemException if a system exception occurred
397            */
398            public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_First(
399                    long groupId, long categoryId,
400                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
401                    throws com.liferay.portal.kernel.exception.SystemException,
402                            com.liferay.portlet.shopping.NoSuchItemException {
403                    return getPersistence()
404                                       .findByG_C_First(groupId, categoryId, orderByComparator);
405            }
406    
407            /**
408            * Finds the last shopping item in the ordered set where groupId = &#63; and categoryId = &#63;.
409            *
410            * <p>
411            * 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.
412            * </p>
413            *
414            * @param groupId the group ID to search with
415            * @param categoryId the category ID to search with
416            * @param orderByComparator the comparator to order the set by
417            * @return the last matching shopping item
418            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
419            * @throws SystemException if a system exception occurred
420            */
421            public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_Last(
422                    long groupId, long categoryId,
423                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
424                    throws com.liferay.portal.kernel.exception.SystemException,
425                            com.liferay.portlet.shopping.NoSuchItemException {
426                    return getPersistence()
427                                       .findByG_C_Last(groupId, categoryId, orderByComparator);
428            }
429    
430            /**
431            * Finds the shopping items before and after the current shopping item in the ordered set where groupId = &#63; and categoryId = &#63;.
432            *
433            * <p>
434            * 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.
435            * </p>
436            *
437            * @param itemId the primary key of the current shopping item
438            * @param groupId the group ID to search with
439            * @param categoryId the category ID to search with
440            * @param orderByComparator the comparator to order the set by
441            * @return the previous, current, and next shopping item
442            * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found
443            * @throws SystemException if a system exception occurred
444            */
445            public static com.liferay.portlet.shopping.model.ShoppingItem[] findByG_C_PrevAndNext(
446                    long itemId, long groupId, long categoryId,
447                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
448                    throws com.liferay.portal.kernel.exception.SystemException,
449                            com.liferay.portlet.shopping.NoSuchItemException {
450                    return getPersistence()
451                                       .findByG_C_PrevAndNext(itemId, groupId, categoryId,
452                            orderByComparator);
453            }
454    
455            /**
456            * Filters by the user's permissions and finds all the shopping items where groupId = &#63; and categoryId = &#63;.
457            *
458            * @param groupId the group ID to search with
459            * @param categoryId the category ID to search with
460            * @return the matching shopping items that the user has permission to view
461            * @throws SystemException if a system exception occurred
462            */
463            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C(
464                    long groupId, long categoryId)
465                    throws com.liferay.portal.kernel.exception.SystemException {
466                    return getPersistence().filterFindByG_C(groupId, categoryId);
467            }
468    
469            /**
470            * Filters by the user's permissions and finds a range of all the shopping items where groupId = &#63; and categoryId = &#63;.
471            *
472            * <p>
473            * 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.
474            * </p>
475            *
476            * @param groupId the group ID to search with
477            * @param categoryId the category ID to search with
478            * @param start the lower bound of the range of shopping items to return
479            * @param end the upper bound of the range of shopping items to return (not inclusive)
480            * @return the range of matching shopping items that the user has permission to view
481            * @throws SystemException if a system exception occurred
482            */
483            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C(
484                    long groupId, long categoryId, int start, int end)
485                    throws com.liferay.portal.kernel.exception.SystemException {
486                    return getPersistence().filterFindByG_C(groupId, categoryId, start, end);
487            }
488    
489            /**
490            * Filters by the user's permissions and finds an ordered range of all the shopping items where groupId = &#63; and categoryId = &#63;.
491            *
492            * <p>
493            * 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.
494            * </p>
495            *
496            * @param groupId the group ID to search with
497            * @param categoryId the category ID to search with
498            * @param start the lower bound of the range of shopping items to return
499            * @param end the upper bound of the range of shopping items to return (not inclusive)
500            * @param orderByComparator the comparator to order the results by
501            * @return the ordered range of matching shopping items that the user has permission to view
502            * @throws SystemException if a system exception occurred
503            */
504            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C(
505                    long groupId, long categoryId, int start, int end,
506                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
507                    throws com.liferay.portal.kernel.exception.SystemException {
508                    return getPersistence()
509                                       .filterFindByG_C(groupId, categoryId, start, end,
510                            orderByComparator);
511            }
512    
513            /**
514            * Filters the shopping items before and after the current shopping item in the ordered set where groupId = &#63; and categoryId = &#63;.
515            *
516            * <p>
517            * 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.
518            * </p>
519            *
520            * @param itemId the primary key of the current shopping item
521            * @param groupId the group ID to search with
522            * @param categoryId the category ID to search with
523            * @param orderByComparator the comparator to order the set by
524            * @return the previous, current, and next shopping item
525            * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found
526            * @throws SystemException if a system exception occurred
527            */
528            public static com.liferay.portlet.shopping.model.ShoppingItem[] filterFindByG_C_PrevAndNext(
529                    long itemId, long groupId, long categoryId,
530                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
531                    throws com.liferay.portal.kernel.exception.SystemException,
532                            com.liferay.portlet.shopping.NoSuchItemException {
533                    return getPersistence()
534                                       .filterFindByG_C_PrevAndNext(itemId, groupId, categoryId,
535                            orderByComparator);
536            }
537    
538            /**
539            * Finds the shopping item where companyId = &#63; and sku = &#63; or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found.
540            *
541            * @param companyId the company ID to search with
542            * @param sku the sku to search with
543            * @return the matching shopping item
544            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
545            * @throws SystemException if a system exception occurred
546            */
547            public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S(
548                    long companyId, java.lang.String sku)
549                    throws com.liferay.portal.kernel.exception.SystemException,
550                            com.liferay.portlet.shopping.NoSuchItemException {
551                    return getPersistence().findByC_S(companyId, sku);
552            }
553    
554            /**
555            * Finds the shopping item where companyId = &#63; and sku = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
556            *
557            * @param companyId the company ID to search with
558            * @param sku the sku to search with
559            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
560            * @throws SystemException if a system exception occurred
561            */
562            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
563                    long companyId, java.lang.String sku)
564                    throws com.liferay.portal.kernel.exception.SystemException {
565                    return getPersistence().fetchByC_S(companyId, sku);
566            }
567    
568            /**
569            * Finds 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.
570            *
571            * @param companyId the company ID to search with
572            * @param sku the sku to search with
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            * Finds 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            * Finds 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 to return
601            * @param end the upper bound of the range of shopping items to return (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            * Finds 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 to return
619            * @param end the upper bound of the range of shopping items to return (not inclusive)
620            * @param orderByComparator the comparator to order the results by
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 to search with
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 to search with
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 to search with
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 to search with
671            * @param categoryId the category ID to search with
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 to search with
683            * @param sku the sku to search with
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            * Counts all the shopping items where smallImageId = &#63;.
704            *
705            * @param smallImageId the small image ID to search with
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            * Counts all the shopping items where mediumImageId = &#63;.
716            *
717            * @param mediumImageId the medium image ID to search with
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            * Counts all the shopping items where largeImageId = &#63;.
728            *
729            * @param largeImageId the large image ID to search with
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            * Counts all the shopping items where groupId = &#63; and categoryId = &#63;.
740            *
741            * @param groupId the group ID to search with
742            * @param categoryId the category ID to search with
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            * Filters by the user's permissions and counts all the shopping items where groupId = &#63; and categoryId = &#63;.
753            *
754            * @param groupId the group ID to search with
755            * @param categoryId the category ID to search with
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            * Counts all the shopping items where companyId = &#63; and sku = &#63;.
766            *
767            * @param companyId the company ID to search with
768            * @param sku the sku to search with
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            * Counts all the 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            * Gets all the shopping item prices associated with the shopping item.
790            *
791            * @param pk the primary key of the shopping item to get the associated shopping item prices for
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            * Gets 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 to get the associated shopping item prices for
808            * @param start the lower bound of the range of shopping items to return
809            * @param end the upper bound of the range of shopping items to return (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            * Gets 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 to get the associated shopping item prices for
827            * @param start the lower bound of the range of shopping items to return
828            * @param end the upper bound of the range of shopping items to return (not inclusive)
829            * @param orderByComparator the comparator to order the results by
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            * Gets the number of shopping item prices associated with the shopping item.
843            *
844            * @param pk the primary key of the shopping item to get the number of associated shopping item prices for
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            * Determines 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            * Determines 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    }