1
14
15 package com.liferay.portlet.shopping.service.persistence;
16
17 import com.liferay.portal.SystemException;
18 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
19 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
20 import com.liferay.portal.kernel.util.ReferenceRegistry;
21
22 import com.liferay.portlet.shopping.model.ShoppingCategory;
23
24 import java.util.List;
25
26
39 public class ShoppingCategoryUtil {
40
43 public static void clearCache() {
44 getPersistence().clearCache();
45 }
46
47
50 public static void clearCache(ShoppingCategory shoppingCategory) {
51 getPersistence().clearCache(shoppingCategory);
52 }
53
54
57 public int countWithDynamicQuery(DynamicQuery dynamicQuery)
58 throws SystemException {
59 return getPersistence().countWithDynamicQuery(dynamicQuery);
60 }
61
62
65 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
66 throws SystemException {
67 return getPersistence().findWithDynamicQuery(dynamicQuery);
68 }
69
70
73 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
74 int start, int end) throws SystemException {
75 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
76 }
77
78
81 public static ShoppingCategory remove(ShoppingCategory shoppingCategory)
82 throws SystemException {
83 return getPersistence().remove(shoppingCategory);
84 }
85
86
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.SystemException,
112 com.liferay.portlet.shopping.NoSuchCategoryException {
113 return getPersistence().remove(categoryId);
114 }
115
116
119 public static com.liferay.portlet.shopping.model.ShoppingCategory update(
120 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
121 throws com.liferay.portal.SystemException {
122 return getPersistence().update(shoppingCategory);
123 }
124
125 public static com.liferay.portlet.shopping.model.ShoppingCategory updateImpl(
126 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory,
127 boolean merge) throws com.liferay.portal.SystemException {
128 return getPersistence().updateImpl(shoppingCategory, merge);
129 }
130
131 public static com.liferay.portlet.shopping.model.ShoppingCategory findByPrimaryKey(
132 long categoryId)
133 throws com.liferay.portal.SystemException,
134 com.liferay.portlet.shopping.NoSuchCategoryException {
135 return getPersistence().findByPrimaryKey(categoryId);
136 }
137
138 public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByPrimaryKey(
139 long categoryId) throws com.liferay.portal.SystemException {
140 return getPersistence().fetchByPrimaryKey(categoryId);
141 }
142
143 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
144 long groupId) throws com.liferay.portal.SystemException {
145 return getPersistence().findByGroupId(groupId);
146 }
147
148 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
149 long groupId, int start, int end)
150 throws com.liferay.portal.SystemException {
151 return getPersistence().findByGroupId(groupId, start, end);
152 }
153
154 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
155 long groupId, int start, int end,
156 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157 throws com.liferay.portal.SystemException {
158 return getPersistence()
159 .findByGroupId(groupId, start, end, orderByComparator);
160 }
161
162 public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_First(
163 long groupId,
164 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
165 throws com.liferay.portal.SystemException,
166 com.liferay.portlet.shopping.NoSuchCategoryException {
167 return getPersistence().findByGroupId_First(groupId, orderByComparator);
168 }
169
170 public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_Last(
171 long groupId,
172 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173 throws com.liferay.portal.SystemException,
174 com.liferay.portlet.shopping.NoSuchCategoryException {
175 return getPersistence().findByGroupId_Last(groupId, orderByComparator);
176 }
177
178 public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByGroupId_PrevAndNext(
179 long categoryId, long groupId,
180 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
181 throws com.liferay.portal.SystemException,
182 com.liferay.portlet.shopping.NoSuchCategoryException {
183 return getPersistence()
184 .findByGroupId_PrevAndNext(categoryId, groupId,
185 orderByComparator);
186 }
187
188 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
189 long groupId, long parentCategoryId)
190 throws com.liferay.portal.SystemException {
191 return getPersistence().findByG_P(groupId, parentCategoryId);
192 }
193
194 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
195 long groupId, long parentCategoryId, int start, int end)
196 throws com.liferay.portal.SystemException {
197 return getPersistence().findByG_P(groupId, parentCategoryId, start, end);
198 }
199
200 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
201 long groupId, long parentCategoryId, int start, int end,
202 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
203 throws com.liferay.portal.SystemException {
204 return getPersistence()
205 .findByG_P(groupId, parentCategoryId, start, end,
206 orderByComparator);
207 }
208
209 public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_First(
210 long groupId, long parentCategoryId,
211 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
212 throws com.liferay.portal.SystemException,
213 com.liferay.portlet.shopping.NoSuchCategoryException {
214 return getPersistence()
215 .findByG_P_First(groupId, parentCategoryId, orderByComparator);
216 }
217
218 public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_Last(
219 long groupId, long parentCategoryId,
220 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
221 throws com.liferay.portal.SystemException,
222 com.liferay.portlet.shopping.NoSuchCategoryException {
223 return getPersistence()
224 .findByG_P_Last(groupId, parentCategoryId, orderByComparator);
225 }
226
227 public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByG_P_PrevAndNext(
228 long categoryId, long groupId, long parentCategoryId,
229 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
230 throws com.liferay.portal.SystemException,
231 com.liferay.portlet.shopping.NoSuchCategoryException {
232 return getPersistence()
233 .findByG_P_PrevAndNext(categoryId, groupId,
234 parentCategoryId, orderByComparator);
235 }
236
237 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll()
238 throws com.liferay.portal.SystemException {
239 return getPersistence().findAll();
240 }
241
242 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
243 int start, int end) throws com.liferay.portal.SystemException {
244 return getPersistence().findAll(start, end);
245 }
246
247 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
248 int start, int end,
249 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
250 throws com.liferay.portal.SystemException {
251 return getPersistence().findAll(start, end, orderByComparator);
252 }
253
254 public static void removeByGroupId(long groupId)
255 throws com.liferay.portal.SystemException {
256 getPersistence().removeByGroupId(groupId);
257 }
258
259 public static void removeByG_P(long groupId, long parentCategoryId)
260 throws com.liferay.portal.SystemException {
261 getPersistence().removeByG_P(groupId, parentCategoryId);
262 }
263
264 public static void removeAll() throws com.liferay.portal.SystemException {
265 getPersistence().removeAll();
266 }
267
268 public static int countByGroupId(long groupId)
269 throws com.liferay.portal.SystemException {
270 return getPersistence().countByGroupId(groupId);
271 }
272
273 public static int countByG_P(long groupId, long parentCategoryId)
274 throws com.liferay.portal.SystemException {
275 return getPersistence().countByG_P(groupId, parentCategoryId);
276 }
277
278 public static int countAll() throws com.liferay.portal.SystemException {
279 return getPersistence().countAll();
280 }
281
282 public static ShoppingCategoryPersistence getPersistence() {
283 if (_persistence == null) {
284 _persistence = (ShoppingCategoryPersistence)PortalBeanLocatorUtil.locate(ShoppingCategoryPersistence.class.getName());
285
286 ReferenceRegistry.registerReference(ShoppingCategoryUtil.class,
287 "_persistence");
288 }
289
290 return _persistence;
291 }
292
293 public void setPersistence(ShoppingCategoryPersistence persistence) {
294 _persistence = persistence;
295
296 ReferenceRegistry.registerReference(ShoppingCategoryUtil.class,
297 "_persistence");
298 }
299
300 private static ShoppingCategoryPersistence _persistence;
301 }