001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.model.Subscription;
018    
019    /**
020     * The persistence interface for the subscription service.
021     *
022     * <p>
023     * Caching information and settings can be found in <code>portal.properties</code>
024     * </p>
025     *
026     * @author Brian Wing Shun Chan
027     * @see SubscriptionPersistenceImpl
028     * @see SubscriptionUtil
029     * @generated
030     */
031    public interface SubscriptionPersistence extends BasePersistence<Subscription> {
032            /*
033             * NOTE FOR DEVELOPERS:
034             *
035             * Never modify or reference this interface directly. Always use {@link SubscriptionUtil} to access the subscription persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
036             */
037    
038            /**
039            * Caches the subscription in the entity cache if it is enabled.
040            *
041            * @param subscription the subscription
042            */
043            public void cacheResult(com.liferay.portal.model.Subscription subscription);
044    
045            /**
046            * Caches the subscriptions in the entity cache if it is enabled.
047            *
048            * @param subscriptions the subscriptions
049            */
050            public void cacheResult(
051                    java.util.List<com.liferay.portal.model.Subscription> subscriptions);
052    
053            /**
054            * Creates a new subscription with the primary key. Does not add the subscription to the database.
055            *
056            * @param subscriptionId the primary key for the new subscription
057            * @return the new subscription
058            */
059            public com.liferay.portal.model.Subscription create(long subscriptionId);
060    
061            /**
062            * Removes the subscription with the primary key from the database. Also notifies the appropriate model listeners.
063            *
064            * @param subscriptionId the primary key of the subscription
065            * @return the subscription that was removed
066            * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found
067            * @throws SystemException if a system exception occurred
068            */
069            public com.liferay.portal.model.Subscription remove(long subscriptionId)
070                    throws com.liferay.portal.NoSuchSubscriptionException,
071                            com.liferay.portal.kernel.exception.SystemException;
072    
073            public com.liferay.portal.model.Subscription updateImpl(
074                    com.liferay.portal.model.Subscription subscription, boolean merge)
075                    throws com.liferay.portal.kernel.exception.SystemException;
076    
077            /**
078            * Returns the subscription with the primary key or throws a {@link com.liferay.portal.NoSuchSubscriptionException} if it could not be found.
079            *
080            * @param subscriptionId the primary key of the subscription
081            * @return the subscription
082            * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found
083            * @throws SystemException if a system exception occurred
084            */
085            public com.liferay.portal.model.Subscription findByPrimaryKey(
086                    long subscriptionId)
087                    throws com.liferay.portal.NoSuchSubscriptionException,
088                            com.liferay.portal.kernel.exception.SystemException;
089    
090            /**
091            * Returns the subscription with the primary key or returns <code>null</code> if it could not be found.
092            *
093            * @param subscriptionId the primary key of the subscription
094            * @return the subscription, or <code>null</code> if a subscription with the primary key could not be found
095            * @throws SystemException if a system exception occurred
096            */
097            public com.liferay.portal.model.Subscription fetchByPrimaryKey(
098                    long subscriptionId)
099                    throws com.liferay.portal.kernel.exception.SystemException;
100    
101            /**
102            * Returns all the subscriptions where userId = &#63;.
103            *
104            * @param userId the user ID
105            * @return the matching subscriptions
106            * @throws SystemException if a system exception occurred
107            */
108            public java.util.List<com.liferay.portal.model.Subscription> findByUserId(
109                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
110    
111            /**
112            * Returns a range of all the subscriptions where userId = &#63;.
113            *
114            * <p>
115            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
116            * </p>
117            *
118            * @param userId the user ID
119            * @param start the lower bound of the range of subscriptions
120            * @param end the upper bound of the range of subscriptions (not inclusive)
121            * @return the range of matching subscriptions
122            * @throws SystemException if a system exception occurred
123            */
124            public java.util.List<com.liferay.portal.model.Subscription> findByUserId(
125                    long userId, int start, int end)
126                    throws com.liferay.portal.kernel.exception.SystemException;
127    
128            /**
129            * Returns an ordered range of all the subscriptions where userId = &#63;.
130            *
131            * <p>
132            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
133            * </p>
134            *
135            * @param userId the user ID
136            * @param start the lower bound of the range of subscriptions
137            * @param end the upper bound of the range of subscriptions (not inclusive)
138            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
139            * @return the ordered range of matching subscriptions
140            * @throws SystemException if a system exception occurred
141            */
142            public java.util.List<com.liferay.portal.model.Subscription> findByUserId(
143                    long userId, int start, int end,
144                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
145                    throws com.liferay.portal.kernel.exception.SystemException;
146    
147            /**
148            * Returns the first subscription in the ordered set where userId = &#63;.
149            *
150            * @param userId the user ID
151            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
152            * @return the first matching subscription
153            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
154            * @throws SystemException if a system exception occurred
155            */
156            public com.liferay.portal.model.Subscription findByUserId_First(
157                    long userId,
158                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
159                    throws com.liferay.portal.NoSuchSubscriptionException,
160                            com.liferay.portal.kernel.exception.SystemException;
161    
162            /**
163            * Returns the first subscription in the ordered set where userId = &#63;.
164            *
165            * @param userId the user ID
166            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
167            * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found
168            * @throws SystemException if a system exception occurred
169            */
170            public com.liferay.portal.model.Subscription fetchByUserId_First(
171                    long userId,
172                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
173                    throws com.liferay.portal.kernel.exception.SystemException;
174    
175            /**
176            * Returns the last subscription in the ordered set where userId = &#63;.
177            *
178            * @param userId the user ID
179            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
180            * @return the last matching subscription
181            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
182            * @throws SystemException if a system exception occurred
183            */
184            public com.liferay.portal.model.Subscription findByUserId_Last(
185                    long userId,
186                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
187                    throws com.liferay.portal.NoSuchSubscriptionException,
188                            com.liferay.portal.kernel.exception.SystemException;
189    
190            /**
191            * Returns the last subscription in the ordered set where userId = &#63;.
192            *
193            * @param userId the user ID
194            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
195            * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found
196            * @throws SystemException if a system exception occurred
197            */
198            public com.liferay.portal.model.Subscription fetchByUserId_Last(
199                    long userId,
200                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
201                    throws com.liferay.portal.kernel.exception.SystemException;
202    
203            /**
204            * Returns the subscriptions before and after the current subscription in the ordered set where userId = &#63;.
205            *
206            * @param subscriptionId the primary key of the current subscription
207            * @param userId the user ID
208            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
209            * @return the previous, current, and next subscription
210            * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found
211            * @throws SystemException if a system exception occurred
212            */
213            public com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext(
214                    long subscriptionId, long userId,
215                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
216                    throws com.liferay.portal.NoSuchSubscriptionException,
217                            com.liferay.portal.kernel.exception.SystemException;
218    
219            /**
220            * Returns all the subscriptions where userId = &#63; and classNameId = &#63;.
221            *
222            * @param userId the user ID
223            * @param classNameId the class name ID
224            * @return the matching subscriptions
225            * @throws SystemException if a system exception occurred
226            */
227            public java.util.List<com.liferay.portal.model.Subscription> findByU_C(
228                    long userId, long classNameId)
229                    throws com.liferay.portal.kernel.exception.SystemException;
230    
231            /**
232            * Returns a range of all the subscriptions where userId = &#63; and classNameId = &#63;.
233            *
234            * <p>
235            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
236            * </p>
237            *
238            * @param userId the user ID
239            * @param classNameId the class name ID
240            * @param start the lower bound of the range of subscriptions
241            * @param end the upper bound of the range of subscriptions (not inclusive)
242            * @return the range of matching subscriptions
243            * @throws SystemException if a system exception occurred
244            */
245            public java.util.List<com.liferay.portal.model.Subscription> findByU_C(
246                    long userId, long classNameId, int start, int end)
247                    throws com.liferay.portal.kernel.exception.SystemException;
248    
249            /**
250            * Returns an ordered range of all the subscriptions where userId = &#63; and classNameId = &#63;.
251            *
252            * <p>
253            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
254            * </p>
255            *
256            * @param userId the user ID
257            * @param classNameId the class name ID
258            * @param start the lower bound of the range of subscriptions
259            * @param end the upper bound of the range of subscriptions (not inclusive)
260            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
261            * @return the ordered range of matching subscriptions
262            * @throws SystemException if a system exception occurred
263            */
264            public java.util.List<com.liferay.portal.model.Subscription> findByU_C(
265                    long userId, long classNameId, int start, int end,
266                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
267                    throws com.liferay.portal.kernel.exception.SystemException;
268    
269            /**
270            * Returns the first subscription in the ordered set where userId = &#63; and classNameId = &#63;.
271            *
272            * @param userId the user ID
273            * @param classNameId the class name ID
274            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
275            * @return the first matching subscription
276            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
277            * @throws SystemException if a system exception occurred
278            */
279            public com.liferay.portal.model.Subscription findByU_C_First(long userId,
280                    long classNameId,
281                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
282                    throws com.liferay.portal.NoSuchSubscriptionException,
283                            com.liferay.portal.kernel.exception.SystemException;
284    
285            /**
286            * Returns the first subscription in the ordered set where userId = &#63; and classNameId = &#63;.
287            *
288            * @param userId the user ID
289            * @param classNameId the class name ID
290            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
291            * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found
292            * @throws SystemException if a system exception occurred
293            */
294            public com.liferay.portal.model.Subscription fetchByU_C_First(long userId,
295                    long classNameId,
296                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
297                    throws com.liferay.portal.kernel.exception.SystemException;
298    
299            /**
300            * Returns the last subscription in the ordered set where userId = &#63; and classNameId = &#63;.
301            *
302            * @param userId the user ID
303            * @param classNameId the class name ID
304            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
305            * @return the last matching subscription
306            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
307            * @throws SystemException if a system exception occurred
308            */
309            public com.liferay.portal.model.Subscription findByU_C_Last(long userId,
310                    long classNameId,
311                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
312                    throws com.liferay.portal.NoSuchSubscriptionException,
313                            com.liferay.portal.kernel.exception.SystemException;
314    
315            /**
316            * Returns the last subscription in the ordered set where userId = &#63; and classNameId = &#63;.
317            *
318            * @param userId the user ID
319            * @param classNameId the class name ID
320            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
321            * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found
322            * @throws SystemException if a system exception occurred
323            */
324            public com.liferay.portal.model.Subscription fetchByU_C_Last(long userId,
325                    long classNameId,
326                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
327                    throws com.liferay.portal.kernel.exception.SystemException;
328    
329            /**
330            * Returns the subscriptions before and after the current subscription in the ordered set where userId = &#63; and classNameId = &#63;.
331            *
332            * @param subscriptionId the primary key of the current subscription
333            * @param userId the user ID
334            * @param classNameId the class name ID
335            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
336            * @return the previous, current, and next subscription
337            * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found
338            * @throws SystemException if a system exception occurred
339            */
340            public com.liferay.portal.model.Subscription[] findByU_C_PrevAndNext(
341                    long subscriptionId, long userId, long classNameId,
342                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
343                    throws com.liferay.portal.NoSuchSubscriptionException,
344                            com.liferay.portal.kernel.exception.SystemException;
345    
346            /**
347            * Returns all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
348            *
349            * @param companyId the company ID
350            * @param classNameId the class name ID
351            * @param classPK the class p k
352            * @return the matching subscriptions
353            * @throws SystemException if a system exception occurred
354            */
355            public java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
356                    long companyId, long classNameId, long classPK)
357                    throws com.liferay.portal.kernel.exception.SystemException;
358    
359            /**
360            * Returns a range of all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
361            *
362            * <p>
363            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
364            * </p>
365            *
366            * @param companyId the company ID
367            * @param classNameId the class name ID
368            * @param classPK the class p k
369            * @param start the lower bound of the range of subscriptions
370            * @param end the upper bound of the range of subscriptions (not inclusive)
371            * @return the range of matching subscriptions
372            * @throws SystemException if a system exception occurred
373            */
374            public java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
375                    long companyId, long classNameId, long classPK, int start, int end)
376                    throws com.liferay.portal.kernel.exception.SystemException;
377    
378            /**
379            * Returns an ordered range of all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
380            *
381            * <p>
382            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
383            * </p>
384            *
385            * @param companyId the company ID
386            * @param classNameId the class name ID
387            * @param classPK the class p k
388            * @param start the lower bound of the range of subscriptions
389            * @param end the upper bound of the range of subscriptions (not inclusive)
390            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
391            * @return the ordered range of matching subscriptions
392            * @throws SystemException if a system exception occurred
393            */
394            public java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
395                    long companyId, long classNameId, long classPK, int start, int end,
396                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
397                    throws com.liferay.portal.kernel.exception.SystemException;
398    
399            /**
400            * Returns the first subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
401            *
402            * @param companyId the company ID
403            * @param classNameId the class name ID
404            * @param classPK the class p k
405            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
406            * @return the first matching subscription
407            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
408            * @throws SystemException if a system exception occurred
409            */
410            public com.liferay.portal.model.Subscription findByC_C_C_First(
411                    long companyId, long classNameId, long classPK,
412                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
413                    throws com.liferay.portal.NoSuchSubscriptionException,
414                            com.liferay.portal.kernel.exception.SystemException;
415    
416            /**
417            * Returns the first subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
418            *
419            * @param companyId the company ID
420            * @param classNameId the class name ID
421            * @param classPK the class p k
422            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
423            * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found
424            * @throws SystemException if a system exception occurred
425            */
426            public com.liferay.portal.model.Subscription fetchByC_C_C_First(
427                    long companyId, long classNameId, long classPK,
428                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
429                    throws com.liferay.portal.kernel.exception.SystemException;
430    
431            /**
432            * Returns the last subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
433            *
434            * @param companyId the company ID
435            * @param classNameId the class name ID
436            * @param classPK the class p k
437            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
438            * @return the last matching subscription
439            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
440            * @throws SystemException if a system exception occurred
441            */
442            public com.liferay.portal.model.Subscription findByC_C_C_Last(
443                    long companyId, long classNameId, long classPK,
444                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
445                    throws com.liferay.portal.NoSuchSubscriptionException,
446                            com.liferay.portal.kernel.exception.SystemException;
447    
448            /**
449            * Returns the last subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
450            *
451            * @param companyId the company ID
452            * @param classNameId the class name ID
453            * @param classPK the class p k
454            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
455            * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found
456            * @throws SystemException if a system exception occurred
457            */
458            public com.liferay.portal.model.Subscription fetchByC_C_C_Last(
459                    long companyId, long classNameId, long classPK,
460                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
461                    throws com.liferay.portal.kernel.exception.SystemException;
462    
463            /**
464            * Returns the subscriptions before and after the current subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
465            *
466            * @param subscriptionId the primary key of the current subscription
467            * @param companyId the company ID
468            * @param classNameId the class name ID
469            * @param classPK the class p k
470            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
471            * @return the previous, current, and next subscription
472            * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found
473            * @throws SystemException if a system exception occurred
474            */
475            public com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext(
476                    long subscriptionId, long companyId, long classNameId, long classPK,
477                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
478                    throws com.liferay.portal.NoSuchSubscriptionException,
479                            com.liferay.portal.kernel.exception.SystemException;
480    
481            /**
482            * Returns the subscription where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63; or throws a {@link com.liferay.portal.NoSuchSubscriptionException} if it could not be found.
483            *
484            * @param companyId the company ID
485            * @param userId the user ID
486            * @param classNameId the class name ID
487            * @param classPK the class p k
488            * @return the matching subscription
489            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
490            * @throws SystemException if a system exception occurred
491            */
492            public com.liferay.portal.model.Subscription findByC_U_C_C(long companyId,
493                    long userId, long classNameId, long classPK)
494                    throws com.liferay.portal.NoSuchSubscriptionException,
495                            com.liferay.portal.kernel.exception.SystemException;
496    
497            /**
498            * Returns the subscription where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
499            *
500            * @param companyId the company ID
501            * @param userId the user ID
502            * @param classNameId the class name ID
503            * @param classPK the class p k
504            * @return the matching subscription, or <code>null</code> if a matching subscription could not be found
505            * @throws SystemException if a system exception occurred
506            */
507            public com.liferay.portal.model.Subscription fetchByC_U_C_C(
508                    long companyId, long userId, long classNameId, long classPK)
509                    throws com.liferay.portal.kernel.exception.SystemException;
510    
511            /**
512            * Returns the subscription where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
513            *
514            * @param companyId the company ID
515            * @param userId the user ID
516            * @param classNameId the class name ID
517            * @param classPK the class p k
518            * @param retrieveFromCache whether to use the finder cache
519            * @return the matching subscription, or <code>null</code> if a matching subscription could not be found
520            * @throws SystemException if a system exception occurred
521            */
522            public com.liferay.portal.model.Subscription fetchByC_U_C_C(
523                    long companyId, long userId, long classNameId, long classPK,
524                    boolean retrieveFromCache)
525                    throws com.liferay.portal.kernel.exception.SystemException;
526    
527            /**
528            * Returns all the subscriptions.
529            *
530            * @return the subscriptions
531            * @throws SystemException if a system exception occurred
532            */
533            public java.util.List<com.liferay.portal.model.Subscription> findAll()
534                    throws com.liferay.portal.kernel.exception.SystemException;
535    
536            /**
537            * Returns a range of all the subscriptions.
538            *
539            * <p>
540            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
541            * </p>
542            *
543            * @param start the lower bound of the range of subscriptions
544            * @param end the upper bound of the range of subscriptions (not inclusive)
545            * @return the range of subscriptions
546            * @throws SystemException if a system exception occurred
547            */
548            public java.util.List<com.liferay.portal.model.Subscription> findAll(
549                    int start, int end)
550                    throws com.liferay.portal.kernel.exception.SystemException;
551    
552            /**
553            * Returns an ordered range of all the subscriptions.
554            *
555            * <p>
556            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
557            * </p>
558            *
559            * @param start the lower bound of the range of subscriptions
560            * @param end the upper bound of the range of subscriptions (not inclusive)
561            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
562            * @return the ordered range of subscriptions
563            * @throws SystemException if a system exception occurred
564            */
565            public java.util.List<com.liferay.portal.model.Subscription> findAll(
566                    int start, int end,
567                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
568                    throws com.liferay.portal.kernel.exception.SystemException;
569    
570            /**
571            * Removes all the subscriptions where userId = &#63; from the database.
572            *
573            * @param userId the user ID
574            * @throws SystemException if a system exception occurred
575            */
576            public void removeByUserId(long userId)
577                    throws com.liferay.portal.kernel.exception.SystemException;
578    
579            /**
580            * Removes all the subscriptions where userId = &#63; and classNameId = &#63; from the database.
581            *
582            * @param userId the user ID
583            * @param classNameId the class name ID
584            * @throws SystemException if a system exception occurred
585            */
586            public void removeByU_C(long userId, long classNameId)
587                    throws com.liferay.portal.kernel.exception.SystemException;
588    
589            /**
590            * Removes all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
591            *
592            * @param companyId the company ID
593            * @param classNameId the class name ID
594            * @param classPK the class p k
595            * @throws SystemException if a system exception occurred
596            */
597            public void removeByC_C_C(long companyId, long classNameId, long classPK)
598                    throws com.liferay.portal.kernel.exception.SystemException;
599    
600            /**
601            * Removes the subscription where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
602            *
603            * @param companyId the company ID
604            * @param userId the user ID
605            * @param classNameId the class name ID
606            * @param classPK the class p k
607            * @return the subscription that was removed
608            * @throws SystemException if a system exception occurred
609            */
610            public com.liferay.portal.model.Subscription removeByC_U_C_C(
611                    long companyId, long userId, long classNameId, long classPK)
612                    throws com.liferay.portal.NoSuchSubscriptionException,
613                            com.liferay.portal.kernel.exception.SystemException;
614    
615            /**
616            * Removes all the subscriptions from the database.
617            *
618            * @throws SystemException if a system exception occurred
619            */
620            public void removeAll()
621                    throws com.liferay.portal.kernel.exception.SystemException;
622    
623            /**
624            * Returns the number of subscriptions where userId = &#63;.
625            *
626            * @param userId the user ID
627            * @return the number of matching subscriptions
628            * @throws SystemException if a system exception occurred
629            */
630            public int countByUserId(long userId)
631                    throws com.liferay.portal.kernel.exception.SystemException;
632    
633            /**
634            * Returns the number of subscriptions where userId = &#63; and classNameId = &#63;.
635            *
636            * @param userId the user ID
637            * @param classNameId the class name ID
638            * @return the number of matching subscriptions
639            * @throws SystemException if a system exception occurred
640            */
641            public int countByU_C(long userId, long classNameId)
642                    throws com.liferay.portal.kernel.exception.SystemException;
643    
644            /**
645            * Returns the number of subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
646            *
647            * @param companyId the company ID
648            * @param classNameId the class name ID
649            * @param classPK the class p k
650            * @return the number of matching subscriptions
651            * @throws SystemException if a system exception occurred
652            */
653            public int countByC_C_C(long companyId, long classNameId, long classPK)
654                    throws com.liferay.portal.kernel.exception.SystemException;
655    
656            /**
657            * Returns the number of subscriptions where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63;.
658            *
659            * @param companyId the company ID
660            * @param userId the user ID
661            * @param classNameId the class name ID
662            * @param classPK the class p k
663            * @return the number of matching subscriptions
664            * @throws SystemException if a system exception occurred
665            */
666            public int countByC_U_C_C(long companyId, long userId, long classNameId,
667                    long classPK)
668                    throws com.liferay.portal.kernel.exception.SystemException;
669    
670            /**
671            * Returns the number of subscriptions.
672            *
673            * @return the number of subscriptions
674            * @throws SystemException if a system exception occurred
675            */
676            public int countAll()
677                    throws com.liferay.portal.kernel.exception.SystemException;
678    }