001    /**
002     * Copyright (c) 2000-2012 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#update(com.liferay.portal.model.BaseModel)
099             */
100            public static ShoppingItem update(ShoppingItem shoppingItem)
101                    throws SystemException {
102                    return getPersistence().update(shoppingItem);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
107             */
108            public static ShoppingItem update(ShoppingItem shoppingItem,
109                    ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(shoppingItem, serviceContext);
111            }
112    
113            /**
114            * Returns the shopping item where smallImageId = &#63; or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found.
115            *
116            * @param smallImageId the small image ID
117            * @return the matching shopping item
118            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
119            * @throws SystemException if a system exception occurred
120            */
121            public static com.liferay.portlet.shopping.model.ShoppingItem findBySmallImageId(
122                    long smallImageId)
123                    throws com.liferay.portal.kernel.exception.SystemException,
124                            com.liferay.portlet.shopping.NoSuchItemException {
125                    return getPersistence().findBySmallImageId(smallImageId);
126            }
127    
128            /**
129            * Returns the shopping item where smallImageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
130            *
131            * @param smallImageId the small image ID
132            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
133            * @throws SystemException if a system exception occurred
134            */
135            public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
136                    long smallImageId)
137                    throws com.liferay.portal.kernel.exception.SystemException {
138                    return getPersistence().fetchBySmallImageId(smallImageId);
139            }
140    
141            /**
142            * Returns the shopping item where smallImageId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
143            *
144            * @param smallImageId the small image ID
145            * @param retrieveFromCache whether to use the finder cache
146            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
147            * @throws SystemException if a system exception occurred
148            */
149            public static com.liferay.portlet.shopping.model.ShoppingItem fetchBySmallImageId(
150                    long smallImageId, boolean retrieveFromCache)
151                    throws com.liferay.portal.kernel.exception.SystemException {
152                    return getPersistence()
153                                       .fetchBySmallImageId(smallImageId, retrieveFromCache);
154            }
155    
156            /**
157            * Removes the shopping item where smallImageId = &#63; from the database.
158            *
159            * @param smallImageId the small image ID
160            * @return the shopping item that was removed
161            * @throws SystemException if a system exception occurred
162            */
163            public static com.liferay.portlet.shopping.model.ShoppingItem removeBySmallImageId(
164                    long smallImageId)
165                    throws com.liferay.portal.kernel.exception.SystemException,
166                            com.liferay.portlet.shopping.NoSuchItemException {
167                    return getPersistence().removeBySmallImageId(smallImageId);
168            }
169    
170            /**
171            * Returns the number of shopping items where smallImageId = &#63;.
172            *
173            * @param smallImageId the small image ID
174            * @return the number of matching shopping items
175            * @throws SystemException if a system exception occurred
176            */
177            public static int countBySmallImageId(long smallImageId)
178                    throws com.liferay.portal.kernel.exception.SystemException {
179                    return getPersistence().countBySmallImageId(smallImageId);
180            }
181    
182            /**
183            * Returns the shopping item where mediumImageId = &#63; or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found.
184            *
185            * @param mediumImageId the medium image ID
186            * @return the matching shopping item
187            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
188            * @throws SystemException if a system exception occurred
189            */
190            public static com.liferay.portlet.shopping.model.ShoppingItem findByMediumImageId(
191                    long mediumImageId)
192                    throws com.liferay.portal.kernel.exception.SystemException,
193                            com.liferay.portlet.shopping.NoSuchItemException {
194                    return getPersistence().findByMediumImageId(mediumImageId);
195            }
196    
197            /**
198            * Returns the shopping item where mediumImageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
199            *
200            * @param mediumImageId the medium image ID
201            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
202            * @throws SystemException if a system exception occurred
203            */
204            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
205                    long mediumImageId)
206                    throws com.liferay.portal.kernel.exception.SystemException {
207                    return getPersistence().fetchByMediumImageId(mediumImageId);
208            }
209    
210            /**
211            * Returns the shopping item where mediumImageId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
212            *
213            * @param mediumImageId the medium image ID
214            * @param retrieveFromCache whether to use the finder cache
215            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
216            * @throws SystemException if a system exception occurred
217            */
218            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByMediumImageId(
219                    long mediumImageId, boolean retrieveFromCache)
220                    throws com.liferay.portal.kernel.exception.SystemException {
221                    return getPersistence()
222                                       .fetchByMediumImageId(mediumImageId, retrieveFromCache);
223            }
224    
225            /**
226            * Removes the shopping item where mediumImageId = &#63; from the database.
227            *
228            * @param mediumImageId the medium image ID
229            * @return the shopping item that was removed
230            * @throws SystemException if a system exception occurred
231            */
232            public static com.liferay.portlet.shopping.model.ShoppingItem removeByMediumImageId(
233                    long mediumImageId)
234                    throws com.liferay.portal.kernel.exception.SystemException,
235                            com.liferay.portlet.shopping.NoSuchItemException {
236                    return getPersistence().removeByMediumImageId(mediumImageId);
237            }
238    
239            /**
240            * Returns the number of shopping items where mediumImageId = &#63;.
241            *
242            * @param mediumImageId the medium image ID
243            * @return the number of matching shopping items
244            * @throws SystemException if a system exception occurred
245            */
246            public static int countByMediumImageId(long mediumImageId)
247                    throws com.liferay.portal.kernel.exception.SystemException {
248                    return getPersistence().countByMediumImageId(mediumImageId);
249            }
250    
251            /**
252            * Returns the shopping item where largeImageId = &#63; or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found.
253            *
254            * @param largeImageId the large image ID
255            * @return the matching shopping item
256            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
257            * @throws SystemException if a system exception occurred
258            */
259            public static com.liferay.portlet.shopping.model.ShoppingItem findByLargeImageId(
260                    long largeImageId)
261                    throws com.liferay.portal.kernel.exception.SystemException,
262                            com.liferay.portlet.shopping.NoSuchItemException {
263                    return getPersistence().findByLargeImageId(largeImageId);
264            }
265    
266            /**
267            * Returns the shopping item where largeImageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
268            *
269            * @param largeImageId the large image ID
270            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
271            * @throws SystemException if a system exception occurred
272            */
273            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
274                    long largeImageId)
275                    throws com.liferay.portal.kernel.exception.SystemException {
276                    return getPersistence().fetchByLargeImageId(largeImageId);
277            }
278    
279            /**
280            * Returns the shopping item where largeImageId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
281            *
282            * @param largeImageId the large image ID
283            * @param retrieveFromCache whether to use the finder cache
284            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
285            * @throws SystemException if a system exception occurred
286            */
287            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByLargeImageId(
288                    long largeImageId, boolean retrieveFromCache)
289                    throws com.liferay.portal.kernel.exception.SystemException {
290                    return getPersistence()
291                                       .fetchByLargeImageId(largeImageId, retrieveFromCache);
292            }
293    
294            /**
295            * Removes the shopping item where largeImageId = &#63; from the database.
296            *
297            * @param largeImageId the large image ID
298            * @return the shopping item that was removed
299            * @throws SystemException if a system exception occurred
300            */
301            public static com.liferay.portlet.shopping.model.ShoppingItem removeByLargeImageId(
302                    long largeImageId)
303                    throws com.liferay.portal.kernel.exception.SystemException,
304                            com.liferay.portlet.shopping.NoSuchItemException {
305                    return getPersistence().removeByLargeImageId(largeImageId);
306            }
307    
308            /**
309            * Returns the number of shopping items where largeImageId = &#63;.
310            *
311            * @param largeImageId the large image ID
312            * @return the number of matching shopping items
313            * @throws SystemException if a system exception occurred
314            */
315            public static int countByLargeImageId(long largeImageId)
316                    throws com.liferay.portal.kernel.exception.SystemException {
317                    return getPersistence().countByLargeImageId(largeImageId);
318            }
319    
320            /**
321            * Returns all the shopping items where groupId = &#63; and categoryId = &#63;.
322            *
323            * @param groupId the group ID
324            * @param categoryId the category ID
325            * @return the matching shopping items
326            * @throws SystemException if a system exception occurred
327            */
328            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
329                    long groupId, long categoryId)
330                    throws com.liferay.portal.kernel.exception.SystemException {
331                    return getPersistence().findByG_C(groupId, categoryId);
332            }
333    
334            /**
335            * Returns a range of all the shopping items where groupId = &#63; and categoryId = &#63;.
336            *
337            * <p>
338            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingItemModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
339            * </p>
340            *
341            * @param groupId the group ID
342            * @param categoryId the category ID
343            * @param start the lower bound of the range of shopping items
344            * @param end the upper bound of the range of shopping items (not inclusive)
345            * @return the range of matching shopping items
346            * @throws SystemException if a system exception occurred
347            */
348            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
349                    long groupId, long categoryId, int start, int end)
350                    throws com.liferay.portal.kernel.exception.SystemException {
351                    return getPersistence().findByG_C(groupId, categoryId, start, end);
352            }
353    
354            /**
355            * Returns an ordered range of all the shopping items where groupId = &#63; and categoryId = &#63;.
356            *
357            * <p>
358            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingItemModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
359            * </p>
360            *
361            * @param groupId the group ID
362            * @param categoryId the category ID
363            * @param start the lower bound of the range of shopping items
364            * @param end the upper bound of the range of shopping items (not inclusive)
365            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
366            * @return the ordered range of matching shopping items
367            * @throws SystemException if a system exception occurred
368            */
369            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByG_C(
370                    long groupId, long categoryId, int start, int end,
371                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
372                    throws com.liferay.portal.kernel.exception.SystemException {
373                    return getPersistence()
374                                       .findByG_C(groupId, categoryId, start, end, orderByComparator);
375            }
376    
377            /**
378            * Returns the first shopping item in the ordered set where groupId = &#63; and categoryId = &#63;.
379            *
380            * @param groupId the group ID
381            * @param categoryId the category ID
382            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
383            * @return the first matching shopping item
384            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
385            * @throws SystemException if a system exception occurred
386            */
387            public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_First(
388                    long groupId, long categoryId,
389                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
390                    throws com.liferay.portal.kernel.exception.SystemException,
391                            com.liferay.portlet.shopping.NoSuchItemException {
392                    return getPersistence()
393                                       .findByG_C_First(groupId, categoryId, orderByComparator);
394            }
395    
396            /**
397            * Returns the first shopping item in the ordered set where groupId = &#63; and categoryId = &#63;.
398            *
399            * @param groupId the group ID
400            * @param categoryId the category ID
401            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
402            * @return the first matching shopping item, or <code>null</code> if a matching shopping item could not be found
403            * @throws SystemException if a system exception occurred
404            */
405            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByG_C_First(
406                    long groupId, long categoryId,
407                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
408                    throws com.liferay.portal.kernel.exception.SystemException {
409                    return getPersistence()
410                                       .fetchByG_C_First(groupId, categoryId, orderByComparator);
411            }
412    
413            /**
414            * Returns the last shopping item in the ordered set where groupId = &#63; and categoryId = &#63;.
415            *
416            * @param groupId the group ID
417            * @param categoryId the category ID
418            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
419            * @return the last matching shopping item
420            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
421            * @throws SystemException if a system exception occurred
422            */
423            public static com.liferay.portlet.shopping.model.ShoppingItem findByG_C_Last(
424                    long groupId, long categoryId,
425                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
426                    throws com.liferay.portal.kernel.exception.SystemException,
427                            com.liferay.portlet.shopping.NoSuchItemException {
428                    return getPersistence()
429                                       .findByG_C_Last(groupId, categoryId, orderByComparator);
430            }
431    
432            /**
433            * Returns the last shopping item in the ordered set where groupId = &#63; and categoryId = &#63;.
434            *
435            * @param groupId the group ID
436            * @param categoryId the category ID
437            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
438            * @return the last matching shopping item, or <code>null</code> if a matching shopping item could not be found
439            * @throws SystemException if a system exception occurred
440            */
441            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByG_C_Last(
442                    long groupId, long categoryId,
443                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
444                    throws com.liferay.portal.kernel.exception.SystemException {
445                    return getPersistence()
446                                       .fetchByG_C_Last(groupId, categoryId, orderByComparator);
447            }
448    
449            /**
450            * Returns the shopping items before and after the current shopping item in the ordered set where groupId = &#63; and categoryId = &#63;.
451            *
452            * @param itemId the primary key of the current shopping item
453            * @param groupId the group ID
454            * @param categoryId the category ID
455            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
456            * @return the previous, current, and next shopping item
457            * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found
458            * @throws SystemException if a system exception occurred
459            */
460            public static com.liferay.portlet.shopping.model.ShoppingItem[] findByG_C_PrevAndNext(
461                    long itemId, long groupId, long categoryId,
462                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
463                    throws com.liferay.portal.kernel.exception.SystemException,
464                            com.liferay.portlet.shopping.NoSuchItemException {
465                    return getPersistence()
466                                       .findByG_C_PrevAndNext(itemId, groupId, categoryId,
467                            orderByComparator);
468            }
469    
470            /**
471            * Returns all the shopping items that the user has permission to view where groupId = &#63; and categoryId = &#63;.
472            *
473            * @param groupId the group ID
474            * @param categoryId the category ID
475            * @return the matching shopping items that the user has permission to view
476            * @throws SystemException if a system exception occurred
477            */
478            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C(
479                    long groupId, long categoryId)
480                    throws com.liferay.portal.kernel.exception.SystemException {
481                    return getPersistence().filterFindByG_C(groupId, categoryId);
482            }
483    
484            /**
485            * Returns a range of all the shopping items that the user has permission to view where groupId = &#63; and categoryId = &#63;.
486            *
487            * <p>
488            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingItemModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
489            * </p>
490            *
491            * @param groupId the group ID
492            * @param categoryId the category ID
493            * @param start the lower bound of the range of shopping items
494            * @param end the upper bound of the range of shopping items (not inclusive)
495            * @return the range of matching shopping items that the user has permission to view
496            * @throws SystemException if a system exception occurred
497            */
498            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C(
499                    long groupId, long categoryId, int start, int end)
500                    throws com.liferay.portal.kernel.exception.SystemException {
501                    return getPersistence().filterFindByG_C(groupId, categoryId, start, end);
502            }
503    
504            /**
505            * Returns an ordered range of all the shopping items that the user has permissions to view where groupId = &#63; and categoryId = &#63;.
506            *
507            * <p>
508            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingItemModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
509            * </p>
510            *
511            * @param groupId the group ID
512            * @param categoryId the category ID
513            * @param start the lower bound of the range of shopping items
514            * @param end the upper bound of the range of shopping items (not inclusive)
515            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
516            * @return the ordered range of matching shopping items that the user has permission to view
517            * @throws SystemException if a system exception occurred
518            */
519            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> filterFindByG_C(
520                    long groupId, long categoryId, int start, int end,
521                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
522                    throws com.liferay.portal.kernel.exception.SystemException {
523                    return getPersistence()
524                                       .filterFindByG_C(groupId, categoryId, start, end,
525                            orderByComparator);
526            }
527    
528            /**
529            * 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;.
530            *
531            * @param itemId the primary key of the current shopping item
532            * @param groupId the group ID
533            * @param categoryId the category ID
534            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
535            * @return the previous, current, and next shopping item
536            * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found
537            * @throws SystemException if a system exception occurred
538            */
539            public static com.liferay.portlet.shopping.model.ShoppingItem[] filterFindByG_C_PrevAndNext(
540                    long itemId, long groupId, long categoryId,
541                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
542                    throws com.liferay.portal.kernel.exception.SystemException,
543                            com.liferay.portlet.shopping.NoSuchItemException {
544                    return getPersistence()
545                                       .filterFindByG_C_PrevAndNext(itemId, groupId, categoryId,
546                            orderByComparator);
547            }
548    
549            /**
550            * Removes all the shopping items where groupId = &#63; and categoryId = &#63; from the database.
551            *
552            * @param groupId the group ID
553            * @param categoryId the category ID
554            * @throws SystemException if a system exception occurred
555            */
556            public static void removeByG_C(long groupId, long categoryId)
557                    throws com.liferay.portal.kernel.exception.SystemException {
558                    getPersistence().removeByG_C(groupId, categoryId);
559            }
560    
561            /**
562            * Returns the number of shopping items where groupId = &#63; and categoryId = &#63;.
563            *
564            * @param groupId the group ID
565            * @param categoryId the category ID
566            * @return the number of matching shopping items
567            * @throws SystemException if a system exception occurred
568            */
569            public static int countByG_C(long groupId, long categoryId)
570                    throws com.liferay.portal.kernel.exception.SystemException {
571                    return getPersistence().countByG_C(groupId, categoryId);
572            }
573    
574            /**
575            * Returns the number of shopping items that the user has permission to view where groupId = &#63; and categoryId = &#63;.
576            *
577            * @param groupId the group ID
578            * @param categoryId the category ID
579            * @return the number of matching shopping items that the user has permission to view
580            * @throws SystemException if a system exception occurred
581            */
582            public static int filterCountByG_C(long groupId, long categoryId)
583                    throws com.liferay.portal.kernel.exception.SystemException {
584                    return getPersistence().filterCountByG_C(groupId, categoryId);
585            }
586    
587            /**
588            * 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.
589            *
590            * @param companyId the company ID
591            * @param sku the sku
592            * @return the matching shopping item
593            * @throws com.liferay.portlet.shopping.NoSuchItemException if a matching shopping item could not be found
594            * @throws SystemException if a system exception occurred
595            */
596            public static com.liferay.portlet.shopping.model.ShoppingItem findByC_S(
597                    long companyId, java.lang.String sku)
598                    throws com.liferay.portal.kernel.exception.SystemException,
599                            com.liferay.portlet.shopping.NoSuchItemException {
600                    return getPersistence().findByC_S(companyId, sku);
601            }
602    
603            /**
604            * 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.
605            *
606            * @param companyId the company ID
607            * @param sku the sku
608            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
609            * @throws SystemException if a system exception occurred
610            */
611            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
612                    long companyId, java.lang.String sku)
613                    throws com.liferay.portal.kernel.exception.SystemException {
614                    return getPersistence().fetchByC_S(companyId, sku);
615            }
616    
617            /**
618            * 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.
619            *
620            * @param companyId the company ID
621            * @param sku the sku
622            * @param retrieveFromCache whether to use the finder cache
623            * @return the matching shopping item, or <code>null</code> if a matching shopping item could not be found
624            * @throws SystemException if a system exception occurred
625            */
626            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByC_S(
627                    long companyId, java.lang.String sku, boolean retrieveFromCache)
628                    throws com.liferay.portal.kernel.exception.SystemException {
629                    return getPersistence().fetchByC_S(companyId, sku, retrieveFromCache);
630            }
631    
632            /**
633            * Removes the shopping item where companyId = &#63; and sku = &#63; from the database.
634            *
635            * @param companyId the company ID
636            * @param sku the sku
637            * @return the shopping item that was removed
638            * @throws SystemException if a system exception occurred
639            */
640            public static com.liferay.portlet.shopping.model.ShoppingItem removeByC_S(
641                    long companyId, java.lang.String sku)
642                    throws com.liferay.portal.kernel.exception.SystemException,
643                            com.liferay.portlet.shopping.NoSuchItemException {
644                    return getPersistence().removeByC_S(companyId, sku);
645            }
646    
647            /**
648            * Returns the number of shopping items where companyId = &#63; and sku = &#63;.
649            *
650            * @param companyId the company ID
651            * @param sku the sku
652            * @return the number of matching shopping items
653            * @throws SystemException if a system exception occurred
654            */
655            public static int countByC_S(long companyId, java.lang.String sku)
656                    throws com.liferay.portal.kernel.exception.SystemException {
657                    return getPersistence().countByC_S(companyId, sku);
658            }
659    
660            /**
661            * Caches the shopping item in the entity cache if it is enabled.
662            *
663            * @param shoppingItem the shopping item
664            */
665            public static void cacheResult(
666                    com.liferay.portlet.shopping.model.ShoppingItem shoppingItem) {
667                    getPersistence().cacheResult(shoppingItem);
668            }
669    
670            /**
671            * Caches the shopping items in the entity cache if it is enabled.
672            *
673            * @param shoppingItems the shopping items
674            */
675            public static void cacheResult(
676                    java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> shoppingItems) {
677                    getPersistence().cacheResult(shoppingItems);
678            }
679    
680            /**
681            * Creates a new shopping item with the primary key. Does not add the shopping item to the database.
682            *
683            * @param itemId the primary key for the new shopping item
684            * @return the new shopping item
685            */
686            public static com.liferay.portlet.shopping.model.ShoppingItem create(
687                    long itemId) {
688                    return getPersistence().create(itemId);
689            }
690    
691            /**
692            * Removes the shopping item with the primary key from the database. Also notifies the appropriate model listeners.
693            *
694            * @param itemId the primary key of the shopping item
695            * @return the shopping item that was removed
696            * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found
697            * @throws SystemException if a system exception occurred
698            */
699            public static com.liferay.portlet.shopping.model.ShoppingItem remove(
700                    long itemId)
701                    throws com.liferay.portal.kernel.exception.SystemException,
702                            com.liferay.portlet.shopping.NoSuchItemException {
703                    return getPersistence().remove(itemId);
704            }
705    
706            public static com.liferay.portlet.shopping.model.ShoppingItem updateImpl(
707                    com.liferay.portlet.shopping.model.ShoppingItem shoppingItem)
708                    throws com.liferay.portal.kernel.exception.SystemException {
709                    return getPersistence().updateImpl(shoppingItem);
710            }
711    
712            /**
713            * Returns the shopping item with the primary key or throws a {@link com.liferay.portlet.shopping.NoSuchItemException} if it could not be found.
714            *
715            * @param itemId the primary key of the shopping item
716            * @return the shopping item
717            * @throws com.liferay.portlet.shopping.NoSuchItemException if a shopping item with the primary key could not be found
718            * @throws SystemException if a system exception occurred
719            */
720            public static com.liferay.portlet.shopping.model.ShoppingItem findByPrimaryKey(
721                    long itemId)
722                    throws com.liferay.portal.kernel.exception.SystemException,
723                            com.liferay.portlet.shopping.NoSuchItemException {
724                    return getPersistence().findByPrimaryKey(itemId);
725            }
726    
727            /**
728            * Returns the shopping item with the primary key or returns <code>null</code> if it could not be found.
729            *
730            * @param itemId the primary key of the shopping item
731            * @return the shopping item, or <code>null</code> if a shopping item with the primary key could not be found
732            * @throws SystemException if a system exception occurred
733            */
734            public static com.liferay.portlet.shopping.model.ShoppingItem fetchByPrimaryKey(
735                    long itemId) throws com.liferay.portal.kernel.exception.SystemException {
736                    return getPersistence().fetchByPrimaryKey(itemId);
737            }
738    
739            /**
740            * Returns all the shopping items.
741            *
742            * @return the shopping items
743            * @throws SystemException if a system exception occurred
744            */
745            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll()
746                    throws com.liferay.portal.kernel.exception.SystemException {
747                    return getPersistence().findAll();
748            }
749    
750            /**
751            * Returns a range of all the shopping items.
752            *
753            * <p>
754            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingItemModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
755            * </p>
756            *
757            * @param start the lower bound of the range of shopping items
758            * @param end the upper bound of the range of shopping items (not inclusive)
759            * @return the range of shopping items
760            * @throws SystemException if a system exception occurred
761            */
762            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
763                    int start, int end)
764                    throws com.liferay.portal.kernel.exception.SystemException {
765                    return getPersistence().findAll(start, end);
766            }
767    
768            /**
769            * Returns an ordered range of all the shopping items.
770            *
771            * <p>
772            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.shopping.model.impl.ShoppingItemModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
773            * </p>
774            *
775            * @param start the lower bound of the range of shopping items
776            * @param end the upper bound of the range of shopping items (not inclusive)
777            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
778            * @return the ordered range of shopping items
779            * @throws SystemException if a system exception occurred
780            */
781            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findAll(
782                    int start, int end,
783                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
784                    throws com.liferay.portal.kernel.exception.SystemException {
785                    return getPersistence().findAll(start, end, orderByComparator);
786            }
787    
788            /**
789            * Removes all the shopping items from the database.
790            *
791            * @throws SystemException if a system exception occurred
792            */
793            public static void removeAll()
794                    throws com.liferay.portal.kernel.exception.SystemException {
795                    getPersistence().removeAll();
796            }
797    
798            /**
799            * Returns the number of shopping items.
800            *
801            * @return the number of shopping items
802            * @throws SystemException if a system exception occurred
803            */
804            public static int countAll()
805                    throws com.liferay.portal.kernel.exception.SystemException {
806                    return getPersistence().countAll();
807            }
808    
809            public static ShoppingItemPersistence getPersistence() {
810                    if (_persistence == null) {
811                            _persistence = (ShoppingItemPersistence)PortalBeanLocatorUtil.locate(ShoppingItemPersistence.class.getName());
812    
813                            ReferenceRegistry.registerReference(ShoppingItemUtil.class,
814                                    "_persistence");
815                    }
816    
817                    return _persistence;
818            }
819    
820            /**
821             * @deprecated
822             */
823            public void setPersistence(ShoppingItemPersistence persistence) {
824            }
825    
826            private static ShoppingItemPersistence _persistence;
827    }