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.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
021    import com.liferay.portal.kernel.util.OrderByComparator;
022    import com.liferay.portal.kernel.util.ReferenceRegistry;
023    import com.liferay.portal.model.Subscription;
024    import com.liferay.portal.service.ServiceContext;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the subscription service. This utility wraps {@link com.liferay.portal.service.persistence.impl.SubscriptionPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see SubscriptionPersistence
037     * @see com.liferay.portal.service.persistence.impl.SubscriptionPersistenceImpl
038     * @generated
039     */
040    @ProviderType
041    public class SubscriptionUtil {
042            /*
043             * NOTE FOR DEVELOPERS:
044             *
045             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
046             */
047    
048            /**
049             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
050             */
051            public static void clearCache() {
052                    getPersistence().clearCache();
053            }
054    
055            /**
056             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
057             */
058            public static void clearCache(Subscription subscription) {
059                    getPersistence().clearCache(subscription);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
064             */
065            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
066                    return getPersistence().countWithDynamicQuery(dynamicQuery);
067            }
068    
069            /**
070             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
071             */
072            public static List<Subscription> findWithDynamicQuery(
073                    DynamicQuery dynamicQuery) {
074                    return getPersistence().findWithDynamicQuery(dynamicQuery);
075            }
076    
077            /**
078             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
079             */
080            public static List<Subscription> findWithDynamicQuery(
081                    DynamicQuery dynamicQuery, int start, int end) {
082                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
083            }
084    
085            /**
086             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
087             */
088            public static List<Subscription> findWithDynamicQuery(
089                    DynamicQuery dynamicQuery, int start, int end,
090                    OrderByComparator<Subscription> orderByComparator) {
091                    return getPersistence()
092                                       .findWithDynamicQuery(dynamicQuery, start, end,
093                            orderByComparator);
094            }
095    
096            /**
097             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
098             */
099            public static Subscription update(Subscription subscription) {
100                    return getPersistence().update(subscription);
101            }
102    
103            /**
104             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
105             */
106            public static Subscription update(Subscription subscription,
107                    ServiceContext serviceContext) {
108                    return getPersistence().update(subscription, serviceContext);
109            }
110    
111            /**
112            * Returns all the subscriptions where userId = &#63;.
113            *
114            * @param userId the user ID
115            * @return the matching subscriptions
116            */
117            public static List<Subscription> findByUserId(long userId) {
118                    return getPersistence().findByUserId(userId);
119            }
120    
121            /**
122            * Returns a range of all the subscriptions where userId = &#63;.
123            *
124            * <p>
125            * 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.
126            * </p>
127            *
128            * @param userId the user ID
129            * @param start the lower bound of the range of subscriptions
130            * @param end the upper bound of the range of subscriptions (not inclusive)
131            * @return the range of matching subscriptions
132            */
133            public static List<Subscription> findByUserId(long userId, int start,
134                    int end) {
135                    return getPersistence().findByUserId(userId, start, end);
136            }
137    
138            /**
139            * Returns an ordered range of all the subscriptions where userId = &#63;.
140            *
141            * <p>
142            * 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.
143            * </p>
144            *
145            * @param userId the user ID
146            * @param start the lower bound of the range of subscriptions
147            * @param end the upper bound of the range of subscriptions (not inclusive)
148            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
149            * @return the ordered range of matching subscriptions
150            */
151            public static List<Subscription> findByUserId(long userId, int start,
152                    int end, OrderByComparator<Subscription> orderByComparator) {
153                    return getPersistence()
154                                       .findByUserId(userId, start, end, orderByComparator);
155            }
156    
157            /**
158            * Returns an ordered range of all the subscriptions where userId = &#63;.
159            *
160            * <p>
161            * 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.
162            * </p>
163            *
164            * @param userId the user ID
165            * @param start the lower bound of the range of subscriptions
166            * @param end the upper bound of the range of subscriptions (not inclusive)
167            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
168            * @param retrieveFromCache whether to retrieve from the finder cache
169            * @return the ordered range of matching subscriptions
170            */
171            public static List<Subscription> findByUserId(long userId, int start,
172                    int end, OrderByComparator<Subscription> orderByComparator,
173                    boolean retrieveFromCache) {
174                    return getPersistence()
175                                       .findByUserId(userId, start, end, orderByComparator,
176                            retrieveFromCache);
177            }
178    
179            /**
180            * Returns the first subscription in the ordered set where userId = &#63;.
181            *
182            * @param userId the user ID
183            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
184            * @return the first matching subscription
185            * @throws NoSuchSubscriptionException if a matching subscription could not be found
186            */
187            public static Subscription findByUserId_First(long userId,
188                    OrderByComparator<Subscription> orderByComparator)
189                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
190                    return getPersistence().findByUserId_First(userId, orderByComparator);
191            }
192    
193            /**
194            * Returns the first subscription in the ordered set where userId = &#63;.
195            *
196            * @param userId the user ID
197            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
198            * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found
199            */
200            public static Subscription fetchByUserId_First(long userId,
201                    OrderByComparator<Subscription> orderByComparator) {
202                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
203            }
204    
205            /**
206            * Returns the last subscription in the ordered set where userId = &#63;.
207            *
208            * @param userId the user ID
209            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
210            * @return the last matching subscription
211            * @throws NoSuchSubscriptionException if a matching subscription could not be found
212            */
213            public static Subscription findByUserId_Last(long userId,
214                    OrderByComparator<Subscription> orderByComparator)
215                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
216                    return getPersistence().findByUserId_Last(userId, orderByComparator);
217            }
218    
219            /**
220            * Returns the last subscription in the ordered set where userId = &#63;.
221            *
222            * @param userId the user ID
223            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
224            * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found
225            */
226            public static Subscription fetchByUserId_Last(long userId,
227                    OrderByComparator<Subscription> orderByComparator) {
228                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
229            }
230    
231            /**
232            * Returns the subscriptions before and after the current subscription in the ordered set where userId = &#63;.
233            *
234            * @param subscriptionId the primary key of the current subscription
235            * @param userId the user ID
236            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
237            * @return the previous, current, and next subscription
238            * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found
239            */
240            public static Subscription[] findByUserId_PrevAndNext(long subscriptionId,
241                    long userId, OrderByComparator<Subscription> orderByComparator)
242                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
243                    return getPersistence()
244                                       .findByUserId_PrevAndNext(subscriptionId, userId,
245                            orderByComparator);
246            }
247    
248            /**
249            * Removes all the subscriptions where userId = &#63; from the database.
250            *
251            * @param userId the user ID
252            */
253            public static void removeByUserId(long userId) {
254                    getPersistence().removeByUserId(userId);
255            }
256    
257            /**
258            * Returns the number of subscriptions where userId = &#63;.
259            *
260            * @param userId the user ID
261            * @return the number of matching subscriptions
262            */
263            public static int countByUserId(long userId) {
264                    return getPersistence().countByUserId(userId);
265            }
266    
267            /**
268            * Returns all the subscriptions where groupId = &#63; and userId = &#63;.
269            *
270            * @param groupId the group ID
271            * @param userId the user ID
272            * @return the matching subscriptions
273            */
274            public static List<Subscription> findByG_U(long groupId, long userId) {
275                    return getPersistence().findByG_U(groupId, userId);
276            }
277    
278            /**
279            * Returns a range of all the subscriptions where groupId = &#63; and userId = &#63;.
280            *
281            * <p>
282            * 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.
283            * </p>
284            *
285            * @param groupId the group ID
286            * @param userId the user ID
287            * @param start the lower bound of the range of subscriptions
288            * @param end the upper bound of the range of subscriptions (not inclusive)
289            * @return the range of matching subscriptions
290            */
291            public static List<Subscription> findByG_U(long groupId, long userId,
292                    int start, int end) {
293                    return getPersistence().findByG_U(groupId, userId, start, end);
294            }
295    
296            /**
297            * Returns an ordered range of all the subscriptions where groupId = &#63; and userId = &#63;.
298            *
299            * <p>
300            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link 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.
301            * </p>
302            *
303            * @param groupId the group ID
304            * @param userId the user ID
305            * @param start the lower bound of the range of subscriptions
306            * @param end the upper bound of the range of subscriptions (not inclusive)
307            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
308            * @return the ordered range of matching subscriptions
309            */
310            public static List<Subscription> findByG_U(long groupId, long userId,
311                    int start, int end, OrderByComparator<Subscription> orderByComparator) {
312                    return getPersistence()
313                                       .findByG_U(groupId, userId, start, end, orderByComparator);
314            }
315    
316            /**
317            * Returns an ordered range of all the subscriptions where groupId = &#63; and userId = &#63;.
318            *
319            * <p>
320            * 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.
321            * </p>
322            *
323            * @param groupId the group ID
324            * @param userId the user ID
325            * @param start the lower bound of the range of subscriptions
326            * @param end the upper bound of the range of subscriptions (not inclusive)
327            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
328            * @param retrieveFromCache whether to retrieve from the finder cache
329            * @return the ordered range of matching subscriptions
330            */
331            public static List<Subscription> findByG_U(long groupId, long userId,
332                    int start, int end, OrderByComparator<Subscription> orderByComparator,
333                    boolean retrieveFromCache) {
334                    return getPersistence()
335                                       .findByG_U(groupId, userId, start, end, orderByComparator,
336                            retrieveFromCache);
337            }
338    
339            /**
340            * Returns the first subscription in the ordered set where groupId = &#63; and userId = &#63;.
341            *
342            * @param groupId the group ID
343            * @param userId the user ID
344            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
345            * @return the first matching subscription
346            * @throws NoSuchSubscriptionException if a matching subscription could not be found
347            */
348            public static Subscription findByG_U_First(long groupId, long userId,
349                    OrderByComparator<Subscription> orderByComparator)
350                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
351                    return getPersistence()
352                                       .findByG_U_First(groupId, userId, orderByComparator);
353            }
354    
355            /**
356            * Returns the first subscription in the ordered set where groupId = &#63; and userId = &#63;.
357            *
358            * @param groupId the group ID
359            * @param userId the user ID
360            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
361            * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found
362            */
363            public static Subscription fetchByG_U_First(long groupId, long userId,
364                    OrderByComparator<Subscription> orderByComparator) {
365                    return getPersistence()
366                                       .fetchByG_U_First(groupId, userId, orderByComparator);
367            }
368    
369            /**
370            * Returns the last subscription in the ordered set where groupId = &#63; and userId = &#63;.
371            *
372            * @param groupId the group ID
373            * @param userId the user ID
374            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
375            * @return the last matching subscription
376            * @throws NoSuchSubscriptionException if a matching subscription could not be found
377            */
378            public static Subscription findByG_U_Last(long groupId, long userId,
379                    OrderByComparator<Subscription> orderByComparator)
380                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
381                    return getPersistence()
382                                       .findByG_U_Last(groupId, userId, orderByComparator);
383            }
384    
385            /**
386            * Returns the last subscription in the ordered set where groupId = &#63; and userId = &#63;.
387            *
388            * @param groupId the group ID
389            * @param userId the user ID
390            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
391            * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found
392            */
393            public static Subscription fetchByG_U_Last(long groupId, long userId,
394                    OrderByComparator<Subscription> orderByComparator) {
395                    return getPersistence()
396                                       .fetchByG_U_Last(groupId, userId, orderByComparator);
397            }
398    
399            /**
400            * Returns the subscriptions before and after the current subscription in the ordered set where groupId = &#63; and userId = &#63;.
401            *
402            * @param subscriptionId the primary key of the current subscription
403            * @param groupId the group ID
404            * @param userId the user ID
405            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
406            * @return the previous, current, and next subscription
407            * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found
408            */
409            public static Subscription[] findByG_U_PrevAndNext(long subscriptionId,
410                    long groupId, long userId,
411                    OrderByComparator<Subscription> orderByComparator)
412                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
413                    return getPersistence()
414                                       .findByG_U_PrevAndNext(subscriptionId, groupId, userId,
415                            orderByComparator);
416            }
417    
418            /**
419            * Removes all the subscriptions where groupId = &#63; and userId = &#63; from the database.
420            *
421            * @param groupId the group ID
422            * @param userId the user ID
423            */
424            public static void removeByG_U(long groupId, long userId) {
425                    getPersistence().removeByG_U(groupId, userId);
426            }
427    
428            /**
429            * Returns the number of subscriptions where groupId = &#63; and userId = &#63;.
430            *
431            * @param groupId the group ID
432            * @param userId the user ID
433            * @return the number of matching subscriptions
434            */
435            public static int countByG_U(long groupId, long userId) {
436                    return getPersistence().countByG_U(groupId, userId);
437            }
438    
439            /**
440            * Returns all the subscriptions where userId = &#63; and classNameId = &#63;.
441            *
442            * @param userId the user ID
443            * @param classNameId the class name ID
444            * @return the matching subscriptions
445            */
446            public static List<Subscription> findByU_C(long userId, long classNameId) {
447                    return getPersistence().findByU_C(userId, classNameId);
448            }
449    
450            /**
451            * Returns a range of all the subscriptions where userId = &#63; and classNameId = &#63;.
452            *
453            * <p>
454            * 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.
455            * </p>
456            *
457            * @param userId the user ID
458            * @param classNameId the class name ID
459            * @param start the lower bound of the range of subscriptions
460            * @param end the upper bound of the range of subscriptions (not inclusive)
461            * @return the range of matching subscriptions
462            */
463            public static List<Subscription> findByU_C(long userId, long classNameId,
464                    int start, int end) {
465                    return getPersistence().findByU_C(userId, classNameId, start, end);
466            }
467    
468            /**
469            * Returns an ordered range of all the subscriptions where userId = &#63; and classNameId = &#63;.
470            *
471            * <p>
472            * 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.
473            * </p>
474            *
475            * @param userId the user ID
476            * @param classNameId the class name ID
477            * @param start the lower bound of the range of subscriptions
478            * @param end the upper bound of the range of subscriptions (not inclusive)
479            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
480            * @return the ordered range of matching subscriptions
481            */
482            public static List<Subscription> findByU_C(long userId, long classNameId,
483                    int start, int end, OrderByComparator<Subscription> orderByComparator) {
484                    return getPersistence()
485                                       .findByU_C(userId, classNameId, start, end, orderByComparator);
486            }
487    
488            /**
489            * Returns an ordered range of all the subscriptions where userId = &#63; and classNameId = &#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 userId the user ID
496            * @param classNameId the class name ID
497            * @param start the lower bound of the range of subscriptions
498            * @param end the upper bound of the range of subscriptions (not inclusive)
499            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
500            * @param retrieveFromCache whether to retrieve from the finder cache
501            * @return the ordered range of matching subscriptions
502            */
503            public static List<Subscription> findByU_C(long userId, long classNameId,
504                    int start, int end, OrderByComparator<Subscription> orderByComparator,
505                    boolean retrieveFromCache) {
506                    return getPersistence()
507                                       .findByU_C(userId, classNameId, start, end,
508                            orderByComparator, retrieveFromCache);
509            }
510    
511            /**
512            * Returns the first subscription in the ordered set where userId = &#63; and classNameId = &#63;.
513            *
514            * @param userId the user ID
515            * @param classNameId the class name ID
516            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
517            * @return the first matching subscription
518            * @throws NoSuchSubscriptionException if a matching subscription could not be found
519            */
520            public static Subscription findByU_C_First(long userId, long classNameId,
521                    OrderByComparator<Subscription> orderByComparator)
522                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
523                    return getPersistence()
524                                       .findByU_C_First(userId, classNameId, orderByComparator);
525            }
526    
527            /**
528            * Returns the first subscription in the ordered set where userId = &#63; and classNameId = &#63;.
529            *
530            * @param userId the user ID
531            * @param classNameId the class name ID
532            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
533            * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found
534            */
535            public static Subscription fetchByU_C_First(long userId, long classNameId,
536                    OrderByComparator<Subscription> orderByComparator) {
537                    return getPersistence()
538                                       .fetchByU_C_First(userId, classNameId, orderByComparator);
539            }
540    
541            /**
542            * Returns the last subscription in the ordered set where userId = &#63; and classNameId = &#63;.
543            *
544            * @param userId the user ID
545            * @param classNameId the class name ID
546            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
547            * @return the last matching subscription
548            * @throws NoSuchSubscriptionException if a matching subscription could not be found
549            */
550            public static Subscription findByU_C_Last(long userId, long classNameId,
551                    OrderByComparator<Subscription> orderByComparator)
552                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
553                    return getPersistence()
554                                       .findByU_C_Last(userId, classNameId, orderByComparator);
555            }
556    
557            /**
558            * Returns the last subscription in the ordered set where userId = &#63; and classNameId = &#63;.
559            *
560            * @param userId the user ID
561            * @param classNameId the class name ID
562            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
563            * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found
564            */
565            public static Subscription fetchByU_C_Last(long userId, long classNameId,
566                    OrderByComparator<Subscription> orderByComparator) {
567                    return getPersistence()
568                                       .fetchByU_C_Last(userId, classNameId, orderByComparator);
569            }
570    
571            /**
572            * Returns the subscriptions before and after the current subscription in the ordered set where userId = &#63; and classNameId = &#63;.
573            *
574            * @param subscriptionId the primary key of the current subscription
575            * @param userId the user ID
576            * @param classNameId the class name ID
577            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
578            * @return the previous, current, and next subscription
579            * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found
580            */
581            public static Subscription[] findByU_C_PrevAndNext(long subscriptionId,
582                    long userId, long classNameId,
583                    OrderByComparator<Subscription> orderByComparator)
584                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
585                    return getPersistence()
586                                       .findByU_C_PrevAndNext(subscriptionId, userId, classNameId,
587                            orderByComparator);
588            }
589    
590            /**
591            * Removes all the subscriptions where userId = &#63; and classNameId = &#63; from the database.
592            *
593            * @param userId the user ID
594            * @param classNameId the class name ID
595            */
596            public static void removeByU_C(long userId, long classNameId) {
597                    getPersistence().removeByU_C(userId, classNameId);
598            }
599    
600            /**
601            * Returns the number of subscriptions where userId = &#63; and classNameId = &#63;.
602            *
603            * @param userId the user ID
604            * @param classNameId the class name ID
605            * @return the number of matching subscriptions
606            */
607            public static int countByU_C(long userId, long classNameId) {
608                    return getPersistence().countByU_C(userId, classNameId);
609            }
610    
611            /**
612            * Returns all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
613            *
614            * @param companyId the company ID
615            * @param classNameId the class name ID
616            * @param classPK the class p k
617            * @return the matching subscriptions
618            */
619            public static List<Subscription> findByC_C_C(long companyId,
620                    long classNameId, long classPK) {
621                    return getPersistence().findByC_C_C(companyId, classNameId, classPK);
622            }
623    
624            /**
625            * Returns a range of all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
626            *
627            * <p>
628            * 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.
629            * </p>
630            *
631            * @param companyId the company ID
632            * @param classNameId the class name ID
633            * @param classPK the class p k
634            * @param start the lower bound of the range of subscriptions
635            * @param end the upper bound of the range of subscriptions (not inclusive)
636            * @return the range of matching subscriptions
637            */
638            public static List<Subscription> findByC_C_C(long companyId,
639                    long classNameId, long classPK, int start, int end) {
640                    return getPersistence()
641                                       .findByC_C_C(companyId, classNameId, classPK, start, end);
642            }
643    
644            /**
645            * Returns an ordered range of all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
646            *
647            * <p>
648            * 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.
649            * </p>
650            *
651            * @param companyId the company ID
652            * @param classNameId the class name ID
653            * @param classPK the class p k
654            * @param start the lower bound of the range of subscriptions
655            * @param end the upper bound of the range of subscriptions (not inclusive)
656            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
657            * @return the ordered range of matching subscriptions
658            */
659            public static List<Subscription> findByC_C_C(long companyId,
660                    long classNameId, long classPK, int start, int end,
661                    OrderByComparator<Subscription> orderByComparator) {
662                    return getPersistence()
663                                       .findByC_C_C(companyId, classNameId, classPK, start, end,
664                            orderByComparator);
665            }
666    
667            /**
668            * Returns an ordered range of all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
669            *
670            * <p>
671            * 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.
672            * </p>
673            *
674            * @param companyId the company ID
675            * @param classNameId the class name ID
676            * @param classPK the class p k
677            * @param start the lower bound of the range of subscriptions
678            * @param end the upper bound of the range of subscriptions (not inclusive)
679            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
680            * @param retrieveFromCache whether to retrieve from the finder cache
681            * @return the ordered range of matching subscriptions
682            */
683            public static List<Subscription> findByC_C_C(long companyId,
684                    long classNameId, long classPK, int start, int end,
685                    OrderByComparator<Subscription> orderByComparator,
686                    boolean retrieveFromCache) {
687                    return getPersistence()
688                                       .findByC_C_C(companyId, classNameId, classPK, start, end,
689                            orderByComparator, retrieveFromCache);
690            }
691    
692            /**
693            * Returns the first subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
694            *
695            * @param companyId the company ID
696            * @param classNameId the class name ID
697            * @param classPK the class p k
698            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
699            * @return the first matching subscription
700            * @throws NoSuchSubscriptionException if a matching subscription could not be found
701            */
702            public static Subscription findByC_C_C_First(long companyId,
703                    long classNameId, long classPK,
704                    OrderByComparator<Subscription> orderByComparator)
705                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
706                    return getPersistence()
707                                       .findByC_C_C_First(companyId, classNameId, classPK,
708                            orderByComparator);
709            }
710    
711            /**
712            * Returns the first subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
713            *
714            * @param companyId the company ID
715            * @param classNameId the class name ID
716            * @param classPK the class p k
717            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
718            * @return the first matching subscription, or <code>null</code> if a matching subscription could not be found
719            */
720            public static Subscription fetchByC_C_C_First(long companyId,
721                    long classNameId, long classPK,
722                    OrderByComparator<Subscription> orderByComparator) {
723                    return getPersistence()
724                                       .fetchByC_C_C_First(companyId, classNameId, classPK,
725                            orderByComparator);
726            }
727    
728            /**
729            * Returns the last subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
730            *
731            * @param companyId the company ID
732            * @param classNameId the class name ID
733            * @param classPK the class p k
734            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
735            * @return the last matching subscription
736            * @throws NoSuchSubscriptionException if a matching subscription could not be found
737            */
738            public static Subscription findByC_C_C_Last(long companyId,
739                    long classNameId, long classPK,
740                    OrderByComparator<Subscription> orderByComparator)
741                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
742                    return getPersistence()
743                                       .findByC_C_C_Last(companyId, classNameId, classPK,
744                            orderByComparator);
745            }
746    
747            /**
748            * Returns the last subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
749            *
750            * @param companyId the company ID
751            * @param classNameId the class name ID
752            * @param classPK the class p k
753            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
754            * @return the last matching subscription, or <code>null</code> if a matching subscription could not be found
755            */
756            public static Subscription fetchByC_C_C_Last(long companyId,
757                    long classNameId, long classPK,
758                    OrderByComparator<Subscription> orderByComparator) {
759                    return getPersistence()
760                                       .fetchByC_C_C_Last(companyId, classNameId, classPK,
761                            orderByComparator);
762            }
763    
764            /**
765            * Returns the subscriptions before and after the current subscription in the ordered set where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
766            *
767            * @param subscriptionId the primary key of the current subscription
768            * @param companyId the company ID
769            * @param classNameId the class name ID
770            * @param classPK the class p k
771            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
772            * @return the previous, current, and next subscription
773            * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found
774            */
775            public static Subscription[] findByC_C_C_PrevAndNext(long subscriptionId,
776                    long companyId, long classNameId, long classPK,
777                    OrderByComparator<Subscription> orderByComparator)
778                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
779                    return getPersistence()
780                                       .findByC_C_C_PrevAndNext(subscriptionId, companyId,
781                            classNameId, classPK, orderByComparator);
782            }
783    
784            /**
785            * Removes all the subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
786            *
787            * @param companyId the company ID
788            * @param classNameId the class name ID
789            * @param classPK the class p k
790            */
791            public static void removeByC_C_C(long companyId, long classNameId,
792                    long classPK) {
793                    getPersistence().removeByC_C_C(companyId, classNameId, classPK);
794            }
795    
796            /**
797            * Returns the number of subscriptions where companyId = &#63; and classNameId = &#63; and classPK = &#63;.
798            *
799            * @param companyId the company ID
800            * @param classNameId the class name ID
801            * @param classPK the class p k
802            * @return the number of matching subscriptions
803            */
804            public static int countByC_C_C(long companyId, long classNameId,
805                    long classPK) {
806                    return getPersistence().countByC_C_C(companyId, classNameId, classPK);
807            }
808    
809            /**
810            * Returns all the subscriptions where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = any &#63;.
811            *
812            * <p>
813            * 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.
814            * </p>
815            *
816            * @param companyId the company ID
817            * @param userId the user ID
818            * @param classNameId the class name ID
819            * @param classPKs the class p ks
820            * @return the matching subscriptions
821            */
822            public static List<Subscription> findByC_U_C_C(long companyId, long userId,
823                    long classNameId, long[] classPKs) {
824                    return getPersistence()
825                                       .findByC_U_C_C(companyId, userId, classNameId, classPKs);
826            }
827    
828            /**
829            * Returns a range of all the subscriptions where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = any &#63;.
830            *
831            * <p>
832            * 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.
833            * </p>
834            *
835            * @param companyId the company ID
836            * @param userId the user ID
837            * @param classNameId the class name ID
838            * @param classPKs the class p ks
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 matching subscriptions
842            */
843            public static List<Subscription> findByC_U_C_C(long companyId, long userId,
844                    long classNameId, long[] classPKs, int start, int end) {
845                    return getPersistence()
846                                       .findByC_U_C_C(companyId, userId, classNameId, classPKs,
847                            start, end);
848            }
849    
850            /**
851            * Returns an ordered range of all the subscriptions where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = any &#63;.
852            *
853            * <p>
854            * 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.
855            * </p>
856            *
857            * @param companyId the company ID
858            * @param userId the user ID
859            * @param classNameId the class name ID
860            * @param classPKs the class p ks
861            * @param start the lower bound of the range of subscriptions
862            * @param end the upper bound of the range of subscriptions (not inclusive)
863            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
864            * @return the ordered range of matching subscriptions
865            */
866            public static List<Subscription> findByC_U_C_C(long companyId, long userId,
867                    long classNameId, long[] classPKs, int start, int end,
868                    OrderByComparator<Subscription> orderByComparator) {
869                    return getPersistence()
870                                       .findByC_U_C_C(companyId, userId, classNameId, classPKs,
871                            start, end, orderByComparator);
872            }
873    
874            /**
875            * 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.
876            *
877            * <p>
878            * 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.
879            * </p>
880            *
881            * @param companyId the company ID
882            * @param userId the user ID
883            * @param classNameId the class name ID
884            * @param classPK the class p k
885            * @param start the lower bound of the range of subscriptions
886            * @param end the upper bound of the range of subscriptions (not inclusive)
887            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
888            * @param retrieveFromCache whether to retrieve from the finder cache
889            * @return the ordered range of matching subscriptions
890            */
891            public static List<Subscription> findByC_U_C_C(long companyId, long userId,
892                    long classNameId, long[] classPKs, int start, int end,
893                    OrderByComparator<Subscription> orderByComparator,
894                    boolean retrieveFromCache) {
895                    return getPersistence()
896                                       .findByC_U_C_C(companyId, userId, classNameId, classPKs,
897                            start, end, orderByComparator, retrieveFromCache);
898            }
899    
900            /**
901            * 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.
902            *
903            * @param companyId the company ID
904            * @param userId the user ID
905            * @param classNameId the class name ID
906            * @param classPK the class p k
907            * @return the matching subscription
908            * @throws NoSuchSubscriptionException if a matching subscription could not be found
909            */
910            public static Subscription findByC_U_C_C(long companyId, long userId,
911                    long classNameId, long classPK)
912                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
913                    return getPersistence()
914                                       .findByC_U_C_C(companyId, userId, classNameId, classPK);
915            }
916    
917            /**
918            * 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.
919            *
920            * @param companyId the company ID
921            * @param userId the user ID
922            * @param classNameId the class name ID
923            * @param classPK the class p k
924            * @return the matching subscription, or <code>null</code> if a matching subscription could not be found
925            */
926            public static Subscription fetchByC_U_C_C(long companyId, long userId,
927                    long classNameId, long classPK) {
928                    return getPersistence()
929                                       .fetchByC_U_C_C(companyId, userId, classNameId, classPK);
930            }
931    
932            /**
933            * 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.
934            *
935            * @param companyId the company ID
936            * @param userId the user ID
937            * @param classNameId the class name ID
938            * @param classPK the class p k
939            * @param retrieveFromCache whether to retrieve from the finder cache
940            * @return the matching subscription, or <code>null</code> if a matching subscription could not be found
941            */
942            public static Subscription fetchByC_U_C_C(long companyId, long userId,
943                    long classNameId, long classPK, boolean retrieveFromCache) {
944                    return getPersistence()
945                                       .fetchByC_U_C_C(companyId, userId, classNameId, classPK,
946                            retrieveFromCache);
947            }
948    
949            /**
950            * Removes the subscription where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
951            *
952            * @param companyId the company ID
953            * @param userId the user ID
954            * @param classNameId the class name ID
955            * @param classPK the class p k
956            * @return the subscription that was removed
957            */
958            public static Subscription removeByC_U_C_C(long companyId, long userId,
959                    long classNameId, long classPK)
960                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
961                    return getPersistence()
962                                       .removeByC_U_C_C(companyId, userId, classNameId, classPK);
963            }
964    
965            /**
966            * Returns the number of subscriptions where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63;.
967            *
968            * @param companyId the company ID
969            * @param userId the user ID
970            * @param classNameId the class name ID
971            * @param classPK the class p k
972            * @return the number of matching subscriptions
973            */
974            public static int countByC_U_C_C(long companyId, long userId,
975                    long classNameId, long classPK) {
976                    return getPersistence()
977                                       .countByC_U_C_C(companyId, userId, classNameId, classPK);
978            }
979    
980            /**
981            * Returns the number of subscriptions where companyId = &#63; and userId = &#63; and classNameId = &#63; and classPK = any &#63;.
982            *
983            * @param companyId the company ID
984            * @param userId the user ID
985            * @param classNameId the class name ID
986            * @param classPKs the class p ks
987            * @return the number of matching subscriptions
988            */
989            public static int countByC_U_C_C(long companyId, long userId,
990                    long classNameId, long[] classPKs) {
991                    return getPersistence()
992                                       .countByC_U_C_C(companyId, userId, classNameId, classPKs);
993            }
994    
995            /**
996            * Caches the subscription in the entity cache if it is enabled.
997            *
998            * @param subscription the subscription
999            */
1000            public static void cacheResult(Subscription subscription) {
1001                    getPersistence().cacheResult(subscription);
1002            }
1003    
1004            /**
1005            * Caches the subscriptions in the entity cache if it is enabled.
1006            *
1007            * @param subscriptions the subscriptions
1008            */
1009            public static void cacheResult(List<Subscription> subscriptions) {
1010                    getPersistence().cacheResult(subscriptions);
1011            }
1012    
1013            /**
1014            * Creates a new subscription with the primary key. Does not add the subscription to the database.
1015            *
1016            * @param subscriptionId the primary key for the new subscription
1017            * @return the new subscription
1018            */
1019            public static Subscription create(long subscriptionId) {
1020                    return getPersistence().create(subscriptionId);
1021            }
1022    
1023            /**
1024            * Removes the subscription with the primary key from the database. Also notifies the appropriate model listeners.
1025            *
1026            * @param subscriptionId the primary key of the subscription
1027            * @return the subscription that was removed
1028            * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found
1029            */
1030            public static Subscription remove(long subscriptionId)
1031                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
1032                    return getPersistence().remove(subscriptionId);
1033            }
1034    
1035            public static Subscription updateImpl(Subscription subscription) {
1036                    return getPersistence().updateImpl(subscription);
1037            }
1038    
1039            /**
1040            * Returns the subscription with the primary key or throws a {@link NoSuchSubscriptionException} if it could not be found.
1041            *
1042            * @param subscriptionId the primary key of the subscription
1043            * @return the subscription
1044            * @throws NoSuchSubscriptionException if a subscription with the primary key could not be found
1045            */
1046            public static Subscription findByPrimaryKey(long subscriptionId)
1047                    throws com.liferay.portal.exception.NoSuchSubscriptionException {
1048                    return getPersistence().findByPrimaryKey(subscriptionId);
1049            }
1050    
1051            /**
1052            * Returns the subscription with the primary key or returns <code>null</code> if it could not be found.
1053            *
1054            * @param subscriptionId the primary key of the subscription
1055            * @return the subscription, or <code>null</code> if a subscription with the primary key could not be found
1056            */
1057            public static Subscription fetchByPrimaryKey(long subscriptionId) {
1058                    return getPersistence().fetchByPrimaryKey(subscriptionId);
1059            }
1060    
1061            public static java.util.Map<java.io.Serializable, Subscription> fetchByPrimaryKeys(
1062                    java.util.Set<java.io.Serializable> primaryKeys) {
1063                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
1064            }
1065    
1066            /**
1067            * Returns all the subscriptions.
1068            *
1069            * @return the subscriptions
1070            */
1071            public static List<Subscription> findAll() {
1072                    return getPersistence().findAll();
1073            }
1074    
1075            /**
1076            * Returns a range of all the subscriptions.
1077            *
1078            * <p>
1079            * 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.
1080            * </p>
1081            *
1082            * @param start the lower bound of the range of subscriptions
1083            * @param end the upper bound of the range of subscriptions (not inclusive)
1084            * @return the range of subscriptions
1085            */
1086            public static List<Subscription> findAll(int start, int end) {
1087                    return getPersistence().findAll(start, end);
1088            }
1089    
1090            /**
1091            * Returns an ordered range of all the subscriptions.
1092            *
1093            * <p>
1094            * 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.
1095            * </p>
1096            *
1097            * @param start the lower bound of the range of subscriptions
1098            * @param end the upper bound of the range of subscriptions (not inclusive)
1099            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1100            * @return the ordered range of subscriptions
1101            */
1102            public static List<Subscription> findAll(int start, int end,
1103                    OrderByComparator<Subscription> orderByComparator) {
1104                    return getPersistence().findAll(start, end, orderByComparator);
1105            }
1106    
1107            /**
1108            * Returns an ordered range of all the subscriptions.
1109            *
1110            * <p>
1111            * 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.
1112            * </p>
1113            *
1114            * @param start the lower bound of the range of subscriptions
1115            * @param end the upper bound of the range of subscriptions (not inclusive)
1116            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1117            * @param retrieveFromCache whether to retrieve from the finder cache
1118            * @return the ordered range of subscriptions
1119            */
1120            public static List<Subscription> findAll(int start, int end,
1121                    OrderByComparator<Subscription> orderByComparator,
1122                    boolean retrieveFromCache) {
1123                    return getPersistence()
1124                                       .findAll(start, end, orderByComparator, retrieveFromCache);
1125            }
1126    
1127            /**
1128            * Removes all the subscriptions from the database.
1129            */
1130            public static void removeAll() {
1131                    getPersistence().removeAll();
1132            }
1133    
1134            /**
1135            * Returns the number of subscriptions.
1136            *
1137            * @return the number of subscriptions
1138            */
1139            public static int countAll() {
1140                    return getPersistence().countAll();
1141            }
1142    
1143            public static SubscriptionPersistence getPersistence() {
1144                    if (_persistence == null) {
1145                            _persistence = (SubscriptionPersistence)PortalBeanLocatorUtil.locate(SubscriptionPersistence.class.getName());
1146    
1147                            ReferenceRegistry.registerReference(SubscriptionUtil.class,
1148                                    "_persistence");
1149                    }
1150    
1151                    return _persistence;
1152            }
1153    
1154            private static SubscriptionPersistence _persistence;
1155    }