1
14
15 package com.liferay.portal.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 import com.liferay.portal.model.Subscription;
22
23 import java.util.List;
24
25
38 public class SubscriptionUtil {
39
42 public static void clearCache() {
43 getPersistence().clearCache();
44 }
45
46
49 public static void clearCache(Subscription subscription) {
50 getPersistence().clearCache(subscription);
51 }
52
53
56 public int countWithDynamicQuery(DynamicQuery dynamicQuery)
57 throws SystemException {
58 return getPersistence().countWithDynamicQuery(dynamicQuery);
59 }
60
61
64 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery)
65 throws SystemException {
66 return getPersistence().findWithDynamicQuery(dynamicQuery);
67 }
68
69
72 public static List<Object> findWithDynamicQuery(DynamicQuery dynamicQuery,
73 int start, int end) throws SystemException {
74 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
75 }
76
77
80 public static Subscription remove(Subscription subscription)
81 throws SystemException {
82 return getPersistence().remove(subscription);
83 }
84
85
88 public static Subscription update(Subscription subscription, boolean merge)
89 throws SystemException {
90 return getPersistence().update(subscription, merge);
91 }
92
93 public static void cacheResult(
94 com.liferay.portal.model.Subscription subscription) {
95 getPersistence().cacheResult(subscription);
96 }
97
98 public static void cacheResult(
99 java.util.List<com.liferay.portal.model.Subscription> subscriptions) {
100 getPersistence().cacheResult(subscriptions);
101 }
102
103 public static com.liferay.portal.model.Subscription create(
104 long subscriptionId) {
105 return getPersistence().create(subscriptionId);
106 }
107
108 public static com.liferay.portal.model.Subscription remove(
109 long subscriptionId)
110 throws com.liferay.portal.NoSuchSubscriptionException,
111 com.liferay.portal.SystemException {
112 return getPersistence().remove(subscriptionId);
113 }
114
115
118 public static com.liferay.portal.model.Subscription update(
119 com.liferay.portal.model.Subscription subscription)
120 throws com.liferay.portal.SystemException {
121 return getPersistence().update(subscription);
122 }
123
124 public static com.liferay.portal.model.Subscription updateImpl(
125 com.liferay.portal.model.Subscription subscription, boolean merge)
126 throws com.liferay.portal.SystemException {
127 return getPersistence().updateImpl(subscription, merge);
128 }
129
130 public static com.liferay.portal.model.Subscription findByPrimaryKey(
131 long subscriptionId)
132 throws com.liferay.portal.NoSuchSubscriptionException,
133 com.liferay.portal.SystemException {
134 return getPersistence().findByPrimaryKey(subscriptionId);
135 }
136
137 public static com.liferay.portal.model.Subscription fetchByPrimaryKey(
138 long subscriptionId) throws com.liferay.portal.SystemException {
139 return getPersistence().fetchByPrimaryKey(subscriptionId);
140 }
141
142 public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
143 long userId) throws com.liferay.portal.SystemException {
144 return getPersistence().findByUserId(userId);
145 }
146
147 public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
148 long userId, int start, int end)
149 throws com.liferay.portal.SystemException {
150 return getPersistence().findByUserId(userId, start, end);
151 }
152
153 public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
154 long userId, int start, int end,
155 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
156 throws com.liferay.portal.SystemException {
157 return getPersistence()
158 .findByUserId(userId, start, end, orderByComparator);
159 }
160
161 public static com.liferay.portal.model.Subscription findByUserId_First(
162 long userId,
163 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
164 throws com.liferay.portal.NoSuchSubscriptionException,
165 com.liferay.portal.SystemException {
166 return getPersistence().findByUserId_First(userId, orderByComparator);
167 }
168
169 public static com.liferay.portal.model.Subscription findByUserId_Last(
170 long userId,
171 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
172 throws com.liferay.portal.NoSuchSubscriptionException,
173 com.liferay.portal.SystemException {
174 return getPersistence().findByUserId_Last(userId, orderByComparator);
175 }
176
177 public static com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext(
178 long subscriptionId, long userId,
179 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
180 throws com.liferay.portal.NoSuchSubscriptionException,
181 com.liferay.portal.SystemException {
182 return getPersistence()
183 .findByUserId_PrevAndNext(subscriptionId, userId,
184 orderByComparator);
185 }
186
187 public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
188 long userId, long classNameId)
189 throws com.liferay.portal.SystemException {
190 return getPersistence().findByU_C(userId, classNameId);
191 }
192
193 public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
194 long userId, long classNameId, int start, int end)
195 throws com.liferay.portal.SystemException {
196 return getPersistence().findByU_C(userId, classNameId, start, end);
197 }
198
199 public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
200 long userId, long classNameId, int start, int end,
201 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
202 throws com.liferay.portal.SystemException {
203 return getPersistence()
204 .findByU_C(userId, classNameId, start, end, orderByComparator);
205 }
206
207 public static com.liferay.portal.model.Subscription findByU_C_First(
208 long userId, long classNameId,
209 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
210 throws com.liferay.portal.NoSuchSubscriptionException,
211 com.liferay.portal.SystemException {
212 return getPersistence()
213 .findByU_C_First(userId, classNameId, orderByComparator);
214 }
215
216 public static com.liferay.portal.model.Subscription findByU_C_Last(
217 long userId, long classNameId,
218 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
219 throws com.liferay.portal.NoSuchSubscriptionException,
220 com.liferay.portal.SystemException {
221 return getPersistence()
222 .findByU_C_Last(userId, classNameId, orderByComparator);
223 }
224
225 public static com.liferay.portal.model.Subscription[] findByU_C_PrevAndNext(
226 long subscriptionId, long userId, long classNameId,
227 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
228 throws com.liferay.portal.NoSuchSubscriptionException,
229 com.liferay.portal.SystemException {
230 return getPersistence()
231 .findByU_C_PrevAndNext(subscriptionId, userId, classNameId,
232 orderByComparator);
233 }
234
235 public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
236 long companyId, long classNameId, long classPK)
237 throws com.liferay.portal.SystemException {
238 return getPersistence().findByC_C_C(companyId, classNameId, classPK);
239 }
240
241 public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
242 long companyId, long classNameId, long classPK, int start, int end)
243 throws com.liferay.portal.SystemException {
244 return getPersistence()
245 .findByC_C_C(companyId, classNameId, classPK, start, end);
246 }
247
248 public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
249 long companyId, long classNameId, long classPK, int start, int end,
250 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
251 throws com.liferay.portal.SystemException {
252 return getPersistence()
253 .findByC_C_C(companyId, classNameId, classPK, start, end,
254 orderByComparator);
255 }
256
257 public static com.liferay.portal.model.Subscription findByC_C_C_First(
258 long companyId, long classNameId, long classPK,
259 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
260 throws com.liferay.portal.NoSuchSubscriptionException,
261 com.liferay.portal.SystemException {
262 return getPersistence()
263 .findByC_C_C_First(companyId, classNameId, classPK,
264 orderByComparator);
265 }
266
267 public static com.liferay.portal.model.Subscription findByC_C_C_Last(
268 long companyId, long classNameId, long classPK,
269 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
270 throws com.liferay.portal.NoSuchSubscriptionException,
271 com.liferay.portal.SystemException {
272 return getPersistence()
273 .findByC_C_C_Last(companyId, classNameId, classPK,
274 orderByComparator);
275 }
276
277 public static com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext(
278 long subscriptionId, long companyId, long classNameId, long classPK,
279 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
280 throws com.liferay.portal.NoSuchSubscriptionException,
281 com.liferay.portal.SystemException {
282 return getPersistence()
283 .findByC_C_C_PrevAndNext(subscriptionId, companyId,
284 classNameId, classPK, orderByComparator);
285 }
286
287 public static com.liferay.portal.model.Subscription findByC_U_C_C(
288 long companyId, long userId, long classNameId, long classPK)
289 throws com.liferay.portal.NoSuchSubscriptionException,
290 com.liferay.portal.SystemException {
291 return getPersistence()
292 .findByC_U_C_C(companyId, userId, classNameId, classPK);
293 }
294
295 public static com.liferay.portal.model.Subscription fetchByC_U_C_C(
296 long companyId, long userId, long classNameId, long classPK)
297 throws com.liferay.portal.SystemException {
298 return getPersistence()
299 .fetchByC_U_C_C(companyId, userId, classNameId, classPK);
300 }
301
302 public static com.liferay.portal.model.Subscription fetchByC_U_C_C(
303 long companyId, long userId, long classNameId, long classPK,
304 boolean retrieveFromCache) throws com.liferay.portal.SystemException {
305 return getPersistence()
306 .fetchByC_U_C_C(companyId, userId, classNameId, classPK,
307 retrieveFromCache);
308 }
309
310 public static java.util.List<com.liferay.portal.model.Subscription> findAll()
311 throws com.liferay.portal.SystemException {
312 return getPersistence().findAll();
313 }
314
315 public static java.util.List<com.liferay.portal.model.Subscription> findAll(
316 int start, int end) throws com.liferay.portal.SystemException {
317 return getPersistence().findAll(start, end);
318 }
319
320 public static java.util.List<com.liferay.portal.model.Subscription> findAll(
321 int start, int end,
322 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
323 throws com.liferay.portal.SystemException {
324 return getPersistence().findAll(start, end, orderByComparator);
325 }
326
327 public static void removeByUserId(long userId)
328 throws com.liferay.portal.SystemException {
329 getPersistence().removeByUserId(userId);
330 }
331
332 public static void removeByU_C(long userId, long classNameId)
333 throws com.liferay.portal.SystemException {
334 getPersistence().removeByU_C(userId, classNameId);
335 }
336
337 public static void removeByC_C_C(long companyId, long classNameId,
338 long classPK) throws com.liferay.portal.SystemException {
339 getPersistence().removeByC_C_C(companyId, classNameId, classPK);
340 }
341
342 public static void removeByC_U_C_C(long companyId, long userId,
343 long classNameId, long classPK)
344 throws com.liferay.portal.NoSuchSubscriptionException,
345 com.liferay.portal.SystemException {
346 getPersistence().removeByC_U_C_C(companyId, userId, classNameId, classPK);
347 }
348
349 public static void removeAll() throws com.liferay.portal.SystemException {
350 getPersistence().removeAll();
351 }
352
353 public static int countByUserId(long userId)
354 throws com.liferay.portal.SystemException {
355 return getPersistence().countByUserId(userId);
356 }
357
358 public static int countByU_C(long userId, long classNameId)
359 throws com.liferay.portal.SystemException {
360 return getPersistence().countByU_C(userId, classNameId);
361 }
362
363 public static int countByC_C_C(long companyId, long classNameId,
364 long classPK) throws com.liferay.portal.SystemException {
365 return getPersistence().countByC_C_C(companyId, classNameId, classPK);
366 }
367
368 public static int countByC_U_C_C(long companyId, long userId,
369 long classNameId, long classPK)
370 throws com.liferay.portal.SystemException {
371 return getPersistence()
372 .countByC_U_C_C(companyId, userId, classNameId, classPK);
373 }
374
375 public static int countAll() throws com.liferay.portal.SystemException {
376 return getPersistence().countAll();
377 }
378
379 public static SubscriptionPersistence getPersistence() {
380 if (_persistence == null) {
381 _persistence = (SubscriptionPersistence)PortalBeanLocatorUtil.locate(SubscriptionPersistence.class.getName());
382
383 ReferenceRegistry.registerReference(SubscriptionUtil.class,
384 "_persistence");
385 }
386
387 return _persistence;
388 }
389
390 public void setPersistence(SubscriptionPersistence persistence) {
391 _persistence = persistence;
392
393 ReferenceRegistry.registerReference(SubscriptionUtil.class,
394 "_persistence");
395 }
396
397 private static SubscriptionPersistence _persistence;
398 }