1
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
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.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 obc)
135 throws com.liferay.portal.kernel.exception.SystemException {
136 return getPersistence().findByGroupId(groupId, start, end, obc);
137 }
138
139 public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_First(
140 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
141 throws com.liferay.portal.kernel.exception.SystemException,
142 com.liferay.portlet.shopping.NoSuchCategoryException {
143 return getPersistence().findByGroupId_First(groupId, obc);
144 }
145
146 public static com.liferay.portlet.shopping.model.ShoppingCategory findByGroupId_Last(
147 long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
148 throws com.liferay.portal.kernel.exception.SystemException,
149 com.liferay.portlet.shopping.NoSuchCategoryException {
150 return getPersistence().findByGroupId_Last(groupId, obc);
151 }
152
153 public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByGroupId_PrevAndNext(
154 long categoryId, long groupId,
155 com.liferay.portal.kernel.util.OrderByComparator obc)
156 throws com.liferay.portal.kernel.exception.SystemException,
157 com.liferay.portlet.shopping.NoSuchCategoryException {
158 return getPersistence()
159 .findByGroupId_PrevAndNext(categoryId, groupId, obc);
160 }
161
162 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
163 long groupId, long parentCategoryId)
164 throws com.liferay.portal.kernel.exception.SystemException {
165 return getPersistence().findByG_P(groupId, parentCategoryId);
166 }
167
168 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findByG_P(
169 long groupId, long parentCategoryId, int start, int end)
170 throws com.liferay.portal.kernel.exception.SystemException {
171 return getPersistence().findByG_P(groupId, parentCategoryId, start, end);
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 com.liferay.portal.kernel.util.OrderByComparator obc)
177 throws com.liferay.portal.kernel.exception.SystemException {
178 return getPersistence()
179 .findByG_P(groupId, parentCategoryId, start, end, obc);
180 }
181
182 public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_First(
183 long groupId, long parentCategoryId,
184 com.liferay.portal.kernel.util.OrderByComparator obc)
185 throws com.liferay.portal.kernel.exception.SystemException,
186 com.liferay.portlet.shopping.NoSuchCategoryException {
187 return getPersistence().findByG_P_First(groupId, parentCategoryId, obc);
188 }
189
190 public static com.liferay.portlet.shopping.model.ShoppingCategory findByG_P_Last(
191 long groupId, long parentCategoryId,
192 com.liferay.portal.kernel.util.OrderByComparator obc)
193 throws com.liferay.portal.kernel.exception.SystemException,
194 com.liferay.portlet.shopping.NoSuchCategoryException {
195 return getPersistence().findByG_P_Last(groupId, parentCategoryId, obc);
196 }
197
198 public static com.liferay.portlet.shopping.model.ShoppingCategory[] findByG_P_PrevAndNext(
199 long categoryId, long groupId, long parentCategoryId,
200 com.liferay.portal.kernel.util.OrderByComparator obc)
201 throws com.liferay.portal.kernel.exception.SystemException,
202 com.liferay.portlet.shopping.NoSuchCategoryException {
203 return getPersistence()
204 .findByG_P_PrevAndNext(categoryId, groupId,
205 parentCategoryId, obc);
206 }
207
208 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll()
209 throws com.liferay.portal.kernel.exception.SystemException {
210 return getPersistence().findAll();
211 }
212
213 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
214 int start, int end)
215 throws com.liferay.portal.kernel.exception.SystemException {
216 return getPersistence().findAll(start, end);
217 }
218
219 public static java.util.List<com.liferay.portlet.shopping.model.ShoppingCategory> findAll(
220 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
221 throws com.liferay.portal.kernel.exception.SystemException {
222 return getPersistence().findAll(start, end, obc);
223 }
224
225 public static void removeByGroupId(long groupId)
226 throws com.liferay.portal.kernel.exception.SystemException {
227 getPersistence().removeByGroupId(groupId);
228 }
229
230 public static void removeByG_P(long groupId, long parentCategoryId)
231 throws com.liferay.portal.kernel.exception.SystemException {
232 getPersistence().removeByG_P(groupId, parentCategoryId);
233 }
234
235 public static void removeAll()
236 throws com.liferay.portal.kernel.exception.SystemException {
237 getPersistence().removeAll();
238 }
239
240 public static int countByGroupId(long groupId)
241 throws com.liferay.portal.kernel.exception.SystemException {
242 return getPersistence().countByGroupId(groupId);
243 }
244
245 public static int countByG_P(long groupId, long parentCategoryId)
246 throws com.liferay.portal.kernel.exception.SystemException {
247 return getPersistence().countByG_P(groupId, parentCategoryId);
248 }
249
250 public static int countAll()
251 throws com.liferay.portal.kernel.exception.SystemException {
252 return getPersistence().countAll();
253 }
254
255 public static ShoppingCategoryPersistence getPersistence() {
256 if (_persistence == null) {
257 _persistence = (ShoppingCategoryPersistence)PortalBeanLocatorUtil.locate(ShoppingCategoryPersistence.class.getName());
258 }
259
260 return _persistence;
261 }
262
263 public void setPersistence(ShoppingCategoryPersistence persistence) {
264 _persistence = persistence;
265 }
266
267 private static ShoppingCategoryPersistence _persistence;
268 }