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
21 import com.liferay.portlet.shopping.model.ShoppingCategory;
22
23 import java.util.List;
24
25
38 public class ShoppingCategoryUtil {
39
42 public static void clearCache() {
43 getPersistence().clearCache();
44 }
45
46
49 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
50 throws SystemException {
51 return getPersistence().findWithDynamicQuery(dynamicQuery);
52 }
53
54
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
65 public static ShoppingCategory remove(ShoppingCategory shoppingCategory)
66 throws SystemException {
67 return getPersistence().remove(shoppingCategory);
68 }
69
70
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.SystemException,
96 com.liferay.portlet.shopping.NoSuchCategoryException {
97 return getPersistence().remove(categoryId);
98 }
99
100
103 public static com.liferay.portlet.shopping.model.ShoppingCategory update(
104 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
105 throws com.liferay.portal.SystemException {
106 return getPersistence().update(shoppingCategory);
107 }
108
109 public static com.liferay.portlet.shopping.model.ShoppingCategory updateImpl(
110 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory,
111 boolean merge) throws com.liferay.portal.SystemException {
112 return getPersistence().updateImpl(shoppingCategory, merge);
113 }
114
115 public static com.liferay.portlet.shopping.model.ShoppingCategory findByPrimaryKey(
116 long categoryId)
117 throws com.liferay.portal.SystemException,
118 com.liferay.portlet.shopping.NoSuchCategoryException {
119 return getPersistence().findByPrimaryKey(categoryId);
120 }
121
122 public static com.liferay.portlet.shopping.model.ShoppingCategory fetchByPrimaryKey(
123 long categoryId) throws com.liferay.portal.SystemException {
124 return getPersistence().fetchByPrimaryKey(categoryId);
125 }
126
127 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
128 long groupId) throws com.liferay.portal.SystemException {
129 return getPersistence().findByGroupId(groupId);
130 }
131
132 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
133 long groupId, int start, int end)
134 throws com.liferay.portal.SystemException {
135 return getPersistence().findByGroupId(groupId, start, end);
136 }
137
138 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
139 long groupId, int start, int end,
140 com.liferay.portal.kernel.util.OrderByComparator obc)
141 throws com.liferay.portal.SystemException {
142 return getPersistence().findByGroupId(groupId, start, end, obc);
143 }
144
145 public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_First(
146 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
147 throws com.liferay.portal.SystemException,
148 com.liferay.portlet.shopping.NoSuchCategoryException {
149 return getPersistence().findByGroupId_First(groupId, obc);
150 }
151
152 public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_Last(
153 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
154 throws com.liferay.portal.SystemException,
155 com.liferay.portlet.shopping.NoSuchCategoryException {
156 return getPersistence().findByGroupId_Last(groupId, obc);
157 }
158
159 public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByGroupId_PrevAndNext(
160 long categoryId, long groupId,
161 com.liferay.portal.kernel.util.OrderByComparator obc)
162 throws com.liferay.portal.SystemException,
163 com.liferay.portlet.shopping.NoSuchCategoryException {
164 return getPersistence()
165 .findByGroupId_PrevAndNext(categoryId, groupId, obc);
166 }
167
168 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
169 long groupId, long parentCategoryId)
170 throws com.liferay.portal.SystemException {
171 return getPersistence().findByG_P(groupId, parentCategoryId);
172 }
173
174 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
175 long groupId, long parentCategoryId, int start, int end)
176 throws com.liferay.portal.SystemException {
177 return getPersistence().findByG_P(groupId, parentCategoryId, start, end);
178 }
179
180 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
181 long groupId, long parentCategoryId, int start, int end,
182 com.liferay.portal.kernel.util.OrderByComparator obc)
183 throws com.liferay.portal.SystemException {
184 return getPersistence()
185 .findByG_P(groupId, parentCategoryId, start, end, obc);
186 }
187
188 public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_First(
189 long groupId, long parentCategoryId,
190 com.liferay.portal.kernel.util.OrderByComparator obc)
191 throws com.liferay.portal.SystemException,
192 com.liferay.portlet.shopping.NoSuchCategoryException {
193 return getPersistence().findByG_P_First(groupId, parentCategoryId, obc);
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 obc)
199 throws com.liferay.portal.SystemException,
200 com.liferay.portlet.shopping.NoSuchCategoryException {
201 return getPersistence().findByG_P_Last(groupId, parentCategoryId, obc);
202 }
203
204 public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByG_P_PrevAndNext(
205 long categoryId, long groupId, long parentCategoryId,
206 com.liferay.portal.kernel.util.OrderByComparator obc)
207 throws com.liferay.portal.SystemException,
208 com.liferay.portlet.shopping.NoSuchCategoryException {
209 return getPersistence()
210 .findByG_P_PrevAndNext(categoryId, groupId,
211 parentCategoryId, obc);
212 }
213
214 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll()
215 throws com.liferay.portal.SystemException {
216 return getPersistence().findAll();
217 }
218
219 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
220 int start, int end) throws com.liferay.portal.SystemException {
221 return getPersistence().findAll(start, end);
222 }
223
224 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
225 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
226 throws com.liferay.portal.SystemException {
227 return getPersistence().findAll(start, end, obc);
228 }
229
230 public static void removeByGroupId(long groupId)
231 throws com.liferay.portal.SystemException {
232 getPersistence().removeByGroupId(groupId);
233 }
234
235 public static void removeByG_P(long groupId, long parentCategoryId)
236 throws com.liferay.portal.SystemException {
237 getPersistence().removeByG_P(groupId, parentCategoryId);
238 }
239
240 public static void removeAll() throws com.liferay.portal.SystemException {
241 getPersistence().removeAll();
242 }
243
244 public static int countByGroupId(long groupId)
245 throws com.liferay.portal.SystemException {
246 return getPersistence().countByGroupId(groupId);
247 }
248
249 public static int countByG_P(long groupId, long parentCategoryId)
250 throws com.liferay.portal.SystemException {
251 return getPersistence().countByG_P(groupId, parentCategoryId);
252 }
253
254 public static int countAll() throws com.liferay.portal.SystemException {
255 return getPersistence().countAll();
256 }
257
258 public static ShoppingCategoryPersistence getPersistence() {
259 if (_persistence == null) {
260 _persistence = (ShoppingCategoryPersistence)PortalBeanLocatorUtil.locate(ShoppingCategoryPersistence.class.getName());
261 }
262
263 return _persistence;
264 }
265
266 public void setPersistence(ShoppingCategoryPersistence persistence) {
267 _persistence = persistence;
268 }
269
270 private static ShoppingCategoryPersistence _persistence;
271 }