001    /**
002     * Copyright (c) 2000-present 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.kernel.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.exception.NoSuchSubscriptionException;
020    import com.liferay.portal.kernel.model.Subscription;
021    
022    /**
023     * The persistence interface for the subscription service.
024     *
025     * <p>
026     * Caching information and settings can be found in <code>portal.properties</code>
027     * </p>
028     *
029     * @author Brian Wing Shun Chan
030     * @see com.liferay.portal.service.persistence.impl.SubscriptionPersistenceImpl
031     * @see SubscriptionUtil
032     * @generated
033     */
034    @ProviderType
035    public interface SubscriptionPersistence extends BasePersistence<Subscription> {
036            /*
037             * NOTE FOR DEVELOPERS:
038             *
039             * 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.
040             */
041    
042            /**
043            * Returns all the subscriptions where userId = &#63;.
044            *
045            * @param userId the user ID
046            * @return the matching subscriptions
047            */
048            public java.util.List<Subscription> findByUserId(long userId);
049    
050            /**
051            * Returns a range of all the subscriptions where userId = &#63;.
052            *
053            * <p>
054            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
055            * </p>
056            *
057            * @param userId the user ID
058            * @param start the lower bound of the range of subscriptions
059            * @param end the upper bound of the range of subscriptions (not inclusive)
060            * @return the range of matching subscriptions
061            */
062            public java.util.List<Subscription> findByUserId(long userId, int start,
063                    int end);
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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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            */
078            public java.util.List<Subscription> findByUserId(long userId, int start,
079                    int end,
080                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
081    
082            /**
083            * Returns an ordered range of all the subscriptions where userId = &#63;.
084            *
085            * <p>
086            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
087            * </p>
088            *
089            * @param userId the user ID
090            * @param start the lower bound of the range of subscriptions
091            * @param end the upper bound of the range of subscriptions (not inclusive)
092            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
093            * @param retrieveFromCache whether to retrieve from the finder cache
094            * @return the ordered range of matching subscriptions
095            */
096            public java.util.List<Subscription> findByUserId(long userId, int start,
097                    int end,
098                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator,
099                    boolean retrieveFromCache);
100    
101            /**
102            * Returns the first subscription in the ordered set where userId = &#63;.
103            *
104            * @param userId the user ID
105            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
106            * @return the first matching subscription
107            * @throws NoSuchSubscriptionException if a matching subscription could not be found
108            */
109            public Subscription findByUserId_First(long userId,
110                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator)
111                    throws NoSuchSubscriptionException;
112    
113            /**
114            * Returns the first subscription in the ordered set where userId = &#63;.
115            *
116            * @param userId the user ID
117            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
118            * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found
119            */
120            public Subscription fetchByUserId_First(long userId,
121                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
122    
123            /**
124            * Returns the last subscription in the ordered set where userId = &#63;.
125            *
126            * @param userId the user ID
127            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
128            * @return the last matching subscription
129            * @throws NoSuchSubscriptionException if a matching subscription could not be found
130            */
131            public Subscription findByUserId_Last(long userId,
132                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator)
133                    throws NoSuchSubscriptionException;
134    
135            /**
136            * Returns the last subscription in the ordered set where userId = &#63;.
137            *
138            * @param userId the user ID
139            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
140            * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found
141            */
142            public Subscription fetchByUserId_Last(long userId,
143                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
144    
145            /**
146            * Returns the subscriptions before and after the current subscription in the ordered set where userId = &#63;.
147            *
148            * @param subscriptionId the primary key of the current subscription
149            * @param userId the user ID
150            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
151            * @return the previous, current, and next subscription
152            * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found
153            */
154            public Subscription[] findByUserId_PrevAndNext(long subscriptionId,
155                    long userId,
156                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator)
157                    throws NoSuchSubscriptionException;
158    
159            /**
160            * Removes all the subscriptions where userId = &#63; from the database.
161            *
162            * @param userId the user ID
163            */
164            public void removeByUserId(long userId);
165    
166            /**
167            * Returns the number of subscriptions where userId = &#63;.
168            *
169            * @param userId the user ID
170            * @return the number of matching subscriptions
171            */
172            public int countByUserId(long userId);
173    
174            /**
175            * Returns all the subscriptions where groupId = &#63; and userId = &#63;.
176            *
177            * @param groupId the group ID
178            * @param userId the user ID
179            * @return the matching subscriptions
180            */
181            public java.util.List<Subscription> findByG_U(long groupId, long userId);
182    
183            /**
184            * Returns a range of all the subscriptions where groupId = &#63; and userId = &#63;.
185            *
186            * <p>
187            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
188            * </p>
189            *
190            * @param groupId the group ID
191            * @param userId the user ID
192            * @param start the lower bound of the range of subscriptions
193            * @param end the upper bound of the range of subscriptions (not inclusive)
194            * @return the range of matching subscriptions
195            */
196            public java.util.List<Subscription> findByG_U(long groupId, long userId,
197                    int start, int end);
198    
199            /**
200            * Returns an ordered range of all the subscriptions where groupId = &#63; and userId = &#63;.
201            *
202            * <p>
203            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
204            * </p>
205            *
206            * @param groupId the group ID
207            * @param userId the user ID
208            * @param start the lower bound of the range of subscriptions
209            * @param end the upper bound of the range of subscriptions (not inclusive)
210            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
211            * @return the ordered range of matching subscriptions
212            */
213            public java.util.List<Subscription> findByG_U(long groupId, long userId,
214                    int start, int end,
215                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
216    
217            /**
218            * Returns an ordered range of all the subscriptions where groupId = &#63; and userId = &#63;.
219            *
220            * <p>
221            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
222            * </p>
223            *
224            * @param groupId the group ID
225            * @param userId the user ID
226            * @param start the lower bound of the range of subscriptions
227            * @param end the upper bound of the range of subscriptions (not inclusive)
228            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
229            * @param retrieveFromCache whether to retrieve from the finder cache
230            * @return the ordered range of matching subscriptions
231            */
232            public java.util.List<Subscription> findByG_U(long groupId, long userId,
233                    int start, int end,
234                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator,
235                    boolean retrieveFromCache);
236    
237            /**
238            * Returns the first subscription in the ordered set where groupId = &#63; and userId = &#63;.
239            *
240            * @param groupId the group ID
241            * @param userId the user ID
242            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
243            * @return the first matching subscription
244            * @throws NoSuchSubscriptionException if a matching subscription could not be found
245            */
246            public Subscription findByG_U_First(long groupId, long userId,
247                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator)
248                    throws NoSuchSubscriptionException;
249    
250            /**
251            * Returns the first subscription in the ordered set where groupId = &#63; and userId = &#63;.
252            *
253            * @param groupId the group ID
254            * @param userId the user ID
255            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
256            * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found
257            */
258            public Subscription fetchByG_U_First(long groupId, long userId,
259                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
260    
261            /**
262            * Returns the last subscription in the ordered set where groupId = &#63; and userId = &#63;.
263            *
264            * @param groupId the group ID
265            * @param userId the user ID
266            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
267            * @return the last matching subscription
268            * @throws NoSuchSubscriptionException if a matching subscription could not be found
269            */
270            public Subscription findByG_U_Last(long groupId, long userId,
271                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator)
272                    throws NoSuchSubscriptionException;
273    
274            /**
275            * Returns the last subscription in the ordered set where groupId = &#63; and userId = &#63;.
276            *
277            * @param groupId the group ID
278            * @param userId the user 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            */
282            public Subscription fetchByG_U_Last(long groupId, long userId,
283                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
284    
285            /**
286            * Returns the subscriptions before and after the current subscription in the ordered set where groupId = &#63; and userId = &#63;.
287            *
288            * @param subscriptionId the primary key of the current subscription
289            * @param groupId the group ID
290            * @param userId the user 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 NoSuchSubscriptionException if a subscription with the primary key could not be found
294            */
295            public Subscription[] findByG_U_PrevAndNext(long subscriptionId,
296                    long groupId, long userId,
297                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator)
298                    throws NoSuchSubscriptionException;
299    
300            /**
301            * Removes all the subscriptions where groupId = &#63; and userId = &#63; from the database.
302            *
303            * @param groupId the group ID
304            * @param userId the user ID
305            */
306            public void removeByG_U(long groupId, long userId);
307    
308            /**
309            * Returns the number of subscriptions where groupId = &#63; and userId = &#63;.
310            *
311            * @param groupId the group ID
312            * @param userId the user ID
313            * @return the number of matching subscriptions
314            */
315            public int countByG_U(long groupId, long userId);
316    
317            /**
318            * Returns all the subscriptions where userId = &#63; and classNameId = &#63;.
319            *
320            * @param userId the user ID
321            * @param classNameId the class name ID
322            * @return the matching subscriptions
323            */
324            public java.util.List<Subscription> findByU_C(long userId, long classNameId);
325    
326            /**
327            * Returns a range of all the subscriptions where userId = &#63; and classNameId = &#63;.
328            *
329            * <p>
330            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
331            * </p>
332            *
333            * @param userId the user ID
334            * @param classNameId the class name ID
335            * @param start the lower bound of the range of subscriptions
336            * @param end the upper bound of the range of subscriptions (not inclusive)
337            * @return the range of matching subscriptions
338            */
339            public java.util.List<Subscription> findByU_C(long userId,
340                    long classNameId, int start, int end);
341    
342            /**
343            * Returns an ordered range of all the subscriptions where userId = &#63; and classNameId = &#63;.
344            *
345            * <p>
346            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
347            * </p>
348            *
349            * @param userId the user ID
350            * @param classNameId the class name ID
351            * @param start the lower bound of the range of subscriptions
352            * @param end the upper bound of the range of subscriptions (not inclusive)
353            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
354            * @return the ordered range of matching subscriptions
355            */
356            public java.util.List<Subscription> findByU_C(long userId,
357                    long classNameId, int start, int end,
358                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
359    
360            /**
361            * Returns an ordered range of all the subscriptions where userId = &#63; and classNameId = &#63;.
362            *
363            * <p>
364            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
365            * </p>
366            *
367            * @param userId the user ID
368            * @param classNameId the class name ID
369            * @param start the lower bound of the range of subscriptions
370            * @param end the upper bound of the range of subscriptions (not inclusive)
371            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
372            * @param retrieveFromCache whether to retrieve from the finder cache
373            * @return the ordered range of matching subscriptions
374            */
375            public java.util.List<Subscription> findByU_C(long userId,
376                    long classNameId, int start, int end,
377                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator,
378                    boolean retrieveFromCache);
379    
380            /**
381            * Returns the first subscription in the ordered set where userId = &#63; and classNameId = &#63;.
382            *
383            * @param userId the user ID
384            * @param classNameId the class name ID
385            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
386            * @return the first matching subscription
387            * @throws NoSuchSubscriptionException if a matching subscription could not be found
388            */
389            public Subscription findByU_C_First(long userId, long classNameId,
390                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator)
391                    throws NoSuchSubscriptionException;
392    
393            /**
394            * Returns the first subscription in the ordered set where userId = &#63; and classNameId = &#63;.
395            *
396            * @param userId the user ID
397            * @param classNameId the class name ID
398            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
399            * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found
400            */
401            public Subscription fetchByU_C_First(long userId, long classNameId,
402                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
403    
404            /**
405            * Returns the last subscription in the ordered set where userId = &#63; and classNameId = &#63;.
406            *
407            * @param userId the user ID
408            * @param classNameId the class name ID
409            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
410            * @return the last matching subscription
411            * @throws NoSuchSubscriptionException if a matching subscription could not be found
412            */
413            public Subscription findByU_C_Last(long userId, long classNameId,
414                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator)
415                    throws NoSuchSubscriptionException;
416    
417            /**
418            * Returns the last subscription in the ordered set where userId = &#63; and classNameId = &#63;.
419            *
420            * @param userId the user ID
421            * @param classNameId the class name ID
422            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
423            * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found
424            */
425            public Subscription fetchByU_C_Last(long userId, long classNameId,
426                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
427    
428            /**
429            * Returns the subscriptions before and after the current subscription in the ordered set where userId = &#63; and classNameId = &#63;.
430            *
431            * @param subscriptionId the primary key of the current subscription
432            * @param userId the user ID
433            * @param classNameId the class name ID
434            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
435            * @return the previous, current, and next subscription
436            * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found
437            */
438            public Subscription[] findByU_C_PrevAndNext(long subscriptionId,
439                    long userId, long classNameId,
440                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator)
441                    throws NoSuchSubscriptionException;
442    
443            /**
444            * Removes all the subscriptions where userId = &#63; and classNameId = &#63; from the database.
445            *
446            * @param userId the user ID
447            * @param classNameId the class name ID
448            */
449            public void removeByU_C(long userId, long classNameId);
450    
451            /**
452            * Returns the number of subscriptions where userId = &#63; and classNameId = &#63;.
453            *
454            * @param userId the user ID
455            * @param classNameId the class name ID
456            * @return the number of matching subscriptions
457            */
458            public int countByU_C(long userId, long classNameId);
459    
460            /**
461            * Returns all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
462            *
463            * @param companyId the company ID
464            * @param classNameId the class name ID
465            * @param classPK the class p k
466            * @return the matching subscriptions
467            */
468            public java.util.List<Subscription> findByC_C_C(long companyId,
469                    long classNameId, long classPK);
470    
471            /**
472            * Returns a range of all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
473            *
474            * <p>
475            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
476            * </p>
477            *
478            * @param companyId the company ID
479            * @param classNameId the class name ID
480            * @param classPK the class p k
481            * @param start the lower bound of the range of subscriptions
482            * @param end the upper bound of the range of subscriptions (not inclusive)
483            * @return the range of matching subscriptions
484            */
485            public java.util.List<Subscription> findByC_C_C(long companyId,
486                    long classNameId, long classPK, int start, int end);
487    
488            /**
489            * Returns an ordered range of all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
490            *
491            * <p>
492            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
493            * </p>
494            *
495            * @param companyId the company ID
496            * @param classNameId the class name ID
497            * @param classPK the class p k
498            * @param start the lower bound of the range of subscriptions
499            * @param end the upper bound of the range of subscriptions (not inclusive)
500            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
501            * @return the ordered range of matching subscriptions
502            */
503            public java.util.List<Subscription> findByC_C_C(long companyId,
504                    long classNameId, long classPK, int start, int end,
505                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
506    
507            /**
508            * Returns an ordered range of all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
509            *
510            * <p>
511            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
512            * </p>
513            *
514            * @param companyId the company ID
515            * @param classNameId the class name ID
516            * @param classPK the class p k
517            * @param start the lower bound of the range of subscriptions
518            * @param end the upper bound of the range of subscriptions (not inclusive)
519            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
520            * @param retrieveFromCache whether to retrieve from the finder cache
521            * @return the ordered range of matching subscriptions
522            */
523            public java.util.List<Subscription> findByC_C_C(long companyId,
524                    long classNameId, long classPK, int start, int end,
525                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator,
526                    boolean retrieveFromCache);
527    
528            /**
529            * Returns the first subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
530            *
531            * @param companyId the company ID
532            * @param classNameId the class name ID
533            * @param classPK the class p k
534            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
535            * @return the first matching subscription
536            * @throws NoSuchSubscriptionException if a matching subscription could not be found
537            */
538            public Subscription findByC_C_C_First(long companyId, long classNameId,
539                    long classPK,
540                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator)
541                    throws NoSuchSubscriptionException;
542    
543            /**
544            * Returns the first subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
545            *
546            * @param companyId the company ID
547            * @param classNameId the class name ID
548            * @param classPK the class p k
549            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
550            * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found
551            */
552            public Subscription fetchByC_C_C_First(long companyId, long classNameId,
553                    long classPK,
554                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
555    
556            /**
557            * Returns the last subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
558            *
559            * @param companyId the company ID
560            * @param classNameId the class name ID
561            * @param classPK the class p k
562            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
563            * @return the last matching subscription
564            * @throws NoSuchSubscriptionException if a matching subscription could not be found
565            */
566            public Subscription findByC_C_C_Last(long companyId, long classNameId,
567                    long classPK,
568                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator)
569                    throws NoSuchSubscriptionException;
570    
571            /**
572            * Returns the last subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
573            *
574            * @param companyId the company ID
575            * @param classNameId the class name ID
576            * @param classPK the class p k
577            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
578            * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found
579            */
580            public Subscription fetchByC_C_C_Last(long companyId, long classNameId,
581                    long classPK,
582                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
583    
584            /**
585            * Returns the subscriptions before and after the current subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
586            *
587            * @param subscriptionId the primary key of the current subscription
588            * @param companyId the company ID
589            * @param classNameId the class name ID
590            * @param classPK the class p k
591            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
592            * @return the previous, current, and next subscription
593            * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found
594            */
595            public Subscription[] findByC_C_C_PrevAndNext(long subscriptionId,
596                    long companyId, long classNameId, long classPK,
597                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator)
598                    throws NoSuchSubscriptionException;
599    
600            /**
601            * Removes all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
602            *
603            * @param companyId the company ID
604            * @param classNameId the class name ID
605            * @param classPK the class p k
606            */
607            public void removeByC_C_C(long companyId, long classNameId, long classPK);
608    
609            /**
610            * Returns the number of subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
611            *
612            * @param companyId the company ID
613            * @param classNameId the class name ID
614            * @param classPK the class p k
615            * @return the number of matching subscriptions
616            */
617            public int countByC_C_C(long companyId, long classNameId, long classPK);
618    
619            /**
620            * Returns all the subscriptions where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = any &#63;.
621            *
622            * <p>
623            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
624            * </p>
625            *
626            * @param companyId the company ID
627            * @param userId the user ID
628            * @param classNameId the class name ID
629            * @param classPKs the class p ks
630            * @return the matching subscriptions
631            */
632            public java.util.List<Subscription> findByC_U_C_C(long companyId,
633                    long userId, long classNameId, long[] classPKs);
634    
635            /**
636            * Returns a range of all the subscriptions where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = any &#63;.
637            *
638            * <p>
639            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
640            * </p>
641            *
642            * @param companyId the company ID
643            * @param userId the user ID
644            * @param classNameId the class name ID
645            * @param classPKs the class p ks
646            * @param start the lower bound of the range of subscriptions
647            * @param end the upper bound of the range of subscriptions (not inclusive)
648            * @return the range of matching subscriptions
649            */
650            public java.util.List<Subscription> findByC_U_C_C(long companyId,
651                    long userId, long classNameId, long[] classPKs, int start, int end);
652    
653            /**
654            * Returns an ordered range of all the subscriptions where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = any &#63;.
655            *
656            * <p>
657            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
658            * </p>
659            *
660            * @param companyId the company ID
661            * @param userId the user ID
662            * @param classNameId the class name ID
663            * @param classPKs the class p ks
664            * @param start the lower bound of the range of subscriptions
665            * @param end the upper bound of the range of subscriptions (not inclusive)
666            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
667            * @return the ordered range of matching subscriptions
668            */
669            public java.util.List<Subscription> findByC_U_C_C(long companyId,
670                    long userId, long classNameId, long[] classPKs, int start, int end,
671                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
672    
673            /**
674            * Returns an ordered range of all the subscriptions where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63;, optionally using the finder cache.
675            *
676            * <p>
677            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
678            * </p>
679            *
680            * @param companyId the company ID
681            * @param userId the user ID
682            * @param classNameId the class name ID
683            * @param classPK the class p k
684            * @param start the lower bound of the range of subscriptions
685            * @param end the upper bound of the range of subscriptions (not inclusive)
686            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
687            * @param retrieveFromCache whether to retrieve from the finder cache
688            * @return the ordered range of matching subscriptions
689            */
690            public java.util.List<Subscription> findByC_U_C_C(long companyId,
691                    long userId, long classNameId, long[] classPKs, int start, int end,
692                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator,
693                    boolean retrieveFromCache);
694    
695            /**
696            * Returns the subscription where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63; or throws a {@link NoSuchSubscriptionException} if it could not be found.
697            *
698            * @param companyId the company ID
699            * @param userId the user ID
700            * @param classNameId the class name ID
701            * @param classPK the class p k
702            * @return the matching subscription
703            * @throws NoSuchSubscriptionException if a matching subscription could not be found
704            */
705            public Subscription findByC_U_C_C(long companyId, long userId,
706                    long classNameId, long classPK) throws NoSuchSubscriptionException;
707    
708            /**
709            * 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.
710            *
711            * @param companyId the company ID
712            * @param userId the user ID
713            * @param classNameId the class name ID
714            * @param classPK the class p k
715            * @return the matching subscription, or <code>null</code> if a matching subscription could not be found
716            */
717            public Subscription fetchByC_U_C_C(long companyId, long userId,
718                    long classNameId, long classPK);
719    
720            /**
721            * 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.
722            *
723            * @param companyId the company ID
724            * @param userId the user ID
725            * @param classNameId the class name ID
726            * @param classPK the class p k
727            * @param retrieveFromCache whether to retrieve from the finder cache
728            * @return the matching subscription, or <code>null</code> if a matching subscription could not be found
729            */
730            public Subscription fetchByC_U_C_C(long companyId, long userId,
731                    long classNameId, long classPK, boolean retrieveFromCache);
732    
733            /**
734            * Removes the subscription where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
735            *
736            * @param companyId the company ID
737            * @param userId the user ID
738            * @param classNameId the class name ID
739            * @param classPK the class p k
740            * @return the subscription that was removed
741            */
742            public Subscription removeByC_U_C_C(long companyId, long userId,
743                    long classNameId, long classPK) throws NoSuchSubscriptionException;
744    
745            /**
746            * Returns the number of subscriptions where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63;.
747            *
748            * @param companyId the company ID
749            * @param userId the user ID
750            * @param classNameId the class name ID
751            * @param classPK the class p k
752            * @return the number of matching subscriptions
753            */
754            public int countByC_U_C_C(long companyId, long userId, long classNameId,
755                    long classPK);
756    
757            /**
758            * Returns the number of subscriptions where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = any &#63;.
759            *
760            * @param companyId the company ID
761            * @param userId the user ID
762            * @param classNameId the class name ID
763            * @param classPKs the class p ks
764            * @return the number of matching subscriptions
765            */
766            public int countByC_U_C_C(long companyId, long userId, long classNameId,
767                    long[] classPKs);
768    
769            /**
770            * Caches the subscription in the entity cache if it is enabled.
771            *
772            * @param subscription the subscription
773            */
774            public void cacheResult(Subscription subscription);
775    
776            /**
777            * Caches the subscriptions in the entity cache if it is enabled.
778            *
779            * @param subscriptions the subscriptions
780            */
781            public void cacheResult(java.util.List<Subscription> subscriptions);
782    
783            /**
784            * Creates a new subscription with the primary key. Does not add the subscription to the database.
785            *
786            * @param subscriptionId the primary key for the new subscription
787            * @return the new subscription
788            */
789            public Subscription create(long subscriptionId);
790    
791            /**
792            * Removes the subscription with the primary key from the database. Also notifies the appropriate model listeners.
793            *
794            * @param subscriptionId the primary key of the subscription
795            * @return the subscription that was removed
796            * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found
797            */
798            public Subscription remove(long subscriptionId)
799                    throws NoSuchSubscriptionException;
800    
801            public Subscription updateImpl(Subscription subscription);
802    
803            /**
804            * Returns the subscription with the primary key or throws a {@link NoSuchSubscriptionException} if it could not be found.
805            *
806            * @param subscriptionId the primary key of the subscription
807            * @return the subscription
808            * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found
809            */
810            public Subscription findByPrimaryKey(long subscriptionId)
811                    throws NoSuchSubscriptionException;
812    
813            /**
814            * Returns the subscription with the primary key or returns <code>null</code> if it could not be found.
815            *
816            * @param subscriptionId the primary key of the subscription
817            * @return the subscription, or <code>null</code> if a subscription with the primary key could not be found
818            */
819            public Subscription fetchByPrimaryKey(long subscriptionId);
820    
821            @Override
822            public java.util.Map<java.io.Serializable, Subscription> fetchByPrimaryKeys(
823                    java.util.Set<java.io.Serializable> primaryKeys);
824    
825            /**
826            * Returns all the subscriptions.
827            *
828            * @return the subscriptions
829            */
830            public java.util.List<Subscription> findAll();
831    
832            /**
833            * Returns a range of all the subscriptions.
834            *
835            * <p>
836            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
837            * </p>
838            *
839            * @param start the lower bound of the range of subscriptions
840            * @param end the upper bound of the range of subscriptions (not inclusive)
841            * @return the range of subscriptions
842            */
843            public java.util.List<Subscription> findAll(int start, int end);
844    
845            /**
846            * Returns an ordered range of all the subscriptions.
847            *
848            * <p>
849            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
850            * </p>
851            *
852            * @param start the lower bound of the range of subscriptions
853            * @param end the upper bound of the range of subscriptions (not inclusive)
854            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
855            * @return the ordered range of subscriptions
856            */
857            public java.util.List<Subscription> findAll(int start, int end,
858                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator);
859    
860            /**
861            * Returns an ordered range of all the subscriptions.
862            *
863            * <p>
864            * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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.
865            * </p>
866            *
867            * @param start the lower bound of the range of subscriptions
868            * @param end the upper bound of the range of subscriptions (not inclusive)
869            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
870            * @param retrieveFromCache whether to retrieve from the finder cache
871            * @return the ordered range of subscriptions
872            */
873            public java.util.List<Subscription> findAll(int start, int end,
874                    com.liferay.portal.kernel.util.OrderByComparator<Subscription> orderByComparator,
875                    boolean retrieveFromCache);
876    
877            /**
878            * Removes all the subscriptions from the database.
879            */
880            public void removeAll();
881    
882            /**
883            * Returns the number of subscriptions.
884            *
885            * @return the number of subscriptions
886            */
887            public int countAll();
888    }