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