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