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