1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.shopping.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19  import com.liferay.portal.kernel.exception.SystemException;
20  
21  import com.liferay.portlet.shopping.model.ShoppingCategory;
22  
23  import java.util.List;
24  
25  /**
26   * <a href="ShoppingCategoryUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be
30   * overwritten the next time is generated.
31   * </p>
32   *
33   * @author    Brian Wing Shun Chan
34   * @see       ShoppingCategoryPersistence
35   * @see       ShoppingCategoryPersistenceImpl
36   * @generated
37   */
38  public class ShoppingCategoryUtil {
39      /**
40       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
41       */
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      /**
47       * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(ShoppingCategory)
48       */
49      public static void clearCache(ShoppingCategory shoppingCategory) {
50          getPersistence().clearCache(shoppingCategory);
51      }
52  
53      /**
54       * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
55       */
56      public long countWithDynamicQuery(DynamicQuery dynamicQuery)
57          throws SystemException {
58          return getPersistence().countWithDynamicQuery(dynamicQuery);
59      }
60  
61      /**
62       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
63       */
64      public static List<ShoppingCategory> findWithDynamicQuery(
65          DynamicQuery dynamicQuery) throws SystemException {
66          return getPersistence().findWithDynamicQuery(dynamicQuery);
67      }
68  
69      /**
70       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
71       */
72      public static List<ShoppingCategory> findWithDynamicQuery(
73          DynamicQuery dynamicQuery, int start, int end)
74          throws SystemException {
75          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76      }
77  
78      /**
79       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
80       */
81      public static ShoppingCategory remove(ShoppingCategory shoppingCategory)
82          throws SystemException {
83          return getPersistence().remove(shoppingCategory);
84      }
85  
86      /**
87       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
88       */
89      public static ShoppingCategory update(ShoppingCategory shoppingCategory,
90          boolean merge) throws SystemException {
91          return getPersistence().update(shoppingCategory, merge);
92      }
93  
94      public static void cacheResult(
95          com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory) {
96          getPersistence().cacheResult(shoppingCategory);
97      }
98  
99      public static void cacheResult(
100         java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> shoppingCategories) {
101         getPersistence().cacheResult(shoppingCategories);
102     }
103 
104     public static com.liferay.portlet.shopping.model.ShoppingCategory create(
105         long categoryId) {
106         return getPersistence().create(categoryId);
107     }
108 
109     public static com.liferay.portlet.shopping.model.ShoppingCategory remove(
110         long categoryId)
111         throws com.liferay.portal.kernel.exception.SystemException,
112             com.liferay.portlet.shopping.NoSuchCategoryException {
113         return getPersistence().remove(categoryId);
114     }
115 
116     public static com.liferay.portlet.shopping.model.ShoppingCategory updateImpl(
117         com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory,
118         boolean merge)
119         throws com.liferay.portal.kernel.exception.SystemException {
120         return getPersistence().updateImpl(shoppingCategory, merge);
121     }
122 
123     public static com.liferay.portlet.shopping.model.ShoppingCategory findByPrimaryKey(
124         long categoryId)
125         throws com.liferay.portal.kernel.exception.SystemException,
126             com.liferay.portlet.shopping.NoSuchCategoryException {
127         return getPersistence().findByPrimaryKey(categoryId);
128     }
129 
130     public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByPrimaryKey(
131         long categoryId)
132         throws com.liferay.portal.kernel.exception.SystemException {
133         return getPersistence().fetchByPrimaryKey(categoryId);
134     }
135 
136     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
137         long groupId)
138         throws com.liferay.portal.kernel.exception.SystemException {
139         return getPersistence().findByGroupId(groupId);
140     }
141 
142     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
143         long groupId, int start, int end)
144         throws com.liferay.portal.kernel.exception.SystemException {
145         return getPersistence().findByGroupId(groupId, start, end);
146     }
147 
148     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
149         long groupId, int start, int end,
150         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151         throws com.liferay.portal.kernel.exception.SystemException {
152         return getPersistence()
153                    .findByGroupId(groupId, start, end, orderByComparator);
154     }
155 
156     public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_First(
157         long groupId,
158         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159         throws com.liferay.portal.kernel.exception.SystemException,
160             com.liferay.portlet.shopping.NoSuchCategoryException {
161         return getPersistence().findByGroupId_First(groupId, orderByComparator);
162     }
163 
164     public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_Last(
165         long groupId,
166         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
167         throws com.liferay.portal.kernel.exception.SystemException,
168             com.liferay.portlet.shopping.NoSuchCategoryException {
169         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
170     }
171 
172     public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByGroupId_PrevAndNext(
173         long categoryId, long groupId,
174         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
175         throws com.liferay.portal.kernel.exception.SystemException,
176             com.liferay.portlet.shopping.NoSuchCategoryException {
177         return getPersistence()
178                    .findByGroupId_PrevAndNext(categoryId, groupId,
179             orderByComparator);
180     }
181 
182     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
183         long groupId)
184         throws com.liferay.portal.kernel.exception.SystemException {
185         return getPersistence().filterFindByGroupId(groupId);
186     }
187 
188     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
189         long groupId, int start, int end)
190         throws com.liferay.portal.kernel.exception.SystemException {
191         return getPersistence().filterFindByGroupId(groupId, start, end);
192     }
193 
194     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByGroupId(
195         long groupId, int start, int end,
196         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
197         throws com.liferay.portal.kernel.exception.SystemException {
198         return getPersistence()
199                    .filterFindByGroupId(groupId, start, end, orderByComparator);
200     }
201 
202     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
203         long groupId, long parentCategoryId)
204         throws com.liferay.portal.kernel.exception.SystemException {
205         return getPersistence().findByG_P(groupId, parentCategoryId);
206     }
207 
208     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
209         long groupId, long parentCategoryId, int start, int end)
210         throws com.liferay.portal.kernel.exception.SystemException {
211         return getPersistence().findByG_P(groupId, parentCategoryId, start, end);
212     }
213 
214     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
215         long groupId, long parentCategoryId, int start, int end,
216         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
217         throws com.liferay.portal.kernel.exception.SystemException {
218         return getPersistence()
219                    .findByG_P(groupId, parentCategoryId, start, end,
220             orderByComparator);
221     }
222 
223     public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_First(
224         long groupId, long parentCategoryId,
225         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
226         throws com.liferay.portal.kernel.exception.SystemException,
227             com.liferay.portlet.shopping.NoSuchCategoryException {
228         return getPersistence()
229                    .findByG_P_First(groupId, parentCategoryId, orderByComparator);
230     }
231 
232     public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_Last(
233         long groupId, long parentCategoryId,
234         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
235         throws com.liferay.portal.kernel.exception.SystemException,
236             com.liferay.portlet.shopping.NoSuchCategoryException {
237         return getPersistence()
238                    .findByG_P_Last(groupId, parentCategoryId, orderByComparator);
239     }
240 
241     public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByG_P_PrevAndNext(
242         long categoryId, long groupId, long parentCategoryId,
243         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
244         throws com.liferay.portal.kernel.exception.SystemException,
245             com.liferay.portlet.shopping.NoSuchCategoryException {
246         return getPersistence()
247                    .findByG_P_PrevAndNext(categoryId, groupId,
248             parentCategoryId, orderByComparator);
249     }
250 
251     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
252         long groupId, long parentCategoryId)
253         throws com.liferay.portal.kernel.exception.SystemException {
254         return getPersistence().filterFindByG_P(groupId, parentCategoryId);
255     }
256 
257     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
258         long groupId, long parentCategoryId, int start, int end)
259         throws com.liferay.portal.kernel.exception.SystemException {
260         return getPersistence()
261                    .filterFindByG_P(groupId, parentCategoryId, start, end);
262     }
263 
264     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> filterFindByG_P(
265         long groupId, long parentCategoryId, int start, int end,
266         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
267         throws com.liferay.portal.kernel.exception.SystemException {
268         return getPersistence()
269                    .filterFindByG_P(groupId, parentCategoryId, start, end,
270             orderByComparator);
271     }
272 
273     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll()
274         throws com.liferay.portal.kernel.exception.SystemException {
275         return getPersistence().findAll();
276     }
277 
278     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
279         int start, int end)
280         throws com.liferay.portal.kernel.exception.SystemException {
281         return getPersistence().findAll(start, end);
282     }
283 
284     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
285         int start, int end,
286         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
287         throws com.liferay.portal.kernel.exception.SystemException {
288         return getPersistence().findAll(start, end, orderByComparator);
289     }
290 
291     public static void removeByGroupId(long groupId)
292         throws com.liferay.portal.kernel.exception.SystemException {
293         getPersistence().removeByGroupId(groupId);
294     }
295 
296     public static void removeByG_P(long groupId, long parentCategoryId)
297         throws com.liferay.portal.kernel.exception.SystemException {
298         getPersistence().removeByG_P(groupId, parentCategoryId);
299     }
300 
301     public static void removeAll()
302         throws com.liferay.portal.kernel.exception.SystemException {
303         getPersistence().removeAll();
304     }
305 
306     public static int countByGroupId(long groupId)
307         throws com.liferay.portal.kernel.exception.SystemException {
308         return getPersistence().countByGroupId(groupId);
309     }
310 
311     public static int filterCountByGroupId(long groupId)
312         throws com.liferay.portal.kernel.exception.SystemException {
313         return getPersistence().filterCountByGroupId(groupId);
314     }
315 
316     public static int countByG_P(long groupId, long parentCategoryId)
317         throws com.liferay.portal.kernel.exception.SystemException {
318         return getPersistence().countByG_P(groupId, parentCategoryId);
319     }
320 
321     public static int filterCountByG_P(long groupId, long parentCategoryId)
322         throws com.liferay.portal.kernel.exception.SystemException {
323         return getPersistence().filterCountByG_P(groupId, parentCategoryId);
324     }
325 
326     public static int countAll()
327         throws com.liferay.portal.kernel.exception.SystemException {
328         return getPersistence().countAll();
329     }
330 
331     public static ShoppingCategoryPersistence getPersistence() {
332         if (_persistence == null) {
333             _persistence = (ShoppingCategoryPersistence)PortalBeanLocatorUtil.locate(ShoppingCategoryPersistence.class.getName());
334         }
335 
336         return _persistence;
337     }
338 
339     public void setPersistence(ShoppingCategoryPersistence persistence) {
340         _persistence = persistence;
341     }
342 
343     private static ShoppingCategoryPersistence _persistence;
344 }