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