001    /**
002     * Copyright (c) 2000-2010 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     * Never modify this interface directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this interface.
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            * Caches the subscription in the entity cache if it is enabled.
034            *
035            * @param subscription the subscription to cache
036            */
037            public void cacheResult(com.liferay.portal.model.Subscription subscription);
038    
039            /**
040            * Caches the subscriptions in the entity cache if it is enabled.
041            *
042            * @param subscriptions the subscriptions to cache
043            */
044            public void cacheResult(
045                    java.util.List<com.liferay.portal.model.Subscription> subscriptions);
046    
047            /**
048            * Creates a new subscription with the primary key.
049            *
050            * @param subscriptionId the primary key for the new subscription
051            * @return the new subscription
052            */
053            public com.liferay.portal.model.Subscription create(long subscriptionId);
054    
055            /**
056            * Removes the subscription with the primary key from the database. Also notifies the appropriate model listeners.
057            *
058            * @param subscriptionId the primary key of the subscription to remove
059            * @return the subscription that was removed
060            * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found
061            * @throws SystemException if a system exception occurred
062            */
063            public com.liferay.portal.model.Subscription remove(long subscriptionId)
064                    throws com.liferay.portal.NoSuchSubscriptionException,
065                            com.liferay.portal.kernel.exception.SystemException;
066    
067            public com.liferay.portal.model.Subscription updateImpl(
068                    com.liferay.portal.model.Subscription subscription, boolean merge)
069                    throws com.liferay.portal.kernel.exception.SystemException;
070    
071            /**
072            * Finds the subscription with the primary key or throws a {@link com.liferay.portal.NoSuchSubscriptionException} if it could not be found.
073            *
074            * @param subscriptionId the primary key of the subscription to find
075            * @return the subscription
076            * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found
077            * @throws SystemException if a system exception occurred
078            */
079            public com.liferay.portal.model.Subscription findByPrimaryKey(
080                    long subscriptionId)
081                    throws com.liferay.portal.NoSuchSubscriptionException,
082                            com.liferay.portal.kernel.exception.SystemException;
083    
084            /**
085            * Finds the subscription with the primary key or returns <code>null</code> if it could not be found.
086            *
087            * @param subscriptionId the primary key of the subscription to find
088            * @return the subscription, or <code>null</code> if a subscription with the primary key could not be found
089            * @throws SystemException if a system exception occurred
090            */
091            public com.liferay.portal.model.Subscription fetchByPrimaryKey(
092                    long subscriptionId)
093                    throws com.liferay.portal.kernel.exception.SystemException;
094    
095            /**
096            * Finds all the subscriptions where userId = &#63;.
097            *
098            * @param userId the user id to search with
099            * @return the matching subscriptions
100            * @throws SystemException if a system exception occurred
101            */
102            public java.util.List<com.liferay.portal.model.Subscription> findByUserId(
103                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
104    
105            /**
106            * Finds a range of all the subscriptions where userId = &#63;.
107            *
108            * <p>
109            * 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.
110            * </p>
111            *
112            * @param userId the user id to search with
113            * @param start the lower bound of the range of subscriptions to return
114            * @param end the upper bound of the range of subscriptions to return (not inclusive)
115            * @return the range of matching subscriptions
116            * @throws SystemException if a system exception occurred
117            */
118            public java.util.List<com.liferay.portal.model.Subscription> findByUserId(
119                    long userId, int start, int end)
120                    throws com.liferay.portal.kernel.exception.SystemException;
121    
122            /**
123            * Finds an ordered range of all the subscriptions where userId = &#63;.
124            *
125            * <p>
126            * 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.
127            * </p>
128            *
129            * @param userId the user id to search with
130            * @param start the lower bound of the range of subscriptions to return
131            * @param end the upper bound of the range of subscriptions to return (not inclusive)
132            * @param orderByComparator the comparator to order the results by
133            * @return the ordered range of matching subscriptions
134            * @throws SystemException if a system exception occurred
135            */
136            public java.util.List<com.liferay.portal.model.Subscription> findByUserId(
137                    long userId, int start, int end,
138                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139                    throws com.liferay.portal.kernel.exception.SystemException;
140    
141            /**
142            * Finds the first subscription in the ordered set where userId = &#63;.
143            *
144            * <p>
145            * 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.
146            * </p>
147            *
148            * @param userId the user id to search with
149            * @param orderByComparator the comparator to order the set by
150            * @return the first matching subscription
151            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
152            * @throws SystemException if a system exception occurred
153            */
154            public com.liferay.portal.model.Subscription findByUserId_First(
155                    long userId,
156                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
157                    throws com.liferay.portal.NoSuchSubscriptionException,
158                            com.liferay.portal.kernel.exception.SystemException;
159    
160            /**
161            * Finds the last subscription in the ordered set where userId = &#63;.
162            *
163            * <p>
164            * 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.
165            * </p>
166            *
167            * @param userId the user id to search with
168            * @param orderByComparator the comparator to order the set by
169            * @return the last matching subscription
170            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public com.liferay.portal.model.Subscription findByUserId_Last(
174                    long userId,
175                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
176                    throws com.liferay.portal.NoSuchSubscriptionException,
177                            com.liferay.portal.kernel.exception.SystemException;
178    
179            /**
180            * Finds the subscriptions before and after the current subscription in the ordered set where userId = &#63;.
181            *
182            * <p>
183            * 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.
184            * </p>
185            *
186            * @param subscriptionId the primary key of the current subscription
187            * @param userId the user id to search with
188            * @param orderByComparator the comparator to order the set by
189            * @return the previous, current, and next subscription
190            * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found
191            * @throws SystemException if a system exception occurred
192            */
193            public com.liferay.portal.model.Subscription[] findByUserId_PrevAndNext(
194                    long subscriptionId, long userId,
195                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
196                    throws com.liferay.portal.NoSuchSubscriptionException,
197                            com.liferay.portal.kernel.exception.SystemException;
198    
199            /**
200            * Finds all the subscriptions where userId = &#63; and classNameId = &#63;.
201            *
202            * @param userId the user id to search with
203            * @param classNameId the class name id to search with
204            * @return the matching subscriptions
205            * @throws SystemException if a system exception occurred
206            */
207            public java.util.List<com.liferay.portal.model.Subscription> findByU_C(
208                    long userId, long classNameId)
209                    throws com.liferay.portal.kernel.exception.SystemException;
210    
211            /**
212            * Finds a range of all the subscriptions where userId = &#63; and classNameId = &#63;.
213            *
214            * <p>
215            * 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.
216            * </p>
217            *
218            * @param userId the user id to search with
219            * @param classNameId the class name id to search with
220            * @param start the lower bound of the range of subscriptions to return
221            * @param end the upper bound of the range of subscriptions to return (not inclusive)
222            * @return the range of matching subscriptions
223            * @throws SystemException if a system exception occurred
224            */
225            public java.util.List<com.liferay.portal.model.Subscription> findByU_C(
226                    long userId, long classNameId, int start, int end)
227                    throws com.liferay.portal.kernel.exception.SystemException;
228    
229            /**
230            * Finds an ordered range of all the subscriptions where userId = &#63; and classNameId = &#63;.
231            *
232            * <p>
233            * 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.
234            * </p>
235            *
236            * @param userId the user id to search with
237            * @param classNameId the class name id to search with
238            * @param start the lower bound of the range of subscriptions to return
239            * @param end the upper bound of the range of subscriptions to return (not inclusive)
240            * @param orderByComparator the comparator to order the results by
241            * @return the ordered range of matching subscriptions
242            * @throws SystemException if a system exception occurred
243            */
244            public java.util.List<com.liferay.portal.model.Subscription> findByU_C(
245                    long userId, long classNameId, int start, int end,
246                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
247                    throws com.liferay.portal.kernel.exception.SystemException;
248    
249            /**
250            * Finds the first subscription in the ordered set 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 to search with
257            * @param classNameId the class name id to search with
258            * @param orderByComparator the comparator to order the set by
259            * @return the first matching subscription
260            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
261            * @throws SystemException if a system exception occurred
262            */
263            public com.liferay.portal.model.Subscription findByU_C_First(long userId,
264                    long classNameId,
265                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
266                    throws com.liferay.portal.NoSuchSubscriptionException,
267                            com.liferay.portal.kernel.exception.SystemException;
268    
269            /**
270            * Finds the last subscription in the ordered set where userId = &#63; and classNameId = &#63;.
271            *
272            * <p>
273            * 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.
274            * </p>
275            *
276            * @param userId the user id to search with
277            * @param classNameId the class name id to search with
278            * @param orderByComparator the comparator to order the set by
279            * @return the last matching subscription
280            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
281            * @throws SystemException if a system exception occurred
282            */
283            public com.liferay.portal.model.Subscription findByU_C_Last(long userId,
284                    long classNameId,
285                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
286                    throws com.liferay.portal.NoSuchSubscriptionException,
287                            com.liferay.portal.kernel.exception.SystemException;
288    
289            /**
290            * Finds the subscriptions before and after the current subscription in the ordered set where userId = &#63; and classNameId = &#63;.
291            *
292            * <p>
293            * 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.
294            * </p>
295            *
296            * @param subscriptionId the primary key of the current subscription
297            * @param userId the user id to search with
298            * @param classNameId the class name id to search with
299            * @param orderByComparator the comparator to order the set by
300            * @return the previous, current, and next subscription
301            * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found
302            * @throws SystemException if a system exception occurred
303            */
304            public com.liferay.portal.model.Subscription[] findByU_C_PrevAndNext(
305                    long subscriptionId, long userId, long classNameId,
306                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
307                    throws com.liferay.portal.NoSuchSubscriptionException,
308                            com.liferay.portal.kernel.exception.SystemException;
309    
310            /**
311            * Finds all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
312            *
313            * @param companyId the company id to search with
314            * @param classNameId the class name id to search with
315            * @param classPK the class p k to search with
316            * @return the matching subscriptions
317            * @throws SystemException if a system exception occurred
318            */
319            public java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
320                    long companyId, long classNameId, long classPK)
321                    throws com.liferay.portal.kernel.exception.SystemException;
322    
323            /**
324            * Finds a range of all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
325            *
326            * <p>
327            * 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.
328            * </p>
329            *
330            * @param companyId the company id to search with
331            * @param classNameId the class name id to search with
332            * @param classPK the class p k to search with
333            * @param start the lower bound of the range of subscriptions to return
334            * @param end the upper bound of the range of subscriptions to return (not inclusive)
335            * @return the range of matching subscriptions
336            * @throws SystemException if a system exception occurred
337            */
338            public java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
339                    long companyId, long classNameId, long classPK, int start, int end)
340                    throws com.liferay.portal.kernel.exception.SystemException;
341    
342            /**
343            * Finds an ordered range of all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
344            *
345            * <p>
346            * 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.
347            * </p>
348            *
349            * @param companyId the company id to search with
350            * @param classNameId the class name id to search with
351            * @param classPK the class p k to search with
352            * @param start the lower bound of the range of subscriptions to return
353            * @param end the upper bound of the range of subscriptions to return (not inclusive)
354            * @param orderByComparator the comparator to order the results by
355            * @return the ordered range of matching subscriptions
356            * @throws SystemException if a system exception occurred
357            */
358            public java.util.List<com.liferay.portal.model.Subscription> findByC_C_C(
359                    long companyId, long classNameId, long classPK, int start, int end,
360                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
361                    throws com.liferay.portal.kernel.exception.SystemException;
362    
363            /**
364            * Finds the first subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
365            *
366            * <p>
367            * 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.
368            * </p>
369            *
370            * @param companyId the company id to search with
371            * @param classNameId the class name id to search with
372            * @param classPK the class p k to search with
373            * @param orderByComparator the comparator to order the set by
374            * @return the first matching subscription
375            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
376            * @throws SystemException if a system exception occurred
377            */
378            public com.liferay.portal.model.Subscription findByC_C_C_First(
379                    long companyId, long classNameId, long classPK,
380                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
381                    throws com.liferay.portal.NoSuchSubscriptionException,
382                            com.liferay.portal.kernel.exception.SystemException;
383    
384            /**
385            * Finds the last subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
386            *
387            * <p>
388            * 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.
389            * </p>
390            *
391            * @param companyId the company id to search with
392            * @param classNameId the class name id to search with
393            * @param classPK the class p k to search with
394            * @param orderByComparator the comparator to order the set by
395            * @return the last matching subscription
396            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
397            * @throws SystemException if a system exception occurred
398            */
399            public com.liferay.portal.model.Subscription findByC_C_C_Last(
400                    long companyId, long classNameId, long classPK,
401                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
402                    throws com.liferay.portal.NoSuchSubscriptionException,
403                            com.liferay.portal.kernel.exception.SystemException;
404    
405            /**
406            * Finds the subscriptions before and after the current subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
407            *
408            * <p>
409            * 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.
410            * </p>
411            *
412            * @param subscriptionId the primary key of the current subscription
413            * @param companyId the company id to search with
414            * @param classNameId the class name id to search with
415            * @param classPK the class p k to search with
416            * @param orderByComparator the comparator to order the set by
417            * @return the previous, current, and next subscription
418            * @throws com.liferay.portal.NoSuchSubscriptionException if a subscription with the primary key could not be found
419            * @throws SystemException if a system exception occurred
420            */
421            public com.liferay.portal.model.Subscription[] findByC_C_C_PrevAndNext(
422                    long subscriptionId, long companyId, long classNameId, long classPK,
423                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
424                    throws com.liferay.portal.NoSuchSubscriptionException,
425                            com.liferay.portal.kernel.exception.SystemException;
426    
427            /**
428            * Finds 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.
429            *
430            * @param companyId the company id to search with
431            * @param userId the user id to search with
432            * @param classNameId the class name id to search with
433            * @param classPK the class p k to search with
434            * @return the matching subscription
435            * @throws com.liferay.portal.NoSuchSubscriptionException if a matching subscription could not be found
436            * @throws SystemException if a system exception occurred
437            */
438            public com.liferay.portal.model.Subscription findByC_U_C_C(long companyId,
439                    long userId, long classNameId, long classPK)
440                    throws com.liferay.portal.NoSuchSubscriptionException,
441                            com.liferay.portal.kernel.exception.SystemException;
442    
443            /**
444            * Finds 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.
445            *
446            * @param companyId the company id to search with
447            * @param userId the user id to search with
448            * @param classNameId the class name id to search with
449            * @param classPK the class p k to search with
450            * @return the matching subscription, or <code>null</code> if a matching subscription could not be found
451            * @throws SystemException if a system exception occurred
452            */
453            public com.liferay.portal.model.Subscription fetchByC_U_C_C(
454                    long companyId, long userId, long classNameId, long classPK)
455                    throws com.liferay.portal.kernel.exception.SystemException;
456    
457            /**
458            * Finds 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.
459            *
460            * @param companyId the company id to search with
461            * @param userId the user id to search with
462            * @param classNameId the class name id to search with
463            * @param classPK the class p k to search with
464            * @return the matching subscription, or <code>null</code> if a matching subscription could not be found
465            * @throws SystemException if a system exception occurred
466            */
467            public com.liferay.portal.model.Subscription fetchByC_U_C_C(
468                    long companyId, long userId, long classNameId, long classPK,
469                    boolean retrieveFromCache)
470                    throws com.liferay.portal.kernel.exception.SystemException;
471    
472            /**
473            * Finds all the subscriptions.
474            *
475            * @return the subscriptions
476            * @throws SystemException if a system exception occurred
477            */
478            public java.util.List<com.liferay.portal.model.Subscription> findAll()
479                    throws com.liferay.portal.kernel.exception.SystemException;
480    
481            /**
482            * Finds a range of all the subscriptions.
483            *
484            * <p>
485            * 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.
486            * </p>
487            *
488            * @param start the lower bound of the range of subscriptions to return
489            * @param end the upper bound of the range of subscriptions to return (not inclusive)
490            * @return the range of subscriptions
491            * @throws SystemException if a system exception occurred
492            */
493            public java.util.List<com.liferay.portal.model.Subscription> findAll(
494                    int start, int end)
495                    throws com.liferay.portal.kernel.exception.SystemException;
496    
497            /**
498            * Finds an ordered range of all the subscriptions.
499            *
500            * <p>
501            * 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.
502            * </p>
503            *
504            * @param start the lower bound of the range of subscriptions to return
505            * @param end the upper bound of the range of subscriptions to return (not inclusive)
506            * @param orderByComparator the comparator to order the results by
507            * @return the ordered range of subscriptions
508            * @throws SystemException if a system exception occurred
509            */
510            public java.util.List<com.liferay.portal.model.Subscription> findAll(
511                    int start, int end,
512                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
513                    throws com.liferay.portal.kernel.exception.SystemException;
514    
515            /**
516            * Removes all the subscriptions where userId = &#63; from the database.
517            *
518            * @param userId the user id to search with
519            * @throws SystemException if a system exception occurred
520            */
521            public void removeByUserId(long userId)
522                    throws com.liferay.portal.kernel.exception.SystemException;
523    
524            /**
525            * Removes all the subscriptions where userId = &#63; and classNameId = &#63; from the database.
526            *
527            * @param userId the user id to search with
528            * @param classNameId the class name id to search with
529            * @throws SystemException if a system exception occurred
530            */
531            public void removeByU_C(long userId, long classNameId)
532                    throws com.liferay.portal.kernel.exception.SystemException;
533    
534            /**
535            * Removes all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
536            *
537            * @param companyId the company id to search with
538            * @param classNameId the class name id to search with
539            * @param classPK the class p k to search with
540            * @throws SystemException if a system exception occurred
541            */
542            public void removeByC_C_C(long companyId, long classNameId, long classPK)
543                    throws com.liferay.portal.kernel.exception.SystemException;
544    
545            /**
546            * Removes the subscription where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
547            *
548            * @param companyId the company id to search with
549            * @param userId the user id to search with
550            * @param classNameId the class name id to search with
551            * @param classPK the class p k to search with
552            * @throws SystemException if a system exception occurred
553            */
554            public void removeByC_U_C_C(long companyId, long userId, long classNameId,
555                    long classPK)
556                    throws com.liferay.portal.NoSuchSubscriptionException,
557                            com.liferay.portal.kernel.exception.SystemException;
558    
559            /**
560            * Removes all the subscriptions from the database.
561            *
562            * @throws SystemException if a system exception occurred
563            */
564            public void removeAll()
565                    throws com.liferay.portal.kernel.exception.SystemException;
566    
567            /**
568            * Counts all the subscriptions where userId = &#63;.
569            *
570            * @param userId the user id to search with
571            * @return the number of matching subscriptions
572            * @throws SystemException if a system exception occurred
573            */
574            public int countByUserId(long userId)
575                    throws com.liferay.portal.kernel.exception.SystemException;
576    
577            /**
578            * Counts all the subscriptions where userId = &#63; and classNameId = &#63;.
579            *
580            * @param userId the user id to search with
581            * @param classNameId the class name id to search with
582            * @return the number of matching subscriptions
583            * @throws SystemException if a system exception occurred
584            */
585            public int countByU_C(long userId, long classNameId)
586                    throws com.liferay.portal.kernel.exception.SystemException;
587    
588            /**
589            * Counts all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
590            *
591            * @param companyId the company id to search with
592            * @param classNameId the class name id to search with
593            * @param classPK the class p k to search with
594            * @return the number of matching subscriptions
595            * @throws SystemException if a system exception occurred
596            */
597            public int countByC_C_C(long companyId, long classNameId, long classPK)
598                    throws com.liferay.portal.kernel.exception.SystemException;
599    
600            /**
601            * Counts all the subscriptions where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63;.
602            *
603            * @param companyId the company id to search with
604            * @param userId the user id to search with
605            * @param classNameId the class name id to search with
606            * @param classPK the class p k to search with
607            * @return the number of matching subscriptions
608            * @throws SystemException if a system exception occurred
609            */
610            public int countByC_U_C_C(long companyId, long userId, long classNameId,
611                    long classPK)
612                    throws com.liferay.portal.kernel.exception.SystemException;
613    
614            /**
615            * Counts all the subscriptions.
616            *
617            * @return the number of subscriptions
618            * @throws SystemException if a system exception occurred
619            */
620            public int countAll()
621                    throws com.liferay.portal.kernel.exception.SystemException;
622    }