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