001
014
015 package com.liferay.portal.service.persistence;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019 import com.liferay.portal.kernel.exception.SystemException;
020 import com.liferay.portal.kernel.util.OrderByComparator;
021 import com.liferay.portal.model.Subscription;
022 import com.liferay.portal.service.ServiceContext;
023
024 import java.util.List;
025
026
032 public class SubscriptionUtil {
033
036 public static void clearCache() {
037 getPersistence().clearCache();
038 }
039
040
043 public static void clearCache(Subscription subscription) {
044 getPersistence().clearCache(subscription);
045 }
046
047
050 public long countWithDynamicQuery(DynamicQuery dynamicQuery)
051 throws SystemException {
052 return getPersistence().countWithDynamicQuery(dynamicQuery);
053 }
054
055
058 public static List<Subscription> findWithDynamicQuery(
059 DynamicQuery dynamicQuery) throws SystemException {
060 return getPersistence().findWithDynamicQuery(dynamicQuery);
061 }
062
063
066 public static List<Subscription> findWithDynamicQuery(
067 DynamicQuery dynamicQuery, int start, int end)
068 throws SystemException {
069 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
070 }
071
072
075 public static List<Subscription> findWithDynamicQuery(
076 DynamicQuery dynamicQuery, int start, int end,
077 OrderByComparator orderByComparator) throws SystemException {
078 return getPersistence()
079 .findWithDynamicQuery(dynamicQuery, start, end,
080 orderByComparator);
081 }
082
083
086 public static Subscription remove(Subscription subscription)
087 throws SystemException {
088 return getPersistence().remove(subscription);
089 }
090
091
094 public static Subscription update(Subscription subscription, boolean merge)
095 throws SystemException {
096 return getPersistence().update(subscription, merge);
097 }
098
099
102 public static Subscription update(Subscription subscription, boolean merge,
103 ServiceContext serviceContext) throws SystemException {
104 return getPersistence().update(subscription, merge, serviceContext);
105 }
106
107 public static void cacheResult(
108 com.liferay.portal.model.Subscription subscription) {
109 getPersistence().cacheResult(subscription);
110 }
111
112 public static void cacheResult(
113 java.util.List<com.liferay.portal.model.Subscription> subscriptions) {
114 getPersistence().cacheResult(subscriptions);
115 }
116
117 public static com.liferay.portal.model.Subscription create(
118 long subscriptionId) {
119 return getPersistence().create(subscriptionId);
120 }
121
122 public static com.liferay.portal.model.Subscription remove(
123 long subscriptionId)
124 throws com.liferay.portal.NoSuchSubscriptionException,
125 com.liferay.portal.kernel.exception.SystemException {
126 return getPersistence().remove(subscriptionId);
127 }
128
129 public static com.liferay.portal.model.Subscription updateImpl(
130 com.liferay.portal.model.Subscription subscription, boolean merge)
131 throws com.liferay.portal.kernel.exception.SystemException {
132 return getPersistence().updateImpl(subscription, merge);
133 }
134
135 public static com.liferay.portal.model.Subscription findByPrimaryKey(
136 long subscriptionId)
137 throws com.liferay.portal.NoSuchSubscriptionException,
138 com.liferay.portal.kernel.exception.SystemException {
139 return getPersistence().findByPrimaryKey(subscriptionId);
140 }
141
142 public static com.liferay.portal.model.Subscription fetchByPrimaryKey(
143 long subscriptionId)
144 throws com.liferay.portal.kernel.exception.SystemException {
145 return getPersistence().fetchByPrimaryKey(subscriptionId);
146 }
147
148 public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
149 long userId) throws com.liferay.portal.kernel.exception.SystemException {
150 return getPersistence().findByUserId(userId);
151 }
152
153 public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
154 long userId, int start, int end)
155 throws com.liferay.portal.kernel.exception.SystemException {
156 return getPersistence().findByUserId(userId, start, end);
157 }
158
159 public static java.util.List<com.liferay.portal.model.Subscription> findByUserId(
160 long userId, int start, int end,
161 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
162 throws com.liferay.portal.kernel.exception.SystemException {
163 return getPersistence()
164 .findByUserId(userId, start, end, orderByComparator);
165 }
166
167 public static com.liferay.portal.model.Subscription findByUserId_First(
168 long userId,
169 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
170 throws com.liferay.portal.NoSuchSubscriptionException,
171 com.liferay.portal.kernel.exception.SystemException {
172 return getPersistence().findByUserId_First(userId, orderByComparator);
173 }
174
175 public static com.liferay.portal.model.Subscription findByUserId_Last(
176 long userId,
177 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
178 throws com.liferay.portal.NoSuchSubscriptionException,
179 com.liferay.portal.kernel.exception.SystemException {
180 return getPersistence().findByUserId_Last(userId, orderByComparator);
181 }
182
183 public static com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext(
184 long subscriptionId, long userId,
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 .findByUserId_PrevAndNext(subscriptionId, userId,
190 orderByComparator);
191 }
192
193 public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
194 long userId, long classNameId)
195 throws com.liferay.portal.kernel.exception.SystemException {
196 return getPersistence().findByU_C(userId, classNameId);
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 throws com.liferay.portal.kernel.exception.SystemException {
202 return getPersistence().findByU_C(userId, classNameId, start, end);
203 }
204
205 public static java.util.List<com.liferay.portal.model.Subscription> findByU_C(
206 long userId, long classNameId, int start, int end,
207 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
208 throws com.liferay.portal.kernel.exception.SystemException {
209 return getPersistence()
210 .findByU_C(userId, classNameId, start, end, orderByComparator);
211 }
212
213 public static com.liferay.portal.model.Subscription findByU_C_First(
214 long userId, long classNameId,
215 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
216 throws com.liferay.portal.NoSuchSubscriptionException,
217 com.liferay.portal.kernel.exception.SystemException {
218 return getPersistence()
219 .findByU_C_First(userId, classNameId, orderByComparator);
220 }
221
222 public static com.liferay.portal.model.Subscription findByU_C_Last(
223 long userId, long classNameId,
224 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
225 throws com.liferay.portal.NoSuchSubscriptionException,
226 com.liferay.portal.kernel.exception.SystemException {
227 return getPersistence()
228 .findByU_C_Last(userId, classNameId, orderByComparator);
229 }
230
231 public static com.liferay.portal.model.Subscription[] findByU_C_PrevAndNext(
232 long subscriptionId, long userId, long classNameId,
233 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
234 throws com.liferay.portal.NoSuchSubscriptionException,
235 com.liferay.portal.kernel.exception.SystemException {
236 return getPersistence()
237 .findByU_C_PrevAndNext(subscriptionId, userId, classNameId,
238 orderByComparator);
239 }
240
241 public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
242 long companyId, long classNameId, long classPK)
243 throws com.liferay.portal.kernel.exception.SystemException {
244 return getPersistence().findByC_C_C(companyId, classNameId, classPK);
245 }
246
247 public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
248 long companyId, long classNameId, long classPK, int start, int end)
249 throws com.liferay.portal.kernel.exception.SystemException {
250 return getPersistence()
251 .findByC_C_C(companyId, classNameId, classPK, start, end);
252 }
253
254 public static java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
255 long companyId, long classNameId, long classPK, int start, int end,
256 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
257 throws com.liferay.portal.kernel.exception.SystemException {
258 return getPersistence()
259 .findByC_C_C(companyId, classNameId, classPK, start, end,
260 orderByComparator);
261 }
262
263 public static com.liferay.portal.model.Subscription findByC_C_C_First(
264 long companyId, long classNameId, long classPK,
265 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
266 throws com.liferay.portal.NoSuchSubscriptionException,
267 com.liferay.portal.kernel.exception.SystemException {
268 return getPersistence()
269 .findByC_C_C_First(companyId, classNameId, classPK,
270 orderByComparator);
271 }
272
273 public static com.liferay.portal.model.Subscription findByC_C_C_Last(
274 long companyId, long classNameId, long classPK,
275 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
276 throws com.liferay.portal.NoSuchSubscriptionException,
277 com.liferay.portal.kernel.exception.SystemException {
278 return getPersistence()
279 .findByC_C_C_Last(companyId, classNameId, classPK,
280 orderByComparator);
281 }
282
283 public static com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext(
284 long subscriptionId, long companyId, long classNameId, long classPK,
285 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
286 throws com.liferay.portal.NoSuchSubscriptionException,
287 com.liferay.portal.kernel.exception.SystemException {
288 return getPersistence()
289 .findByC_C_C_PrevAndNext(subscriptionId, companyId,
290 classNameId, classPK, orderByComparator);
291 }
292
293 public static com.liferay.portal.model.Subscription findByC_U_C_C(
294 long companyId, long userId, long classNameId, long classPK)
295 throws com.liferay.portal.NoSuchSubscriptionException,
296 com.liferay.portal.kernel.exception.SystemException {
297 return getPersistence()
298 .findByC_U_C_C(companyId, userId, classNameId, classPK);
299 }
300
301 public static com.liferay.portal.model.Subscription fetchByC_U_C_C(
302 long companyId, long userId, long classNameId, long classPK)
303 throws com.liferay.portal.kernel.exception.SystemException {
304 return getPersistence()
305 .fetchByC_U_C_C(companyId, userId, classNameId, classPK);
306 }
307
308 public static com.liferay.portal.model.Subscription fetchByC_U_C_C(
309 long companyId, long userId, long classNameId, long classPK,
310 boolean retrieveFromCache)
311 throws com.liferay.portal.kernel.exception.SystemException {
312 return getPersistence()
313 .fetchByC_U_C_C(companyId, userId, classNameId, classPK,
314 retrieveFromCache);
315 }
316
317 public static java.util.List<com.liferay.portal.model.Subscription> findAll()
318 throws com.liferay.portal.kernel.exception.SystemException {
319 return getPersistence().findAll();
320 }
321
322 public static java.util.List<com.liferay.portal.model.Subscription> findAll(
323 int start, int end)
324 throws com.liferay.portal.kernel.exception.SystemException {
325 return getPersistence().findAll(start, end);
326 }
327
328 public static java.util.List<com.liferay.portal.model.Subscription> findAll(
329 int start, int end,
330 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
331 throws com.liferay.portal.kernel.exception.SystemException {
332 return getPersistence().findAll(start, end, orderByComparator);
333 }
334
335 public static void removeByUserId(long userId)
336 throws com.liferay.portal.kernel.exception.SystemException {
337 getPersistence().removeByUserId(userId);
338 }
339
340 public static void removeByU_C(long userId, long classNameId)
341 throws com.liferay.portal.kernel.exception.SystemException {
342 getPersistence().removeByU_C(userId, classNameId);
343 }
344
345 public static void removeByC_C_C(long companyId, long classNameId,
346 long classPK)
347 throws com.liferay.portal.kernel.exception.SystemException {
348 getPersistence().removeByC_C_C(companyId, classNameId, classPK);
349 }
350
351 public static void removeByC_U_C_C(long companyId, long userId,
352 long classNameId, long classPK)
353 throws com.liferay.portal.NoSuchSubscriptionException,
354 com.liferay.portal.kernel.exception.SystemException {
355 getPersistence().removeByC_U_C_C(companyId, userId, classNameId, classPK);
356 }
357
358 public static void removeAll()
359 throws com.liferay.portal.kernel.exception.SystemException {
360 getPersistence().removeAll();
361 }
362
363 public static int countByUserId(long userId)
364 throws com.liferay.portal.kernel.exception.SystemException {
365 return getPersistence().countByUserId(userId);
366 }
367
368 public static int countByU_C(long userId, long classNameId)
369 throws com.liferay.portal.kernel.exception.SystemException {
370 return getPersistence().countByU_C(userId, classNameId);
371 }
372
373 public static int countByC_C_C(long companyId, long classNameId,
374 long classPK)
375 throws com.liferay.portal.kernel.exception.SystemException {
376 return getPersistence().countByC_C_C(companyId, classNameId, classPK);
377 }
378
379 public static int countByC_U_C_C(long companyId, long userId,
380 long classNameId, long classPK)
381 throws com.liferay.portal.kernel.exception.SystemException {
382 return getPersistence()
383 .countByC_U_C_C(companyId, userId, classNameId, classPK);
384 }
385
386 public static int countAll()
387 throws com.liferay.portal.kernel.exception.SystemException {
388 return getPersistence().countAll();
389 }
390
391 public static SubscriptionPersistence getPersistence() {
392 if (_persistence == null) {
393 _persistence = (SubscriptionPersistence)PortalBeanLocatorUtil.locate(SubscriptionPersistence.class.getName());
394 }
395
396 return _persistence;
397 }
398
399 public void setPersistence(SubscriptionPersistence persistence) {
400 _persistence = persistence;
401 }
402
403 private static SubscriptionPersistence _persistence;
404 }