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