001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.social.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.social.model.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            * <p>
259            * 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.
260            * </p>
261            *
262            * @param classNameId the class name ID
263            * @param classPK the class p k
264            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
265            * @return the first matching social activity counter
266            * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found
267            * @throws SystemException if a system exception occurred
268            */
269            public static com.liferay.portlet.social.model.SocialActivityCounter findByC_C_First(
270                    long classNameId, long classPK,
271                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
272                    throws com.liferay.portal.kernel.exception.SystemException,
273                            com.liferay.portlet.social.NoSuchActivityCounterException {
274                    return getPersistence()
275                                       .findByC_C_First(classNameId, classPK, orderByComparator);
276            }
277    
278            /**
279            * Returns the last social activity counter in the ordered set where classNameId = &#63; and classPK = &#63;.
280            *
281            * <p>
282            * 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.
283            * </p>
284            *
285            * @param classNameId the class name ID
286            * @param classPK the class p k
287            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
288            * @return the last matching social activity counter
289            * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found
290            * @throws SystemException if a system exception occurred
291            */
292            public static com.liferay.portlet.social.model.SocialActivityCounter findByC_C_Last(
293                    long classNameId, long classPK,
294                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
295                    throws com.liferay.portal.kernel.exception.SystemException,
296                            com.liferay.portlet.social.NoSuchActivityCounterException {
297                    return getPersistence()
298                                       .findByC_C_Last(classNameId, classPK, orderByComparator);
299            }
300    
301            /**
302            * Returns the social activity counters before and after the current social activity counter in the ordered set where classNameId = &#63; and classPK = &#63;.
303            *
304            * <p>
305            * 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.
306            * </p>
307            *
308            * @param activityCounterId the primary key of the current social activity counter
309            * @param classNameId the class name ID
310            * @param classPK the class p k
311            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
312            * @return the previous, current, and next social activity counter
313            * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a social activity counter with the primary key could not be found
314            * @throws SystemException if a system exception occurred
315            */
316            public static com.liferay.portlet.social.model.SocialActivityCounter[] findByC_C_PrevAndNext(
317                    long activityCounterId, long classNameId, long classPK,
318                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
319                    throws com.liferay.portal.kernel.exception.SystemException,
320                            com.liferay.portlet.social.NoSuchActivityCounterException {
321                    return getPersistence()
322                                       .findByC_C_PrevAndNext(activityCounterId, classNameId,
323                            classPK, orderByComparator);
324            }
325    
326            /**
327            * Returns all the social activity counters where groupId = &#63; and classNameId = &#63; and classPK = &#63; and ownerType = &#63;.
328            *
329            * @param groupId the group ID
330            * @param classNameId the class name ID
331            * @param classPK the class p k
332            * @param ownerType the owner type
333            * @return the matching social activity counters
334            * @throws SystemException if a system exception occurred
335            */
336            public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findByG_C_C_O(
337                    long groupId, long classNameId, long classPK, int ownerType)
338                    throws com.liferay.portal.kernel.exception.SystemException {
339                    return getPersistence()
340                                       .findByG_C_C_O(groupId, classNameId, classPK, ownerType);
341            }
342    
343            /**
344            * Returns a range of all the social activity counters where groupId = &#63; and classNameId = &#63; and classPK = &#63; and ownerType = &#63;.
345            *
346            * <p>
347            * 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.
348            * </p>
349            *
350            * @param groupId the group ID
351            * @param classNameId the class name ID
352            * @param classPK the class p k
353            * @param ownerType the owner type
354            * @param start the lower bound of the range of social activity counters
355            * @param end the upper bound of the range of social activity counters (not inclusive)
356            * @return the range of matching social activity counters
357            * @throws SystemException if a system exception occurred
358            */
359            public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findByG_C_C_O(
360                    long groupId, long classNameId, long classPK, int ownerType, int start,
361                    int end) throws com.liferay.portal.kernel.exception.SystemException {
362                    return getPersistence()
363                                       .findByG_C_C_O(groupId, classNameId, classPK, ownerType,
364                            start, end);
365            }
366    
367            /**
368            * Returns an ordered range of all the social activity counters where groupId = &#63; and classNameId = &#63; and classPK = &#63; and ownerType = &#63;.
369            *
370            * <p>
371            * 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.
372            * </p>
373            *
374            * @param groupId the group ID
375            * @param classNameId the class name ID
376            * @param classPK the class p k
377            * @param ownerType the owner type
378            * @param start the lower bound of the range of social activity counters
379            * @param end the upper bound of the range of social activity counters (not inclusive)
380            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
381            * @return the ordered range of matching social activity counters
382            * @throws SystemException if a system exception occurred
383            */
384            public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findByG_C_C_O(
385                    long groupId, long classNameId, long classPK, int ownerType, int start,
386                    int end,
387                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
388                    throws com.liferay.portal.kernel.exception.SystemException {
389                    return getPersistence()
390                                       .findByG_C_C_O(groupId, classNameId, classPK, ownerType,
391                            start, end, orderByComparator);
392            }
393    
394            /**
395            * Returns the first social activity counter in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63; and ownerType = &#63;.
396            *
397            * <p>
398            * 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.
399            * </p>
400            *
401            * @param groupId the group ID
402            * @param classNameId the class name ID
403            * @param classPK the class p k
404            * @param ownerType the owner type
405            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
406            * @return the first matching social activity counter
407            * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found
408            * @throws SystemException if a system exception occurred
409            */
410            public static com.liferay.portlet.social.model.SocialActivityCounter findByG_C_C_O_First(
411                    long groupId, long classNameId, long classPK, int ownerType,
412                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
413                    throws com.liferay.portal.kernel.exception.SystemException,
414                            com.liferay.portlet.social.NoSuchActivityCounterException {
415                    return getPersistence()
416                                       .findByG_C_C_O_First(groupId, classNameId, classPK,
417                            ownerType, orderByComparator);
418            }
419    
420            /**
421            * Returns the last social activity counter in the ordered set where groupId = &#63; and classNameId = &#63; and classPK = &#63; and ownerType = &#63;.
422            *
423            * <p>
424            * 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.
425            * </p>
426            *
427            * @param groupId the group ID
428            * @param classNameId the class name ID
429            * @param classPK the class p k
430            * @param ownerType the owner type
431            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
432            * @return the last matching social activity counter
433            * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found
434            * @throws SystemException if a system exception occurred
435            */
436            public static com.liferay.portlet.social.model.SocialActivityCounter findByG_C_C_O_Last(
437                    long groupId, long classNameId, long classPK, int ownerType,
438                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
439                    throws com.liferay.portal.kernel.exception.SystemException,
440                            com.liferay.portlet.social.NoSuchActivityCounterException {
441                    return getPersistence()
442                                       .findByG_C_C_O_Last(groupId, classNameId, classPK,
443                            ownerType, orderByComparator);
444            }
445    
446            /**
447            * 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;.
448            *
449            * <p>
450            * 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.
451            * </p>
452            *
453            * @param activityCounterId the primary key of the current social activity counter
454            * @param groupId the group ID
455            * @param classNameId the class name ID
456            * @param classPK the class p k
457            * @param ownerType the owner type
458            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
459            * @return the previous, current, and next social activity counter
460            * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a social activity counter with the primary key could not be found
461            * @throws SystemException if a system exception occurred
462            */
463            public static com.liferay.portlet.social.model.SocialActivityCounter[] findByG_C_C_O_PrevAndNext(
464                    long activityCounterId, long groupId, long classNameId, long classPK,
465                    int ownerType,
466                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
467                    throws com.liferay.portal.kernel.exception.SystemException,
468                            com.liferay.portlet.social.NoSuchActivityCounterException {
469                    return getPersistence()
470                                       .findByG_C_C_O_PrevAndNext(activityCounterId, groupId,
471                            classNameId, classPK, ownerType, orderByComparator);
472            }
473    
474            /**
475            * 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.
476            *
477            * @param groupId the group ID
478            * @param classNameId the class name ID
479            * @param classPK the class p k
480            * @param name the name
481            * @param ownerType the owner type
482            * @param startPeriod the start period
483            * @return the matching social activity counter
484            * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found
485            * @throws SystemException if a system exception occurred
486            */
487            public static com.liferay.portlet.social.model.SocialActivityCounter findByG_C_C_N_O_S(
488                    long groupId, long classNameId, long classPK, java.lang.String name,
489                    int ownerType, int startPeriod)
490                    throws com.liferay.portal.kernel.exception.SystemException,
491                            com.liferay.portlet.social.NoSuchActivityCounterException {
492                    return getPersistence()
493                                       .findByG_C_C_N_O_S(groupId, classNameId, classPK, name,
494                            ownerType, startPeriod);
495            }
496    
497            /**
498            * 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.
499            *
500            * @param groupId the group ID
501            * @param classNameId the class name ID
502            * @param classPK the class p k
503            * @param name the name
504            * @param ownerType the owner type
505            * @param startPeriod the start period
506            * @return the matching social activity counter, or <code>null</code> if a matching social activity counter could not be found
507            * @throws SystemException if a system exception occurred
508            */
509            public static com.liferay.portlet.social.model.SocialActivityCounter fetchByG_C_C_N_O_S(
510                    long groupId, long classNameId, long classPK, java.lang.String name,
511                    int ownerType, int startPeriod)
512                    throws com.liferay.portal.kernel.exception.SystemException {
513                    return getPersistence()
514                                       .fetchByG_C_C_N_O_S(groupId, classNameId, classPK, name,
515                            ownerType, startPeriod);
516            }
517    
518            /**
519            * 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.
520            *
521            * @param groupId the group ID
522            * @param classNameId the class name ID
523            * @param classPK the class p k
524            * @param name the name
525            * @param ownerType the owner type
526            * @param startPeriod the start period
527            * @param retrieveFromCache whether to use the finder cache
528            * @return the matching social activity counter, or <code>null</code> if a matching social activity counter could not be found
529            * @throws SystemException if a system exception occurred
530            */
531            public static com.liferay.portlet.social.model.SocialActivityCounter fetchByG_C_C_N_O_S(
532                    long groupId, long classNameId, long classPK, java.lang.String name,
533                    int ownerType, int startPeriod, boolean retrieveFromCache)
534                    throws com.liferay.portal.kernel.exception.SystemException {
535                    return getPersistence()
536                                       .fetchByG_C_C_N_O_S(groupId, classNameId, classPK, name,
537                            ownerType, startPeriod, retrieveFromCache);
538            }
539    
540            /**
541            * 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.
542            *
543            * @param groupId the group ID
544            * @param classNameId the class name ID
545            * @param classPK the class p k
546            * @param name the name
547            * @param ownerType the owner type
548            * @param endPeriod the end period
549            * @return the matching social activity counter
550            * @throws com.liferay.portlet.social.NoSuchActivityCounterException if a matching social activity counter could not be found
551            * @throws SystemException if a system exception occurred
552            */
553            public static com.liferay.portlet.social.model.SocialActivityCounter findByG_C_C_N_O_E(
554                    long groupId, long classNameId, long classPK, java.lang.String name,
555                    int ownerType, int endPeriod)
556                    throws com.liferay.portal.kernel.exception.SystemException,
557                            com.liferay.portlet.social.NoSuchActivityCounterException {
558                    return getPersistence()
559                                       .findByG_C_C_N_O_E(groupId, classNameId, classPK, name,
560                            ownerType, endPeriod);
561            }
562    
563            /**
564            * 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.
565            *
566            * @param groupId the group ID
567            * @param classNameId the class name ID
568            * @param classPK the class p k
569            * @param name the name
570            * @param ownerType the owner type
571            * @param endPeriod the end period
572            * @return the matching social activity counter, or <code>null</code> if a matching social activity counter could not be found
573            * @throws SystemException if a system exception occurred
574            */
575            public static com.liferay.portlet.social.model.SocialActivityCounter fetchByG_C_C_N_O_E(
576                    long groupId, long classNameId, long classPK, java.lang.String name,
577                    int ownerType, int endPeriod)
578                    throws com.liferay.portal.kernel.exception.SystemException {
579                    return getPersistence()
580                                       .fetchByG_C_C_N_O_E(groupId, classNameId, classPK, name,
581                            ownerType, endPeriod);
582            }
583    
584            /**
585            * 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.
586            *
587            * @param groupId the group ID
588            * @param classNameId the class name ID
589            * @param classPK the class p k
590            * @param name the name
591            * @param ownerType the owner type
592            * @param endPeriod the end period
593            * @param retrieveFromCache whether to use the finder cache
594            * @return the matching social activity counter, or <code>null</code> if a matching social activity counter could not be found
595            * @throws SystemException if a system exception occurred
596            */
597            public static com.liferay.portlet.social.model.SocialActivityCounter fetchByG_C_C_N_O_E(
598                    long groupId, long classNameId, long classPK, java.lang.String name,
599                    int ownerType, int endPeriod, boolean retrieveFromCache)
600                    throws com.liferay.portal.kernel.exception.SystemException {
601                    return getPersistence()
602                                       .fetchByG_C_C_N_O_E(groupId, classNameId, classPK, name,
603                            ownerType, endPeriod, retrieveFromCache);
604            }
605    
606            /**
607            * Returns all the social activity counters.
608            *
609            * @return the social activity counters
610            * @throws SystemException if a system exception occurred
611            */
612            public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findAll()
613                    throws com.liferay.portal.kernel.exception.SystemException {
614                    return getPersistence().findAll();
615            }
616    
617            /**
618            * Returns a range of all the social activity counters.
619            *
620            * <p>
621            * 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.
622            * </p>
623            *
624            * @param start the lower bound of the range of social activity counters
625            * @param end the upper bound of the range of social activity counters (not inclusive)
626            * @return the range of social activity counters
627            * @throws SystemException if a system exception occurred
628            */
629            public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findAll(
630                    int start, int end)
631                    throws com.liferay.portal.kernel.exception.SystemException {
632                    return getPersistence().findAll(start, end);
633            }
634    
635            /**
636            * Returns an ordered range of all the social activity counters.
637            *
638            * <p>
639            * 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.
640            * </p>
641            *
642            * @param start the lower bound of the range of social activity counters
643            * @param end the upper bound of the range of social activity counters (not inclusive)
644            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
645            * @return the ordered range of social activity counters
646            * @throws SystemException if a system exception occurred
647            */
648            public static java.util.List<com.liferay.portlet.social.model.SocialActivityCounter> findAll(
649                    int start, int end,
650                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
651                    throws com.liferay.portal.kernel.exception.SystemException {
652                    return getPersistence().findAll(start, end, orderByComparator);
653            }
654    
655            /**
656            * Removes all the social activity counters where classNameId = &#63; and classPK = &#63; from the database.
657            *
658            * @param classNameId the class name ID
659            * @param classPK the class p k
660            * @throws SystemException if a system exception occurred
661            */
662            public static void removeByC_C(long classNameId, long classPK)
663                    throws com.liferay.portal.kernel.exception.SystemException {
664                    getPersistence().removeByC_C(classNameId, classPK);
665            }
666    
667            /**
668            * Removes all the social activity counters where groupId = &#63; and classNameId = &#63; and classPK = &#63; and ownerType = &#63; from the database.
669            *
670            * @param groupId the group ID
671            * @param classNameId the class name ID
672            * @param classPK the class p k
673            * @param ownerType the owner type
674            * @throws SystemException if a system exception occurred
675            */
676            public static void removeByG_C_C_O(long groupId, long classNameId,
677                    long classPK, int ownerType)
678                    throws com.liferay.portal.kernel.exception.SystemException {
679                    getPersistence()
680                            .removeByG_C_C_O(groupId, classNameId, classPK, ownerType);
681            }
682    
683            /**
684            * 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.
685            *
686            * @param groupId the group ID
687            * @param classNameId the class name ID
688            * @param classPK the class p k
689            * @param name the name
690            * @param ownerType the owner type
691            * @param startPeriod the start period
692            * @throws SystemException if a system exception occurred
693            */
694            public static void removeByG_C_C_N_O_S(long groupId, long classNameId,
695                    long classPK, java.lang.String name, int ownerType, int startPeriod)
696                    throws com.liferay.portal.kernel.exception.SystemException,
697                            com.liferay.portlet.social.NoSuchActivityCounterException {
698                    getPersistence()
699                            .removeByG_C_C_N_O_S(groupId, classNameId, classPK, name,
700                            ownerType, startPeriod);
701            }
702    
703            /**
704            * 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.
705            *
706            * @param groupId the group ID
707            * @param classNameId the class name ID
708            * @param classPK the class p k
709            * @param name the name
710            * @param ownerType the owner type
711            * @param endPeriod the end period
712            * @throws SystemException if a system exception occurred
713            */
714            public static void removeByG_C_C_N_O_E(long groupId, long classNameId,
715                    long classPK, java.lang.String name, int ownerType, int endPeriod)
716                    throws com.liferay.portal.kernel.exception.SystemException,
717                            com.liferay.portlet.social.NoSuchActivityCounterException {
718                    getPersistence()
719                            .removeByG_C_C_N_O_E(groupId, classNameId, classPK, name,
720                            ownerType, endPeriod);
721            }
722    
723            /**
724            * Removes all the social activity counters from the database.
725            *
726            * @throws SystemException if a system exception occurred
727            */
728            public static void removeAll()
729                    throws com.liferay.portal.kernel.exception.SystemException {
730                    getPersistence().removeAll();
731            }
732    
733            /**
734            * Returns the number of social activity counters where classNameId = &#63; and classPK = &#63;.
735            *
736            * @param classNameId the class name ID
737            * @param classPK the class p k
738            * @return the number of matching social activity counters
739            * @throws SystemException if a system exception occurred
740            */
741            public static int countByC_C(long classNameId, long classPK)
742                    throws com.liferay.portal.kernel.exception.SystemException {
743                    return getPersistence().countByC_C(classNameId, classPK);
744            }
745    
746            /**
747            * Returns the number of social activity counters where groupId = &#63; and classNameId = &#63; and classPK = &#63; and ownerType = &#63;.
748            *
749            * @param groupId the group ID
750            * @param classNameId the class name ID
751            * @param classPK the class p k
752            * @param ownerType the owner type
753            * @return the number of matching social activity counters
754            * @throws SystemException if a system exception occurred
755            */
756            public static int countByG_C_C_O(long groupId, long classNameId,
757                    long classPK, int ownerType)
758                    throws com.liferay.portal.kernel.exception.SystemException {
759                    return getPersistence()
760                                       .countByG_C_C_O(groupId, classNameId, classPK, ownerType);
761            }
762    
763            /**
764            * 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;.
765            *
766            * @param groupId the group ID
767            * @param classNameId the class name ID
768            * @param classPK the class p k
769            * @param name the name
770            * @param ownerType the owner type
771            * @param startPeriod the start period
772            * @return the number of matching social activity counters
773            * @throws SystemException if a system exception occurred
774            */
775            public static int countByG_C_C_N_O_S(long groupId, long classNameId,
776                    long classPK, java.lang.String name, int ownerType, int startPeriod)
777                    throws com.liferay.portal.kernel.exception.SystemException {
778                    return getPersistence()
779                                       .countByG_C_C_N_O_S(groupId, classNameId, classPK, name,
780                            ownerType, startPeriod);
781            }
782    
783            /**
784            * 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;.
785            *
786            * @param groupId the group ID
787            * @param classNameId the class name ID
788            * @param classPK the class p k
789            * @param name the name
790            * @param ownerType the owner type
791            * @param endPeriod the end period
792            * @return the number of matching social activity counters
793            * @throws SystemException if a system exception occurred
794            */
795            public static int countByG_C_C_N_O_E(long groupId, long classNameId,
796                    long classPK, java.lang.String name, int ownerType, int endPeriod)
797                    throws com.liferay.portal.kernel.exception.SystemException {
798                    return getPersistence()
799                                       .countByG_C_C_N_O_E(groupId, classNameId, classPK, name,
800                            ownerType, endPeriod);
801            }
802    
803            /**
804            * Returns the number of social activity counters.
805            *
806            * @return the number of social activity counters
807            * @throws SystemException if a system exception occurred
808            */
809            public static int countAll()
810                    throws com.liferay.portal.kernel.exception.SystemException {
811                    return getPersistence().countAll();
812            }
813    
814            public static SocialActivityCounterPersistence getPersistence() {
815                    if (_persistence == null) {
816                            _persistence = (SocialActivityCounterPersistence)PortalBeanLocatorUtil.locate(SocialActivityCounterPersistence.class.getName());
817    
818                            ReferenceRegistry.registerReference(SocialActivityCounterUtil.class,
819                                    "_persistence");
820                    }
821    
822                    return _persistence;
823            }
824    
825            public void setPersistence(SocialActivityCounterPersistence persistence) {
826                    _persistence = persistence;
827    
828                    ReferenceRegistry.registerReference(SocialActivityCounterUtil.class,
829                            "_persistence");
830            }
831    
832            private static SocialActivityCounterPersistence _persistence;
833    }