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