1
22
23 package com.liferay.portlet.shopping.service.persistence;
24
25 import com.liferay.portal.SystemException;
26 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
27 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
28
29 import com.liferay.portlet.shopping.model.ShoppingCategory;
30
31 import java.util.List;
32
33
46 public class ShoppingCategoryUtil {
47
50 public static void clearCache() {
51 getPersistence().clearCache();
52 }
53
54
57 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
58 throws SystemException {
59 return getPersistence().findWithDynamicQuery(dynamicQuery);
60 }
61
62
65 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
66 int start, int end) throws SystemException {
67 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
68 }
69
70
73 public static ShoppingCategory remove(ShoppingCategory shoppingCategory)
74 throws SystemException {
75 return getPersistence().remove(shoppingCategory);
76 }
77
78
81 public static ShoppingCategory update(ShoppingCategory shoppingCategory,
82 boolean merge) throws SystemException {
83 return getPersistence().update(shoppingCategory, merge);
84 }
85
86 public static void cacheResult(
87 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory) {
88 getPersistence().cacheResult(shoppingCategory);
89 }
90
91 public static void cacheResult(
92 java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> shoppingCategories) {
93 getPersistence().cacheResult(shoppingCategories);
94 }
95
96 public static com.liferay.portlet.shopping.model.ShoppingCategory create(
97 long categoryId) {
98 return getPersistence().create(categoryId);
99 }
100
101 public static com.liferay.portlet.shopping.model.ShoppingCategory remove(
102 long categoryId)
103 throws com.liferay.portal.SystemException,
104 com.liferay.portlet.shopping.NoSuchCategoryException {
105 return getPersistence().remove(categoryId);
106 }
107
108
111 public static com.liferay.portlet.shopping.model.ShoppingCategory update(
112 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory)
113 throws com.liferay.portal.SystemException {
114 return getPersistence().update(shoppingCategory);
115 }
116
117 public static com.liferay.portlet.shopping.model.ShoppingCategory updateImpl(
118 com.liferay.portlet.shopping.model.ShoppingCategory shoppingCategory,
119 boolean merge) throws com.liferay.portal.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.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) throws com.liferay.portal.SystemException {
132 return getPersistence().fetchByPrimaryKey(categoryId);
133 }
134
135 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
136 long groupId) throws com.liferay.portal.SystemException {
137 return getPersistence().findByGroupId(groupId);
138 }
139
140 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
141 long groupId, int start, int end)
142 throws com.liferay.portal.SystemException {
143 return getPersistence().findByGroupId(groupId, start, end);
144 }
145
146 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByGroupId(
147 long groupId, int start, int end,
148 com.liferay.portal.kernel.util.OrderByComparator obc)
149 throws com.liferay.portal.SystemException {
150 return getPersistence().findByGroupId(groupId, start, end, obc);
151 }
152
153 public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_First(
154 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
155 throws com.liferay.portal.SystemException,
156 com.liferay.portlet.shopping.NoSuchCategoryException {
157 return getPersistence().findByGroupId_First(groupId, obc);
158 }
159
160 public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_Last(
161 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
162 throws com.liferay.portal.SystemException,
163 com.liferay.portlet.shopping.NoSuchCategoryException {
164 return getPersistence().findByGroupId_Last(groupId, obc);
165 }
166
167 public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByGroupId_PrevAndNext(
168 long categoryId, long groupId,
169 com.liferay.portal.kernel.util.OrderByComparator obc)
170 throws com.liferay.portal.SystemException,
171 com.liferay.portlet.shopping.NoSuchCategoryException {
172 return getPersistence()
173 .findByGroupId_PrevAndNext(categoryId, groupId, obc);
174 }
175
176 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
177 long groupId, long parentCategoryId)
178 throws com.liferay.portal.SystemException {
179 return getPersistence().findByG_P(groupId, parentCategoryId);
180 }
181
182 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
183 long groupId, long parentCategoryId, int start, int end)
184 throws com.liferay.portal.SystemException {
185 return getPersistence().findByG_P(groupId, parentCategoryId, start, end);
186 }
187
188 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
189 long groupId, long parentCategoryId, int start, int end,
190 com.liferay.portal.kernel.util.OrderByComparator obc)
191 throws com.liferay.portal.SystemException {
192 return getPersistence()
193 .findByG_P(groupId, parentCategoryId, start, end, obc);
194 }
195
196 public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_First(
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_First(groupId, parentCategoryId, obc);
202 }
203
204 public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_Last(
205 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().findByG_P_Last(groupId, parentCategoryId, obc);
210 }
211
212 public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByG_P_PrevAndNext(
213 long categoryId, long groupId, long parentCategoryId,
214 com.liferay.portal.kernel.util.OrderByComparator obc)
215 throws com.liferay.portal.SystemException,
216 com.liferay.portlet.shopping.NoSuchCategoryException {
217 return getPersistence()
218 .findByG_P_PrevAndNext(categoryId, groupId,
219 parentCategoryId, obc);
220 }
221
222 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll()
223 throws com.liferay.portal.SystemException {
224 return getPersistence().findAll();
225 }
226
227 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
228 int start, int end) throws com.liferay.portal.SystemException {
229 return getPersistence().findAll(start, end);
230 }
231
232 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
233 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
234 throws com.liferay.portal.SystemException {
235 return getPersistence().findAll(start, end, obc);
236 }
237
238 public static void removeByGroupId(long groupId)
239 throws com.liferay.portal.SystemException {
240 getPersistence().removeByGroupId(groupId);
241 }
242
243 public static void removeByG_P(long groupId, long parentCategoryId)
244 throws com.liferay.portal.SystemException {
245 getPersistence().removeByG_P(groupId, parentCategoryId);
246 }
247
248 public static void removeAll() throws com.liferay.portal.SystemException {
249 getPersistence().removeAll();
250 }
251
252 public static int countByGroupId(long groupId)
253 throws com.liferay.portal.SystemException {
254 return getPersistence().countByGroupId(groupId);
255 }
256
257 public static int countByG_P(long groupId, long parentCategoryId)
258 throws com.liferay.portal.SystemException {
259 return getPersistence().countByG_P(groupId, parentCategoryId);
260 }
261
262 public static int countAll() throws com.liferay.portal.SystemException {
263 return getPersistence().countAll();
264 }
265
266 public static ShoppingCategoryPersistence getPersistence() {
267 if (_persistence == null) {
268 _persistence = (ShoppingCategoryPersistence)PortalBeanLocatorUtil.locate(ShoppingCategoryPersistence.class.getName());
269 }
270
271 return _persistence;
272 }
273
274 public void setPersistence(ShoppingCategoryPersistence persistence) {
275 _persistence = persistence;
276 }
277
278 private static ShoppingCategoryPersistence _persistence;
279 }