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