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#findWithDynamicQuery(DynamicQuery)
48       */
49      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
50          throws SystemException {
51          return getPersistence().findWithDynamicQuery(dynamicQuery);
52      }
53  
54      /**
55       * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
56       */
57      public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
58          int start, int end) throws SystemException {
59          return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
60      }
61  
62      /**
63       * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
64       */
65      public static ShoppingCategory remove(ShoppingCategory shoppingCategory)
66          throws SystemException {
67          return getPersistence().remove(shoppingCategory);
68      }
69  
70      /**
71       * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
72       */
73      public static ShoppingCategory update(ShoppingCategory shoppingCategory,
74          boolean merge) throws SystemException {
75          return getPersistence().update(shoppingCategory, merge);
76      }
77  
78      public static void cacheResult(
79          com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory) {
80          getPersistence().cacheResult(shoppingCategory);
81      }
82  
83      public static void cacheResult(
84          java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> shoppingCategories) {
85          getPersistence().cacheResult(shoppingCategories);
86      }
87  
88      public static com.liferay.portlet.shopping.model.ShoppingCategory create(
89          long categoryId) {
90          return getPersistence().create(categoryId);
91      }
92  
93      public static com.liferay.portlet.shopping.model.ShoppingCategory remove(
94          long categoryId)
95          throws com.liferay.portal.kernel.exception.SystemException,
96              com.liferay.portlet.shopping.NoSuchCategoryException {
97          return getPersistence().remove(categoryId);
98      }
99  
100     public static com.liferay.portlet.shopping.model.ShoppingCategory updateImpl(
101         com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory,
102         boolean merge)
103         throws com.liferay.portal.kernel.exception.SystemException {
104         return getPersistence().updateImpl(shoppingCategory, merge);
105     }
106 
107     public static com.liferay.portlet.shopping.model.ShoppingCategory findByPrimaryKey(
108         long categoryId)
109         throws com.liferay.portal.kernel.exception.SystemException,
110             com.liferay.portlet.shopping.NoSuchCategoryException {
111         return getPersistence().findByPrimaryKey(categoryId);
112     }
113 
114     public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByPrimaryKey(
115         long categoryId)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getPersistence().fetchByPrimaryKey(categoryId);
118     }
119 
120     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
121         long groupId)
122         throws com.liferay.portal.kernel.exception.SystemException {
123         return getPersistence().findByGroupId(groupId);
124     }
125 
126     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
127         long groupId, int start, int end)
128         throws com.liferay.portal.kernel.exception.SystemException {
129         return getPersistence().findByGroupId(groupId, start, end);
130     }
131 
132     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
133         long groupId, int start, int end,
134         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135         throws com.liferay.portal.kernel.exception.SystemException {
136         return getPersistence()
137                    .findByGroupId(groupId, start, end, orderByComparator);
138     }
139 
140     public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_First(
141         long groupId,
142         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143         throws com.liferay.portal.kernel.exception.SystemException,
144             com.liferay.portlet.shopping.NoSuchCategoryException {
145         return getPersistence().findByGroupId_First(groupId, orderByComparator);
146     }
147 
148     public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_Last(
149         long groupId,
150         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
151         throws com.liferay.portal.kernel.exception.SystemException,
152             com.liferay.portlet.shopping.NoSuchCategoryException {
153         return getPersistence().findByGroupId_Last(groupId, orderByComparator);
154     }
155 
156     public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByGroupId_PrevAndNext(
157         long categoryId, 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()
162                    .findByGroupId_PrevAndNext(categoryId, groupId,
163             orderByComparator);
164     }
165 
166     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
167         long groupId, long parentCategoryId)
168         throws com.liferay.portal.kernel.exception.SystemException {
169         return getPersistence().findByG_P(groupId, parentCategoryId);
170     }
171 
172     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
173         long groupId, long parentCategoryId, int start, int end)
174         throws com.liferay.portal.kernel.exception.SystemException {
175         return getPersistence().findByG_P(groupId, parentCategoryId, start, end);
176     }
177 
178     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
179         long groupId, long parentCategoryId, int start, int end,
180         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181         throws com.liferay.portal.kernel.exception.SystemException {
182         return getPersistence()
183                    .findByG_P(groupId, parentCategoryId, start, end,
184             orderByComparator);
185     }
186 
187     public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_First(
188         long groupId, long parentCategoryId,
189         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
190         throws com.liferay.portal.kernel.exception.SystemException,
191             com.liferay.portlet.shopping.NoSuchCategoryException {
192         return getPersistence()
193                    .findByG_P_First(groupId, parentCategoryId, orderByComparator);
194     }
195 
196     public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_Last(
197         long groupId, long parentCategoryId,
198         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
199         throws com.liferay.portal.kernel.exception.SystemException,
200             com.liferay.portlet.shopping.NoSuchCategoryException {
201         return getPersistence()
202                    .findByG_P_Last(groupId, parentCategoryId, orderByComparator);
203     }
204 
205     public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByG_P_PrevAndNext(
206         long categoryId, long groupId, long parentCategoryId,
207         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
208         throws com.liferay.portal.kernel.exception.SystemException,
209             com.liferay.portlet.shopping.NoSuchCategoryException {
210         return getPersistence()
211                    .findByG_P_PrevAndNext(categoryId, groupId,
212             parentCategoryId, orderByComparator);
213     }
214 
215     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll()
216         throws com.liferay.portal.kernel.exception.SystemException {
217         return getPersistence().findAll();
218     }
219 
220     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
221         int start, int end)
222         throws com.liferay.portal.kernel.exception.SystemException {
223         return getPersistence().findAll(start, end);
224     }
225 
226     public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
227         int start, int end,
228         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
229         throws com.liferay.portal.kernel.exception.SystemException {
230         return getPersistence().findAll(start, end, orderByComparator);
231     }
232 
233     public static void removeByGroupId(long groupId)
234         throws com.liferay.portal.kernel.exception.SystemException {
235         getPersistence().removeByGroupId(groupId);
236     }
237 
238     public static void removeByG_P(long groupId, long parentCategoryId)
239         throws com.liferay.portal.kernel.exception.SystemException {
240         getPersistence().removeByG_P(groupId, parentCategoryId);
241     }
242 
243     public static void removeAll()
244         throws com.liferay.portal.kernel.exception.SystemException {
245         getPersistence().removeAll();
246     }
247 
248     public static int countByGroupId(long groupId)
249         throws com.liferay.portal.kernel.exception.SystemException {
250         return getPersistence().countByGroupId(groupId);
251     }
252 
253     public static int countByG_P(long groupId, long parentCategoryId)
254         throws com.liferay.portal.kernel.exception.SystemException {
255         return getPersistence().countByG_P(groupId, parentCategoryId);
256     }
257 
258     public static int countAll()
259         throws com.liferay.portal.kernel.exception.SystemException {
260         return getPersistence().countAll();
261     }
262 
263     public static ShoppingCategoryPersistence getPersistence() {
264         if (_persistence == null) {
265             _persistence = (ShoppingCategoryPersistence)PortalBeanLocatorUtil.locate(ShoppingCategoryPersistence.class.getName());
266         }
267 
268         return _persistence;
269     }
270 
271     public void setPersistence(ShoppingCategoryPersistence persistence) {
272         _persistence = persistence;
273     }
274 
275     private static ShoppingCategoryPersistence _persistence;
276 }