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