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