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