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