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.portlet.social.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.service.ServiceContext;
024    
025    import com.liferay.portlet.social.model.SocialActivityLimit;
026    
027    import java.util.List;
028    
029    /**
030     * The persistence utility for the social activity limit service. This utility wraps {@link SocialActivityLimitPersistenceImpl} 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.
031     *
032     * <p>
033     * Caching information and settings can be found in <code>portal.properties</code>
034     * </p>
035     *
036     * @author Brian Wing Shun Chan
037     * @see SocialActivityLimitPersistence
038     * @see SocialActivityLimitPersistenceImpl
039     * @generated
040     */
041    @ProviderType
042    public class SocialActivityLimitUtil {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
047             */
048    
049            /**
050             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
051             */
052            public static void clearCache() {
053                    getPersistence().clearCache();
054            }
055    
056            /**
057             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
058             */
059            public static void clearCache(SocialActivityLimit socialActivityLimit) {
060                    getPersistence().clearCache(socialActivityLimit);
061            }
062    
063            /**
064             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
065             */
066            public static long countWithDynamicQuery(DynamicQuery dynamicQuery) {
067                    return getPersistence().countWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
072             */
073            public static List<SocialActivityLimit> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery) {
075                    return getPersistence().findWithDynamicQuery(dynamicQuery);
076            }
077    
078            /**
079             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
080             */
081            public static List<SocialActivityLimit> findWithDynamicQuery(
082                    DynamicQuery dynamicQuery, int start, int end) {
083                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
084            }
085    
086            /**
087             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
088             */
089            public static List<SocialActivityLimit> findWithDynamicQuery(
090                    DynamicQuery dynamicQuery, int start, int end,
091                    OrderByComparator<SocialActivityLimit> orderByComparator) {
092                    return getPersistence()
093                                       .findWithDynamicQuery(dynamicQuery, start, end,
094                            orderByComparator);
095            }
096    
097            /**
098             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel)
099             */
100            public static SocialActivityLimit update(
101                    SocialActivityLimit socialActivityLimit) {
102                    return getPersistence().update(socialActivityLimit);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
107             */
108            public static SocialActivityLimit update(
109                    SocialActivityLimit socialActivityLimit, ServiceContext serviceContext) {
110                    return getPersistence().update(socialActivityLimit, serviceContext);
111            }
112    
113            /**
114            * Returns all the social activity limits where groupId = &#63;.
115            *
116            * @param groupId the group ID
117            * @return the matching social activity limits
118            */
119            public static java.util.List<com.liferay.portlet.social.model.SocialActivityLimit> findByGroupId(
120                    long groupId) {
121                    return getPersistence().findByGroupId(groupId);
122            }
123    
124            /**
125            * Returns a range of all the social activity limits where groupId = &#63;.
126            *
127            * <p>
128            * 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.portlet.social.model.impl.SocialActivityLimitModelImpl}. 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.
129            * </p>
130            *
131            * @param groupId the group ID
132            * @param start the lower bound of the range of social activity limits
133            * @param end the upper bound of the range of social activity limits (not inclusive)
134            * @return the range of matching social activity limits
135            */
136            public static java.util.List<com.liferay.portlet.social.model.SocialActivityLimit> findByGroupId(
137                    long groupId, int start, int end) {
138                    return getPersistence().findByGroupId(groupId, start, end);
139            }
140    
141            /**
142            * Returns an ordered range of all the social activity limits where groupId = &#63;.
143            *
144            * <p>
145            * 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.portlet.social.model.impl.SocialActivityLimitModelImpl}. 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.
146            * </p>
147            *
148            * @param groupId the group ID
149            * @param start the lower bound of the range of social activity limits
150            * @param end the upper bound of the range of social activity limits (not inclusive)
151            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
152            * @return the ordered range of matching social activity limits
153            */
154            public static java.util.List<com.liferay.portlet.social.model.SocialActivityLimit> findByGroupId(
155                    long groupId, int start, int end,
156                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator) {
157                    return getPersistence()
158                                       .findByGroupId(groupId, start, end, orderByComparator);
159            }
160    
161            /**
162            * Returns the first social activity limit in the ordered set where groupId = &#63;.
163            *
164            * @param groupId the group ID
165            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
166            * @return the first matching social activity limit
167            * @throws com.liferay.portlet.social.NoSuchActivityLimitException if a matching social activity limit could not be found
168            */
169            public static com.liferay.portlet.social.model.SocialActivityLimit findByGroupId_First(
170                    long groupId,
171                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator)
172                    throws com.liferay.portlet.social.NoSuchActivityLimitException {
173                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
174            }
175    
176            /**
177            * Returns the first social activity limit in the ordered set where groupId = &#63;.
178            *
179            * @param groupId the group ID
180            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
181            * @return the first matching social activity limit, or <code>null</code> if a matching social activity limit could not be found
182            */
183            public static com.liferay.portlet.social.model.SocialActivityLimit fetchByGroupId_First(
184                    long groupId,
185                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator) {
186                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
187            }
188    
189            /**
190            * Returns the last social activity limit in the ordered set where groupId = &#63;.
191            *
192            * @param groupId the group ID
193            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
194            * @return the last matching social activity limit
195            * @throws com.liferay.portlet.social.NoSuchActivityLimitException if a matching social activity limit could not be found
196            */
197            public static com.liferay.portlet.social.model.SocialActivityLimit findByGroupId_Last(
198                    long groupId,
199                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator)
200                    throws com.liferay.portlet.social.NoSuchActivityLimitException {
201                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
202            }
203    
204            /**
205            * Returns the last social activity limit in the ordered set where groupId = &#63;.
206            *
207            * @param groupId the group ID
208            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
209            * @return the last matching social activity limit, or <code>null</code> if a matching social activity limit could not be found
210            */
211            public static com.liferay.portlet.social.model.SocialActivityLimit fetchByGroupId_Last(
212                    long groupId,
213                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator) {
214                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
215            }
216    
217            /**
218            * Returns the social activity limits before and after the current social activity limit in the ordered set where groupId = &#63;.
219            *
220            * @param activityLimitId the primary key of the current social activity limit
221            * @param groupId the group ID
222            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
223            * @return the previous, current, and next social activity limit
224            * @throws com.liferay.portlet.social.NoSuchActivityLimitException if a social activity limit with the primary key could not be found
225            */
226            public static com.liferay.portlet.social.model.SocialActivityLimit[] findByGroupId_PrevAndNext(
227                    long activityLimitId, long groupId,
228                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator)
229                    throws com.liferay.portlet.social.NoSuchActivityLimitException {
230                    return getPersistence()
231                                       .findByGroupId_PrevAndNext(activityLimitId, groupId,
232                            orderByComparator);
233            }
234    
235            /**
236            * Removes all the social activity limits where groupId = &#63; from the database.
237            *
238            * @param groupId the group ID
239            */
240            public static void removeByGroupId(long groupId) {
241                    getPersistence().removeByGroupId(groupId);
242            }
243    
244            /**
245            * Returns the number of social activity limits where groupId = &#63;.
246            *
247            * @param groupId the group ID
248            * @return the number of matching social activity limits
249            */
250            public static int countByGroupId(long groupId) {
251                    return getPersistence().countByGroupId(groupId);
252            }
253    
254            /**
255            * Returns all the social activity limits where userId = &#63;.
256            *
257            * @param userId the user ID
258            * @return the matching social activity limits
259            */
260            public static java.util.List<com.liferay.portlet.social.model.SocialActivityLimit> findByUserId(
261                    long userId) {
262                    return getPersistence().findByUserId(userId);
263            }
264    
265            /**
266            * Returns a range of all the social activity limits where userId = &#63;.
267            *
268            * <p>
269            * 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.portlet.social.model.impl.SocialActivityLimitModelImpl}. 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.
270            * </p>
271            *
272            * @param userId the user ID
273            * @param start the lower bound of the range of social activity limits
274            * @param end the upper bound of the range of social activity limits (not inclusive)
275            * @return the range of matching social activity limits
276            */
277            public static java.util.List<com.liferay.portlet.social.model.SocialActivityLimit> findByUserId(
278                    long userId, int start, int end) {
279                    return getPersistence().findByUserId(userId, start, end);
280            }
281    
282            /**
283            * Returns an ordered range of all the social activity limits where userId = &#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.portlet.social.model.impl.SocialActivityLimitModelImpl}. 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 start the lower bound of the range of social activity limits
291            * @param end the upper bound of the range of social activity limits (not inclusive)
292            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
293            * @return the ordered range of matching social activity limits
294            */
295            public static java.util.List<com.liferay.portlet.social.model.SocialActivityLimit> findByUserId(
296                    long userId, int start, int end,
297                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator) {
298                    return getPersistence()
299                                       .findByUserId(userId, start, end, orderByComparator);
300            }
301    
302            /**
303            * Returns the first social activity limit in the ordered set where userId = &#63;.
304            *
305            * @param userId the user ID
306            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
307            * @return the first matching social activity limit
308            * @throws com.liferay.portlet.social.NoSuchActivityLimitException if a matching social activity limit could not be found
309            */
310            public static com.liferay.portlet.social.model.SocialActivityLimit findByUserId_First(
311                    long userId,
312                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator)
313                    throws com.liferay.portlet.social.NoSuchActivityLimitException {
314                    return getPersistence().findByUserId_First(userId, orderByComparator);
315            }
316    
317            /**
318            * Returns the first social activity limit in the ordered set where userId = &#63;.
319            *
320            * @param userId the user ID
321            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
322            * @return the first matching social activity limit, or <code>null</code> if a matching social activity limit could not be found
323            */
324            public static com.liferay.portlet.social.model.SocialActivityLimit fetchByUserId_First(
325                    long userId,
326                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator) {
327                    return getPersistence().fetchByUserId_First(userId, orderByComparator);
328            }
329    
330            /**
331            * Returns the last social activity limit in the ordered set where userId = &#63;.
332            *
333            * @param userId the user ID
334            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
335            * @return the last matching social activity limit
336            * @throws com.liferay.portlet.social.NoSuchActivityLimitException if a matching social activity limit could not be found
337            */
338            public static com.liferay.portlet.social.model.SocialActivityLimit findByUserId_Last(
339                    long userId,
340                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator)
341                    throws com.liferay.portlet.social.NoSuchActivityLimitException {
342                    return getPersistence().findByUserId_Last(userId, orderByComparator);
343            }
344    
345            /**
346            * Returns the last social activity limit in the ordered set where userId = &#63;.
347            *
348            * @param userId the user ID
349            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
350            * @return the last matching social activity limit, or <code>null</code> if a matching social activity limit could not be found
351            */
352            public static com.liferay.portlet.social.model.SocialActivityLimit fetchByUserId_Last(
353                    long userId,
354                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator) {
355                    return getPersistence().fetchByUserId_Last(userId, orderByComparator);
356            }
357    
358            /**
359            * Returns the social activity limits before and after the current social activity limit in the ordered set where userId = &#63;.
360            *
361            * @param activityLimitId the primary key of the current social activity limit
362            * @param userId the user ID
363            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
364            * @return the previous, current, and next social activity limit
365            * @throws com.liferay.portlet.social.NoSuchActivityLimitException if a social activity limit with the primary key could not be found
366            */
367            public static com.liferay.portlet.social.model.SocialActivityLimit[] findByUserId_PrevAndNext(
368                    long activityLimitId, long userId,
369                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator)
370                    throws com.liferay.portlet.social.NoSuchActivityLimitException {
371                    return getPersistence()
372                                       .findByUserId_PrevAndNext(activityLimitId, userId,
373                            orderByComparator);
374            }
375    
376            /**
377            * Removes all the social activity limits where userId = &#63; from the database.
378            *
379            * @param userId the user ID
380            */
381            public static void removeByUserId(long userId) {
382                    getPersistence().removeByUserId(userId);
383            }
384    
385            /**
386            * Returns the number of social activity limits where userId = &#63;.
387            *
388            * @param userId the user ID
389            * @return the number of matching social activity limits
390            */
391            public static int countByUserId(long userId) {
392                    return getPersistence().countByUserId(userId);
393            }
394    
395            /**
396            * Returns all the social activity limits where classNameId = &#63; and classPK = &#63;.
397            *
398            * @param classNameId the class name ID
399            * @param classPK the class p k
400            * @return the matching social activity limits
401            */
402            public static java.util.List<com.liferay.portlet.social.model.SocialActivityLimit> findByC_C(
403                    long classNameId, long classPK) {
404                    return getPersistence().findByC_C(classNameId, classPK);
405            }
406    
407            /**
408            * Returns a range of all the social activity limits where classNameId = &#63; and classPK = &#63;.
409            *
410            * <p>
411            * 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.portlet.social.model.impl.SocialActivityLimitModelImpl}. 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.
412            * </p>
413            *
414            * @param classNameId the class name ID
415            * @param classPK the class p k
416            * @param start the lower bound of the range of social activity limits
417            * @param end the upper bound of the range of social activity limits (not inclusive)
418            * @return the range of matching social activity limits
419            */
420            public static java.util.List<com.liferay.portlet.social.model.SocialActivityLimit> findByC_C(
421                    long classNameId, long classPK, int start, int end) {
422                    return getPersistence().findByC_C(classNameId, classPK, start, end);
423            }
424    
425            /**
426            * Returns an ordered range of all the social activity limits where classNameId = &#63; and classPK = &#63;.
427            *
428            * <p>
429            * 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.portlet.social.model.impl.SocialActivityLimitModelImpl}. 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.
430            * </p>
431            *
432            * @param classNameId the class name ID
433            * @param classPK the class p k
434            * @param start the lower bound of the range of social activity limits
435            * @param end the upper bound of the range of social activity limits (not inclusive)
436            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
437            * @return the ordered range of matching social activity limits
438            */
439            public static java.util.List<com.liferay.portlet.social.model.SocialActivityLimit> findByC_C(
440                    long classNameId, long classPK, int start, int end,
441                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator) {
442                    return getPersistence()
443                                       .findByC_C(classNameId, classPK, start, end,
444                            orderByComparator);
445            }
446    
447            /**
448            * Returns the first social activity limit in the ordered set where classNameId = &#63; and classPK = &#63;.
449            *
450            * @param classNameId the class name ID
451            * @param classPK the class p k
452            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
453            * @return the first matching social activity limit
454            * @throws com.liferay.portlet.social.NoSuchActivityLimitException if a matching social activity limit could not be found
455            */
456            public static com.liferay.portlet.social.model.SocialActivityLimit findByC_C_First(
457                    long classNameId, long classPK,
458                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator)
459                    throws com.liferay.portlet.social.NoSuchActivityLimitException {
460                    return getPersistence()
461                                       .findByC_C_First(classNameId, classPK, orderByComparator);
462            }
463    
464            /**
465            * Returns the first social activity limit in the ordered set where classNameId = &#63; and classPK = &#63;.
466            *
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 social activity limit, or <code>null</code> if a matching social activity limit could not be found
471            */
472            public static com.liferay.portlet.social.model.SocialActivityLimit fetchByC_C_First(
473                    long classNameId, long classPK,
474                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator) {
475                    return getPersistence()
476                                       .fetchByC_C_First(classNameId, classPK, orderByComparator);
477            }
478    
479            /**
480            * Returns the last social activity limit in the ordered set where classNameId = &#63; and classPK = &#63;.
481            *
482            * @param classNameId the class name ID
483            * @param classPK the class p k
484            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
485            * @return the last matching social activity limit
486            * @throws com.liferay.portlet.social.NoSuchActivityLimitException if a matching social activity limit could not be found
487            */
488            public static com.liferay.portlet.social.model.SocialActivityLimit findByC_C_Last(
489                    long classNameId, long classPK,
490                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator)
491                    throws com.liferay.portlet.social.NoSuchActivityLimitException {
492                    return getPersistence()
493                                       .findByC_C_Last(classNameId, classPK, orderByComparator);
494            }
495    
496            /**
497            * Returns the last social activity limit in the ordered set where classNameId = &#63; and classPK = &#63;.
498            *
499            * @param classNameId the class name ID
500            * @param classPK the class p k
501            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
502            * @return the last matching social activity limit, or <code>null</code> if a matching social activity limit could not be found
503            */
504            public static com.liferay.portlet.social.model.SocialActivityLimit fetchByC_C_Last(
505                    long classNameId, long classPK,
506                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator) {
507                    return getPersistence()
508                                       .fetchByC_C_Last(classNameId, classPK, orderByComparator);
509            }
510    
511            /**
512            * Returns the social activity limits before and after the current social activity limit in the ordered set where classNameId = &#63; and classPK = &#63;.
513            *
514            * @param activityLimitId the primary key of the current social activity limit
515            * @param classNameId the class name ID
516            * @param classPK the class p k
517            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
518            * @return the previous, current, and next social activity limit
519            * @throws com.liferay.portlet.social.NoSuchActivityLimitException if a social activity limit with the primary key could not be found
520            */
521            public static com.liferay.portlet.social.model.SocialActivityLimit[] findByC_C_PrevAndNext(
522                    long activityLimitId, long classNameId, long classPK,
523                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator)
524                    throws com.liferay.portlet.social.NoSuchActivityLimitException {
525                    return getPersistence()
526                                       .findByC_C_PrevAndNext(activityLimitId, classNameId,
527                            classPK, orderByComparator);
528            }
529    
530            /**
531            * Removes all the social activity limits where classNameId = &#63; and classPK = &#63; from the database.
532            *
533            * @param classNameId the class name ID
534            * @param classPK the class p k
535            */
536            public static void removeByC_C(long classNameId, long classPK) {
537                    getPersistence().removeByC_C(classNameId, classPK);
538            }
539    
540            /**
541            * Returns the number of social activity limits where classNameId = &#63; and classPK = &#63;.
542            *
543            * @param classNameId the class name ID
544            * @param classPK the class p k
545            * @return the number of matching social activity limits
546            */
547            public static int countByC_C(long classNameId, long classPK) {
548                    return getPersistence().countByC_C(classNameId, classPK);
549            }
550    
551            /**
552            * Returns the social activity limit where groupId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63; and activityType = &#63; and activityCounterName = &#63; or throws a {@link com.liferay.portlet.social.NoSuchActivityLimitException} if it could not be found.
553            *
554            * @param groupId the group ID
555            * @param userId the user ID
556            * @param classNameId the class name ID
557            * @param classPK the class p k
558            * @param activityType the activity type
559            * @param activityCounterName the activity counter name
560            * @return the matching social activity limit
561            * @throws com.liferay.portlet.social.NoSuchActivityLimitException if a matching social activity limit could not be found
562            */
563            public static com.liferay.portlet.social.model.SocialActivityLimit findByG_U_C_C_A_A(
564                    long groupId, long userId, long classNameId, long classPK,
565                    int activityType, java.lang.String activityCounterName)
566                    throws com.liferay.portlet.social.NoSuchActivityLimitException {
567                    return getPersistence()
568                                       .findByG_U_C_C_A_A(groupId, userId, classNameId, classPK,
569                            activityType, activityCounterName);
570            }
571    
572            /**
573            * Returns the social activity limit where groupId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63; and activityType = &#63; and activityCounterName = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
574            *
575            * @param groupId the group ID
576            * @param userId the user ID
577            * @param classNameId the class name ID
578            * @param classPK the class p k
579            * @param activityType the activity type
580            * @param activityCounterName the activity counter name
581            * @return the matching social activity limit, or <code>null</code> if a matching social activity limit could not be found
582            */
583            public static com.liferay.portlet.social.model.SocialActivityLimit fetchByG_U_C_C_A_A(
584                    long groupId, long userId, long classNameId, long classPK,
585                    int activityType, java.lang.String activityCounterName) {
586                    return getPersistence()
587                                       .fetchByG_U_C_C_A_A(groupId, userId, classNameId, classPK,
588                            activityType, activityCounterName);
589            }
590    
591            /**
592            * Returns the social activity limit where groupId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63; and activityType = &#63; and activityCounterName = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
593            *
594            * @param groupId the group ID
595            * @param userId the user ID
596            * @param classNameId the class name ID
597            * @param classPK the class p k
598            * @param activityType the activity type
599            * @param activityCounterName the activity counter name
600            * @param retrieveFromCache whether to use the finder cache
601            * @return the matching social activity limit, or <code>null</code> if a matching social activity limit could not be found
602            */
603            public static com.liferay.portlet.social.model.SocialActivityLimit fetchByG_U_C_C_A_A(
604                    long groupId, long userId, long classNameId, long classPK,
605                    int activityType, java.lang.String activityCounterName,
606                    boolean retrieveFromCache) {
607                    return getPersistence()
608                                       .fetchByG_U_C_C_A_A(groupId, userId, classNameId, classPK,
609                            activityType, activityCounterName, retrieveFromCache);
610            }
611    
612            /**
613            * Removes the social activity limit where groupId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63; and activityType = &#63; and activityCounterName = &#63; from the database.
614            *
615            * @param groupId the group ID
616            * @param userId the user ID
617            * @param classNameId the class name ID
618            * @param classPK the class p k
619            * @param activityType the activity type
620            * @param activityCounterName the activity counter name
621            * @return the social activity limit that was removed
622            */
623            public static com.liferay.portlet.social.model.SocialActivityLimit removeByG_U_C_C_A_A(
624                    long groupId, long userId, long classNameId, long classPK,
625                    int activityType, java.lang.String activityCounterName)
626                    throws com.liferay.portlet.social.NoSuchActivityLimitException {
627                    return getPersistence()
628                                       .removeByG_U_C_C_A_A(groupId, userId, classNameId, classPK,
629                            activityType, activityCounterName);
630            }
631    
632            /**
633            * Returns the number of social activity limits where groupId = &#63; and userId = &#63; and classNameId = &#63; and classPK = &#63; and activityType = &#63; and activityCounterName = &#63;.
634            *
635            * @param groupId the group ID
636            * @param userId the user ID
637            * @param classNameId the class name ID
638            * @param classPK the class p k
639            * @param activityType the activity type
640            * @param activityCounterName the activity counter name
641            * @return the number of matching social activity limits
642            */
643            public static int countByG_U_C_C_A_A(long groupId, long userId,
644                    long classNameId, long classPK, int activityType,
645                    java.lang.String activityCounterName) {
646                    return getPersistence()
647                                       .countByG_U_C_C_A_A(groupId, userId, classNameId, classPK,
648                            activityType, activityCounterName);
649            }
650    
651            /**
652            * Caches the social activity limit in the entity cache if it is enabled.
653            *
654            * @param socialActivityLimit the social activity limit
655            */
656            public static void cacheResult(
657                    com.liferay.portlet.social.model.SocialActivityLimit socialActivityLimit) {
658                    getPersistence().cacheResult(socialActivityLimit);
659            }
660    
661            /**
662            * Caches the social activity limits in the entity cache if it is enabled.
663            *
664            * @param socialActivityLimits the social activity limits
665            */
666            public static void cacheResult(
667                    java.util.List<com.liferay.portlet.social.model.SocialActivityLimit> socialActivityLimits) {
668                    getPersistence().cacheResult(socialActivityLimits);
669            }
670    
671            /**
672            * Creates a new social activity limit with the primary key. Does not add the social activity limit to the database.
673            *
674            * @param activityLimitId the primary key for the new social activity limit
675            * @return the new social activity limit
676            */
677            public static com.liferay.portlet.social.model.SocialActivityLimit create(
678                    long activityLimitId) {
679                    return getPersistence().create(activityLimitId);
680            }
681    
682            /**
683            * Removes the social activity limit with the primary key from the database. Also notifies the appropriate model listeners.
684            *
685            * @param activityLimitId the primary key of the social activity limit
686            * @return the social activity limit that was removed
687            * @throws com.liferay.portlet.social.NoSuchActivityLimitException if a social activity limit with the primary key could not be found
688            */
689            public static com.liferay.portlet.social.model.SocialActivityLimit remove(
690                    long activityLimitId)
691                    throws com.liferay.portlet.social.NoSuchActivityLimitException {
692                    return getPersistence().remove(activityLimitId);
693            }
694    
695            public static com.liferay.portlet.social.model.SocialActivityLimit updateImpl(
696                    com.liferay.portlet.social.model.SocialActivityLimit socialActivityLimit) {
697                    return getPersistence().updateImpl(socialActivityLimit);
698            }
699    
700            /**
701            * Returns the social activity limit with the primary key or throws a {@link com.liferay.portlet.social.NoSuchActivityLimitException} if it could not be found.
702            *
703            * @param activityLimitId the primary key of the social activity limit
704            * @return the social activity limit
705            * @throws com.liferay.portlet.social.NoSuchActivityLimitException if a social activity limit with the primary key could not be found
706            */
707            public static com.liferay.portlet.social.model.SocialActivityLimit findByPrimaryKey(
708                    long activityLimitId)
709                    throws com.liferay.portlet.social.NoSuchActivityLimitException {
710                    return getPersistence().findByPrimaryKey(activityLimitId);
711            }
712    
713            /**
714            * Returns the social activity limit with the primary key or returns <code>null</code> if it could not be found.
715            *
716            * @param activityLimitId the primary key of the social activity limit
717            * @return the social activity limit, or <code>null</code> if a social activity limit with the primary key could not be found
718            */
719            public static com.liferay.portlet.social.model.SocialActivityLimit fetchByPrimaryKey(
720                    long activityLimitId) {
721                    return getPersistence().fetchByPrimaryKey(activityLimitId);
722            }
723    
724            public static java.util.Map<java.io.Serializable, com.liferay.portlet.social.model.SocialActivityLimit> fetchByPrimaryKeys(
725                    java.util.Set<java.io.Serializable> primaryKeys) {
726                    return getPersistence().fetchByPrimaryKeys(primaryKeys);
727            }
728    
729            /**
730            * Returns all the social activity limits.
731            *
732            * @return the social activity limits
733            */
734            public static java.util.List<com.liferay.portlet.social.model.SocialActivityLimit> findAll() {
735                    return getPersistence().findAll();
736            }
737    
738            /**
739            * Returns a range of all the social activity limits.
740            *
741            * <p>
742            * 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.portlet.social.model.impl.SocialActivityLimitModelImpl}. 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.
743            * </p>
744            *
745            * @param start the lower bound of the range of social activity limits
746            * @param end the upper bound of the range of social activity limits (not inclusive)
747            * @return the range of social activity limits
748            */
749            public static java.util.List<com.liferay.portlet.social.model.SocialActivityLimit> findAll(
750                    int start, int end) {
751                    return getPersistence().findAll(start, end);
752            }
753    
754            /**
755            * Returns an ordered range of all the social activity limits.
756            *
757            * <p>
758            * 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.portlet.social.model.impl.SocialActivityLimitModelImpl}. 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.
759            * </p>
760            *
761            * @param start the lower bound of the range of social activity limits
762            * @param end the upper bound of the range of social activity limits (not inclusive)
763            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
764            * @return the ordered range of social activity limits
765            */
766            public static java.util.List<com.liferay.portlet.social.model.SocialActivityLimit> findAll(
767                    int start, int end,
768                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.social.model.SocialActivityLimit> orderByComparator) {
769                    return getPersistence().findAll(start, end, orderByComparator);
770            }
771    
772            /**
773            * Removes all the social activity limits from the database.
774            */
775            public static void removeAll() {
776                    getPersistence().removeAll();
777            }
778    
779            /**
780            * Returns the number of social activity limits.
781            *
782            * @return the number of social activity limits
783            */
784            public static int countAll() {
785                    return getPersistence().countAll();
786            }
787    
788            public static SocialActivityLimitPersistence getPersistence() {
789                    if (_persistence == null) {
790                            _persistence = (SocialActivityLimitPersistence)PortalBeanLocatorUtil.locate(SocialActivityLimitPersistence.class.getName());
791    
792                            ReferenceRegistry.registerReference(SocialActivityLimitUtil.class,
793                                    "_persistence");
794                    }
795    
796                    return _persistence;
797            }
798    
799            /**
800             * @deprecated As of 6.2.0
801             */
802            @Deprecated
803            public void setPersistence(SocialActivityLimitPersistence persistence) {
804            }
805    
806            private static SocialActivityLimitPersistence _persistence;
807    }