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.SocialActivityAchievement;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the social activity achievement service. This utility wraps {@link SocialActivityAchievementPersistenceImpl} 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 SocialActivityAchievementPersistence
037     * @see SocialActivityAchievementPersistenceImpl
038     * @generated
039     */
040    public class SocialActivityAchievementUtil {
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(
058                    SocialActivityAchievement socialActivityAchievement) {
059                    getPersistence().clearCache(socialActivityAchievement);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
064             */
065            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
066                    throws SystemException {
067                    return getPersistence().countWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
072             */
073            public static List<SocialActivityAchievement> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery) throws SystemException {
075                    return getPersistence().findWithDynamicQuery(dynamicQuery);
076            }
077    
078            /**
079             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
080             */
081            public static List<SocialActivityAchievement> findWithDynamicQuery(
082                    DynamicQuery dynamicQuery, int start, int end)
083                    throws SystemException {
084                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
085            }
086    
087            /**
088             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
089             */
090            public static List<SocialActivityAchievement> findWithDynamicQuery(
091                    DynamicQuery dynamicQuery, int start, int end,
092                    OrderByComparator orderByComparator) throws SystemException {
093                    return getPersistence()
094                                       .findWithDynamicQuery(dynamicQuery, start, end,
095                            orderByComparator);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
100             */
101            public static SocialActivityAchievement update(
102                    SocialActivityAchievement socialActivityAchievement, boolean merge)
103                    throws SystemException {
104                    return getPersistence().update(socialActivityAchievement, merge);
105            }
106    
107            /**
108             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
109             */
110            public static SocialActivityAchievement update(
111                    SocialActivityAchievement socialActivityAchievement, boolean merge,
112                    ServiceContext serviceContext) throws SystemException {
113                    return getPersistence()
114                                       .update(socialActivityAchievement, merge, serviceContext);
115            }
116    
117            /**
118            * Caches the social activity achievement in the entity cache if it is enabled.
119            *
120            * @param socialActivityAchievement the social activity achievement
121            */
122            public static void cacheResult(
123                    com.liferay.portlet.social.model.SocialActivityAchievement socialActivityAchievement) {
124                    getPersistence().cacheResult(socialActivityAchievement);
125            }
126    
127            /**
128            * Caches the social activity achievements in the entity cache if it is enabled.
129            *
130            * @param socialActivityAchievements the social activity achievements
131            */
132            public static void cacheResult(
133                    java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> socialActivityAchievements) {
134                    getPersistence().cacheResult(socialActivityAchievements);
135            }
136    
137            /**
138            * Creates a new social activity achievement with the primary key. Does not add the social activity achievement to the database.
139            *
140            * @param activityAchievementId the primary key for the new social activity achievement
141            * @return the new social activity achievement
142            */
143            public static com.liferay.portlet.social.model.SocialActivityAchievement create(
144                    long activityAchievementId) {
145                    return getPersistence().create(activityAchievementId);
146            }
147    
148            /**
149            * Removes the social activity achievement with the primary key from the database. Also notifies the appropriate model listeners.
150            *
151            * @param activityAchievementId the primary key of the social activity achievement
152            * @return the social activity achievement that was removed
153            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found
154            * @throws SystemException if a system exception occurred
155            */
156            public static com.liferay.portlet.social.model.SocialActivityAchievement remove(
157                    long activityAchievementId)
158                    throws com.liferay.portal.kernel.exception.SystemException,
159                            com.liferay.portlet.social.NoSuchActivityAchievementException {
160                    return getPersistence().remove(activityAchievementId);
161            }
162    
163            public static com.liferay.portlet.social.model.SocialActivityAchievement updateImpl(
164                    com.liferay.portlet.social.model.SocialActivityAchievement socialActivityAchievement,
165                    boolean merge)
166                    throws com.liferay.portal.kernel.exception.SystemException {
167                    return getPersistence().updateImpl(socialActivityAchievement, merge);
168            }
169    
170            /**
171            * Returns the social activity achievement with the primary key or throws a {@link com.liferay.portlet.social.NoSuchActivityAchievementException} if it could not be found.
172            *
173            * @param activityAchievementId the primary key of the social activity achievement
174            * @return the social activity achievement
175            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found
176            * @throws SystemException if a system exception occurred
177            */
178            public static com.liferay.portlet.social.model.SocialActivityAchievement findByPrimaryKey(
179                    long activityAchievementId)
180                    throws com.liferay.portal.kernel.exception.SystemException,
181                            com.liferay.portlet.social.NoSuchActivityAchievementException {
182                    return getPersistence().findByPrimaryKey(activityAchievementId);
183            }
184    
185            /**
186            * Returns the social activity achievement with the primary key or returns <code>null</code> if it could not be found.
187            *
188            * @param activityAchievementId the primary key of the social activity achievement
189            * @return the social activity achievement, or <code>null</code> if a social activity achievement with the primary key could not be found
190            * @throws SystemException if a system exception occurred
191            */
192            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByPrimaryKey(
193                    long activityAchievementId)
194                    throws com.liferay.portal.kernel.exception.SystemException {
195                    return getPersistence().fetchByPrimaryKey(activityAchievementId);
196            }
197    
198            /**
199            * Returns all the social activity achievements where groupId = &#63;.
200            *
201            * @param groupId the group ID
202            * @return the matching social activity achievements
203            * @throws SystemException if a system exception occurred
204            */
205            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByGroupId(
206                    long groupId)
207                    throws com.liferay.portal.kernel.exception.SystemException {
208                    return getPersistence().findByGroupId(groupId);
209            }
210    
211            /**
212            * Returns a range of all the social activity achievements where groupId = &#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 groupId the group ID
219            * @param start the lower bound of the range of social activity achievements
220            * @param end the upper bound of the range of social activity achievements (not inclusive)
221            * @return the range of matching social activity achievements
222            * @throws SystemException if a system exception occurred
223            */
224            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByGroupId(
225                    long groupId, int start, int end)
226                    throws com.liferay.portal.kernel.exception.SystemException {
227                    return getPersistence().findByGroupId(groupId, start, end);
228            }
229    
230            /**
231            * Returns an ordered range of all the social activity achievements where groupId = &#63;.
232            *
233            * <p>
234            * 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.
235            * </p>
236            *
237            * @param groupId the group ID
238            * @param start the lower bound of the range of social activity achievements
239            * @param end the upper bound of the range of social activity achievements (not inclusive)
240            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
241            * @return the ordered range of matching social activity achievements
242            * @throws SystemException if a system exception occurred
243            */
244            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByGroupId(
245                    long groupId, int start, int end,
246                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
247                    throws com.liferay.portal.kernel.exception.SystemException {
248                    return getPersistence()
249                                       .findByGroupId(groupId, start, end, orderByComparator);
250            }
251    
252            /**
253            * Returns the first social activity achievement in the ordered set where groupId = &#63;.
254            *
255            * @param groupId the group ID
256            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
257            * @return the first matching social activity achievement
258            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
259            * @throws SystemException if a system exception occurred
260            */
261            public static com.liferay.portlet.social.model.SocialActivityAchievement findByGroupId_First(
262                    long groupId,
263                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
264                    throws com.liferay.portal.kernel.exception.SystemException,
265                            com.liferay.portlet.social.NoSuchActivityAchievementException {
266                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
267            }
268    
269            /**
270            * Returns the first social activity achievement in the ordered set where groupId = &#63;.
271            *
272            * @param groupId the group ID
273            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
274            * @return the first matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
275            * @throws SystemException if a system exception occurred
276            */
277            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByGroupId_First(
278                    long groupId,
279                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
280                    throws com.liferay.portal.kernel.exception.SystemException {
281                    return getPersistence().fetchByGroupId_First(groupId, orderByComparator);
282            }
283    
284            /**
285            * Returns the last social activity achievement in the ordered set where groupId = &#63;.
286            *
287            * @param groupId the group ID
288            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
289            * @return the last matching social activity achievement
290            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
291            * @throws SystemException if a system exception occurred
292            */
293            public static com.liferay.portlet.social.model.SocialActivityAchievement findByGroupId_Last(
294                    long groupId,
295                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
296                    throws com.liferay.portal.kernel.exception.SystemException,
297                            com.liferay.portlet.social.NoSuchActivityAchievementException {
298                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
299            }
300    
301            /**
302            * Returns the last social activity achievement in the ordered set where groupId = &#63;.
303            *
304            * @param groupId the group ID
305            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
306            * @return the last matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
307            * @throws SystemException if a system exception occurred
308            */
309            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByGroupId_Last(
310                    long groupId,
311                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
312                    throws com.liferay.portal.kernel.exception.SystemException {
313                    return getPersistence().fetchByGroupId_Last(groupId, orderByComparator);
314            }
315    
316            /**
317            * Returns the social activity achievements before and after the current social activity achievement in the ordered set where groupId = &#63;.
318            *
319            * @param activityAchievementId the primary key of the current social activity achievement
320            * @param groupId the group ID
321            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
322            * @return the previous, current, and next social activity achievement
323            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found
324            * @throws SystemException if a system exception occurred
325            */
326            public static com.liferay.portlet.social.model.SocialActivityAchievement[] findByGroupId_PrevAndNext(
327                    long activityAchievementId, long groupId,
328                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
329                    throws com.liferay.portal.kernel.exception.SystemException,
330                            com.liferay.portlet.social.NoSuchActivityAchievementException {
331                    return getPersistence()
332                                       .findByGroupId_PrevAndNext(activityAchievementId, groupId,
333                            orderByComparator);
334            }
335    
336            /**
337            * Returns all the social activity achievements where groupId = &#63; and userId = &#63;.
338            *
339            * @param groupId the group ID
340            * @param userId the user ID
341            * @return the matching social activity achievements
342            * @throws SystemException if a system exception occurred
343            */
344            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_U(
345                    long groupId, long userId)
346                    throws com.liferay.portal.kernel.exception.SystemException {
347                    return getPersistence().findByG_U(groupId, userId);
348            }
349    
350            /**
351            * Returns a range of all the social activity achievements where groupId = &#63; and userId = &#63;.
352            *
353            * <p>
354            * 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.
355            * </p>
356            *
357            * @param groupId the group ID
358            * @param userId the user ID
359            * @param start the lower bound of the range of social activity achievements
360            * @param end the upper bound of the range of social activity achievements (not inclusive)
361            * @return the range of matching social activity achievements
362            * @throws SystemException if a system exception occurred
363            */
364            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_U(
365                    long groupId, long userId, int start, int end)
366                    throws com.liferay.portal.kernel.exception.SystemException {
367                    return getPersistence().findByG_U(groupId, userId, start, end);
368            }
369    
370            /**
371            * Returns an ordered range of all the social activity achievements where groupId = &#63; and userId = &#63;.
372            *
373            * <p>
374            * 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.
375            * </p>
376            *
377            * @param groupId the group ID
378            * @param userId the user ID
379            * @param start the lower bound of the range of social activity achievements
380            * @param end the upper bound of the range of social activity achievements (not inclusive)
381            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
382            * @return the ordered range of matching social activity achievements
383            * @throws SystemException if a system exception occurred
384            */
385            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_U(
386                    long groupId, long userId, int start, int end,
387                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
388                    throws com.liferay.portal.kernel.exception.SystemException {
389                    return getPersistence()
390                                       .findByG_U(groupId, userId, start, end, orderByComparator);
391            }
392    
393            /**
394            * Returns the first social activity achievement in the ordered set where groupId = &#63; and userId = &#63;.
395            *
396            * @param groupId the group ID
397            * @param userId the user ID
398            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
399            * @return the first matching social activity achievement
400            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
401            * @throws SystemException if a system exception occurred
402            */
403            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_U_First(
404                    long groupId, long userId,
405                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
406                    throws com.liferay.portal.kernel.exception.SystemException,
407                            com.liferay.portlet.social.NoSuchActivityAchievementException {
408                    return getPersistence()
409                                       .findByG_U_First(groupId, userId, orderByComparator);
410            }
411    
412            /**
413            * Returns the first social activity achievement in the ordered set where groupId = &#63; and userId = &#63;.
414            *
415            * @param groupId the group ID
416            * @param userId the user ID
417            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
418            * @return the first matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
419            * @throws SystemException if a system exception occurred
420            */
421            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByG_U_First(
422                    long groupId, long userId,
423                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
424                    throws com.liferay.portal.kernel.exception.SystemException {
425                    return getPersistence()
426                                       .fetchByG_U_First(groupId, userId, orderByComparator);
427            }
428    
429            /**
430            * Returns the last social activity achievement in the ordered set where groupId = &#63; and userId = &#63;.
431            *
432            * @param groupId the group ID
433            * @param userId the user ID
434            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
435            * @return the last matching social activity achievement
436            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
437            * @throws SystemException if a system exception occurred
438            */
439            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_U_Last(
440                    long groupId, long userId,
441                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
442                    throws com.liferay.portal.kernel.exception.SystemException,
443                            com.liferay.portlet.social.NoSuchActivityAchievementException {
444                    return getPersistence()
445                                       .findByG_U_Last(groupId, userId, orderByComparator);
446            }
447    
448            /**
449            * Returns the last social activity achievement in the ordered set where groupId = &#63; and userId = &#63;.
450            *
451            * @param groupId the group ID
452            * @param userId the user ID
453            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
454            * @return the last matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
455            * @throws SystemException if a system exception occurred
456            */
457            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByG_U_Last(
458                    long groupId, long userId,
459                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
460                    throws com.liferay.portal.kernel.exception.SystemException {
461                    return getPersistence()
462                                       .fetchByG_U_Last(groupId, userId, orderByComparator);
463            }
464    
465            /**
466            * Returns the social activity achievements before and after the current social activity achievement in the ordered set where groupId = &#63; and userId = &#63;.
467            *
468            * @param activityAchievementId the primary key of the current social activity achievement
469            * @param groupId the group ID
470            * @param userId the user ID
471            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
472            * @return the previous, current, and next social activity achievement
473            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found
474            * @throws SystemException if a system exception occurred
475            */
476            public static com.liferay.portlet.social.model.SocialActivityAchievement[] findByG_U_PrevAndNext(
477                    long activityAchievementId, long groupId, long userId,
478                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
479                    throws com.liferay.portal.kernel.exception.SystemException,
480                            com.liferay.portlet.social.NoSuchActivityAchievementException {
481                    return getPersistence()
482                                       .findByG_U_PrevAndNext(activityAchievementId, groupId,
483                            userId, orderByComparator);
484            }
485    
486            /**
487            * Returns all the social activity achievements where groupId = &#63; and name = &#63;.
488            *
489            * @param groupId the group ID
490            * @param name the name
491            * @return the matching social activity achievements
492            * @throws SystemException if a system exception occurred
493            */
494            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_N(
495                    long groupId, java.lang.String name)
496                    throws com.liferay.portal.kernel.exception.SystemException {
497                    return getPersistence().findByG_N(groupId, name);
498            }
499    
500            /**
501            * Returns a range of all the social activity achievements where groupId = &#63; and name = &#63;.
502            *
503            * <p>
504            * 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.
505            * </p>
506            *
507            * @param groupId the group ID
508            * @param name the name
509            * @param start the lower bound of the range of social activity achievements
510            * @param end the upper bound of the range of social activity achievements (not inclusive)
511            * @return the range of matching social activity achievements
512            * @throws SystemException if a system exception occurred
513            */
514            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_N(
515                    long groupId, java.lang.String name, int start, int end)
516                    throws com.liferay.portal.kernel.exception.SystemException {
517                    return getPersistence().findByG_N(groupId, name, start, end);
518            }
519    
520            /**
521            * Returns an ordered range of all the social activity achievements where groupId = &#63; and name = &#63;.
522            *
523            * <p>
524            * 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.
525            * </p>
526            *
527            * @param groupId the group ID
528            * @param name the name
529            * @param start the lower bound of the range of social activity achievements
530            * @param end the upper bound of the range of social activity achievements (not inclusive)
531            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
532            * @return the ordered range of matching social activity achievements
533            * @throws SystemException if a system exception occurred
534            */
535            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_N(
536                    long groupId, java.lang.String name, int start, int end,
537                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
538                    throws com.liferay.portal.kernel.exception.SystemException {
539                    return getPersistence()
540                                       .findByG_N(groupId, name, start, end, orderByComparator);
541            }
542    
543            /**
544            * Returns the first social activity achievement in the ordered set where groupId = &#63; and name = &#63;.
545            *
546            * @param groupId the group ID
547            * @param name the name
548            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
549            * @return the first matching social activity achievement
550            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
551            * @throws SystemException if a system exception occurred
552            */
553            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_N_First(
554                    long groupId, java.lang.String name,
555                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
556                    throws com.liferay.portal.kernel.exception.SystemException,
557                            com.liferay.portlet.social.NoSuchActivityAchievementException {
558                    return getPersistence().findByG_N_First(groupId, name, orderByComparator);
559            }
560    
561            /**
562            * Returns the first social activity achievement in the ordered set where groupId = &#63; and name = &#63;.
563            *
564            * @param groupId the group ID
565            * @param name the name
566            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
567            * @return the first matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
568            * @throws SystemException if a system exception occurred
569            */
570            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByG_N_First(
571                    long groupId, java.lang.String name,
572                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
573                    throws com.liferay.portal.kernel.exception.SystemException {
574                    return getPersistence()
575                                       .fetchByG_N_First(groupId, name, orderByComparator);
576            }
577    
578            /**
579            * Returns the last social activity achievement in the ordered set where groupId = &#63; and name = &#63;.
580            *
581            * @param groupId the group ID
582            * @param name the name
583            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
584            * @return the last matching social activity achievement
585            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
586            * @throws SystemException if a system exception occurred
587            */
588            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_N_Last(
589                    long groupId, java.lang.String name,
590                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
591                    throws com.liferay.portal.kernel.exception.SystemException,
592                            com.liferay.portlet.social.NoSuchActivityAchievementException {
593                    return getPersistence().findByG_N_Last(groupId, name, orderByComparator);
594            }
595    
596            /**
597            * Returns the last social activity achievement in the ordered set where groupId = &#63; and name = &#63;.
598            *
599            * @param groupId the group ID
600            * @param name the name
601            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
602            * @return the last matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
603            * @throws SystemException if a system exception occurred
604            */
605            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByG_N_Last(
606                    long groupId, java.lang.String name,
607                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
608                    throws com.liferay.portal.kernel.exception.SystemException {
609                    return getPersistence().fetchByG_N_Last(groupId, name, orderByComparator);
610            }
611    
612            /**
613            * Returns the social activity achievements before and after the current social activity achievement in the ordered set where groupId = &#63; and name = &#63;.
614            *
615            * @param activityAchievementId the primary key of the current social activity achievement
616            * @param groupId the group ID
617            * @param name the name
618            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
619            * @return the previous, current, and next social activity achievement
620            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found
621            * @throws SystemException if a system exception occurred
622            */
623            public static com.liferay.portlet.social.model.SocialActivityAchievement[] findByG_N_PrevAndNext(
624                    long activityAchievementId, long groupId, java.lang.String name,
625                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
626                    throws com.liferay.portal.kernel.exception.SystemException,
627                            com.liferay.portlet.social.NoSuchActivityAchievementException {
628                    return getPersistence()
629                                       .findByG_N_PrevAndNext(activityAchievementId, groupId, name,
630                            orderByComparator);
631            }
632    
633            /**
634            * Returns all the social activity achievements where groupId = &#63; and firstInGroup = &#63;.
635            *
636            * @param groupId the group ID
637            * @param firstInGroup the first in group
638            * @return the matching social activity achievements
639            * @throws SystemException if a system exception occurred
640            */
641            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_F(
642                    long groupId, boolean firstInGroup)
643                    throws com.liferay.portal.kernel.exception.SystemException {
644                    return getPersistence().findByG_F(groupId, firstInGroup);
645            }
646    
647            /**
648            * Returns a range of all the social activity achievements where groupId = &#63; and firstInGroup = &#63;.
649            *
650            * <p>
651            * 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.
652            * </p>
653            *
654            * @param groupId the group ID
655            * @param firstInGroup the first in group
656            * @param start the lower bound of the range of social activity achievements
657            * @param end the upper bound of the range of social activity achievements (not inclusive)
658            * @return the range of matching social activity achievements
659            * @throws SystemException if a system exception occurred
660            */
661            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_F(
662                    long groupId, boolean firstInGroup, int start, int end)
663                    throws com.liferay.portal.kernel.exception.SystemException {
664                    return getPersistence().findByG_F(groupId, firstInGroup, start, end);
665            }
666    
667            /**
668            * Returns an ordered range of all the social activity achievements where groupId = &#63; and firstInGroup = &#63;.
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 groupId the group ID
675            * @param firstInGroup the first in group
676            * @param start the lower bound of the range of social activity achievements
677            * @param end the upper bound of the range of social activity achievements (not inclusive)
678            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
679            * @return the ordered range of matching social activity achievements
680            * @throws SystemException if a system exception occurred
681            */
682            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_F(
683                    long groupId, boolean firstInGroup, int start, int end,
684                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
685                    throws com.liferay.portal.kernel.exception.SystemException {
686                    return getPersistence()
687                                       .findByG_F(groupId, firstInGroup, start, end,
688                            orderByComparator);
689            }
690    
691            /**
692            * Returns the first social activity achievement in the ordered set where groupId = &#63; and firstInGroup = &#63;.
693            *
694            * @param groupId the group ID
695            * @param firstInGroup the first in group
696            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
697            * @return the first matching social activity achievement
698            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
699            * @throws SystemException if a system exception occurred
700            */
701            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_F_First(
702                    long groupId, boolean firstInGroup,
703                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
704                    throws com.liferay.portal.kernel.exception.SystemException,
705                            com.liferay.portlet.social.NoSuchActivityAchievementException {
706                    return getPersistence()
707                                       .findByG_F_First(groupId, firstInGroup, orderByComparator);
708            }
709    
710            /**
711            * Returns the first social activity achievement in the ordered set where groupId = &#63; and firstInGroup = &#63;.
712            *
713            * @param groupId the group ID
714            * @param firstInGroup the first in group
715            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
716            * @return the first matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
717            * @throws SystemException if a system exception occurred
718            */
719            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByG_F_First(
720                    long groupId, boolean firstInGroup,
721                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
722                    throws com.liferay.portal.kernel.exception.SystemException {
723                    return getPersistence()
724                                       .fetchByG_F_First(groupId, firstInGroup, orderByComparator);
725            }
726    
727            /**
728            * Returns the last social activity achievement in the ordered set where groupId = &#63; and firstInGroup = &#63;.
729            *
730            * @param groupId the group ID
731            * @param firstInGroup the first in group
732            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
733            * @return the last matching social activity achievement
734            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
735            * @throws SystemException if a system exception occurred
736            */
737            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_F_Last(
738                    long groupId, boolean firstInGroup,
739                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
740                    throws com.liferay.portal.kernel.exception.SystemException,
741                            com.liferay.portlet.social.NoSuchActivityAchievementException {
742                    return getPersistence()
743                                       .findByG_F_Last(groupId, firstInGroup, orderByComparator);
744            }
745    
746            /**
747            * Returns the last social activity achievement in the ordered set where groupId = &#63; and firstInGroup = &#63;.
748            *
749            * @param groupId the group ID
750            * @param firstInGroup the first in group
751            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
752            * @return the last matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
753            * @throws SystemException if a system exception occurred
754            */
755            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByG_F_Last(
756                    long groupId, boolean firstInGroup,
757                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
758                    throws com.liferay.portal.kernel.exception.SystemException {
759                    return getPersistence()
760                                       .fetchByG_F_Last(groupId, firstInGroup, orderByComparator);
761            }
762    
763            /**
764            * Returns the social activity achievements before and after the current social activity achievement in the ordered set where groupId = &#63; and firstInGroup = &#63;.
765            *
766            * @param activityAchievementId the primary key of the current social activity achievement
767            * @param groupId the group ID
768            * @param firstInGroup the first in group
769            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
770            * @return the previous, current, and next social activity achievement
771            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found
772            * @throws SystemException if a system exception occurred
773            */
774            public static com.liferay.portlet.social.model.SocialActivityAchievement[] findByG_F_PrevAndNext(
775                    long activityAchievementId, long groupId, boolean firstInGroup,
776                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
777                    throws com.liferay.portal.kernel.exception.SystemException,
778                            com.liferay.portlet.social.NoSuchActivityAchievementException {
779                    return getPersistence()
780                                       .findByG_F_PrevAndNext(activityAchievementId, groupId,
781                            firstInGroup, orderByComparator);
782            }
783    
784            /**
785            * Returns the social activity achievement where groupId = &#63; and userId = &#63; and name = &#63; or throws a {@link com.liferay.portlet.social.NoSuchActivityAchievementException} if it could not be found.
786            *
787            * @param groupId the group ID
788            * @param userId the user ID
789            * @param name the name
790            * @return the matching social activity achievement
791            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
792            * @throws SystemException if a system exception occurred
793            */
794            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_U_N(
795                    long groupId, long userId, java.lang.String name)
796                    throws com.liferay.portal.kernel.exception.SystemException,
797                            com.liferay.portlet.social.NoSuchActivityAchievementException {
798                    return getPersistence().findByG_U_N(groupId, userId, name);
799            }
800    
801            /**
802            * Returns the social activity achievement where groupId = &#63; and userId = &#63; and name = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
803            *
804            * @param groupId the group ID
805            * @param userId the user ID
806            * @param name the name
807            * @return the matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
808            * @throws SystemException if a system exception occurred
809            */
810            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByG_U_N(
811                    long groupId, long userId, java.lang.String name)
812                    throws com.liferay.portal.kernel.exception.SystemException {
813                    return getPersistence().fetchByG_U_N(groupId, userId, name);
814            }
815    
816            /**
817            * Returns the social activity achievement where groupId = &#63; and userId = &#63; and name = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
818            *
819            * @param groupId the group ID
820            * @param userId the user ID
821            * @param name the name
822            * @param retrieveFromCache whether to use the finder cache
823            * @return the matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
824            * @throws SystemException if a system exception occurred
825            */
826            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByG_U_N(
827                    long groupId, long userId, java.lang.String name,
828                    boolean retrieveFromCache)
829                    throws com.liferay.portal.kernel.exception.SystemException {
830                    return getPersistence()
831                                       .fetchByG_U_N(groupId, userId, name, retrieveFromCache);
832            }
833    
834            /**
835            * Returns all the social activity achievements where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
836            *
837            * @param groupId the group ID
838            * @param userId the user ID
839            * @param firstInGroup the first in group
840            * @return the matching social activity achievements
841            * @throws SystemException if a system exception occurred
842            */
843            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_U_F(
844                    long groupId, long userId, boolean firstInGroup)
845                    throws com.liferay.portal.kernel.exception.SystemException {
846                    return getPersistence().findByG_U_F(groupId, userId, firstInGroup);
847            }
848    
849            /**
850            * Returns a range of all the social activity achievements where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
851            *
852            * <p>
853            * 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.
854            * </p>
855            *
856            * @param groupId the group ID
857            * @param userId the user ID
858            * @param firstInGroup the first in group
859            * @param start the lower bound of the range of social activity achievements
860            * @param end the upper bound of the range of social activity achievements (not inclusive)
861            * @return the range of matching social activity achievements
862            * @throws SystemException if a system exception occurred
863            */
864            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_U_F(
865                    long groupId, long userId, boolean firstInGroup, int start, int end)
866                    throws com.liferay.portal.kernel.exception.SystemException {
867                    return getPersistence()
868                                       .findByG_U_F(groupId, userId, firstInGroup, start, end);
869            }
870    
871            /**
872            * Returns an ordered range of all the social activity achievements where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
873            *
874            * <p>
875            * 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.
876            * </p>
877            *
878            * @param groupId the group ID
879            * @param userId the user ID
880            * @param firstInGroup the first in group
881            * @param start the lower bound of the range of social activity achievements
882            * @param end the upper bound of the range of social activity achievements (not inclusive)
883            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
884            * @return the ordered range of matching social activity achievements
885            * @throws SystemException if a system exception occurred
886            */
887            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_U_F(
888                    long groupId, long userId, boolean firstInGroup, int start, int end,
889                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
890                    throws com.liferay.portal.kernel.exception.SystemException {
891                    return getPersistence()
892                                       .findByG_U_F(groupId, userId, firstInGroup, start, end,
893                            orderByComparator);
894            }
895    
896            /**
897            * Returns the first social activity achievement in the ordered set where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
898            *
899            * @param groupId the group ID
900            * @param userId the user ID
901            * @param firstInGroup the first in group
902            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
903            * @return the first matching social activity achievement
904            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
905            * @throws SystemException if a system exception occurred
906            */
907            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_U_F_First(
908                    long groupId, long userId, boolean firstInGroup,
909                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
910                    throws com.liferay.portal.kernel.exception.SystemException,
911                            com.liferay.portlet.social.NoSuchActivityAchievementException {
912                    return getPersistence()
913                                       .findByG_U_F_First(groupId, userId, firstInGroup,
914                            orderByComparator);
915            }
916    
917            /**
918            * Returns the first social activity achievement in the ordered set where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
919            *
920            * @param groupId the group ID
921            * @param userId the user ID
922            * @param firstInGroup the first in group
923            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
924            * @return the first matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
925            * @throws SystemException if a system exception occurred
926            */
927            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByG_U_F_First(
928                    long groupId, long userId, boolean firstInGroup,
929                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
930                    throws com.liferay.portal.kernel.exception.SystemException {
931                    return getPersistence()
932                                       .fetchByG_U_F_First(groupId, userId, firstInGroup,
933                            orderByComparator);
934            }
935    
936            /**
937            * Returns the last social activity achievement in the ordered set where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
938            *
939            * @param groupId the group ID
940            * @param userId the user ID
941            * @param firstInGroup the first in group
942            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
943            * @return the last matching social activity achievement
944            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
945            * @throws SystemException if a system exception occurred
946            */
947            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_U_F_Last(
948                    long groupId, long userId, boolean firstInGroup,
949                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
950                    throws com.liferay.portal.kernel.exception.SystemException,
951                            com.liferay.portlet.social.NoSuchActivityAchievementException {
952                    return getPersistence()
953                                       .findByG_U_F_Last(groupId, userId, firstInGroup,
954                            orderByComparator);
955            }
956    
957            /**
958            * Returns the last social activity achievement in the ordered set where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
959            *
960            * @param groupId the group ID
961            * @param userId the user ID
962            * @param firstInGroup the first in group
963            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
964            * @return the last matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
965            * @throws SystemException if a system exception occurred
966            */
967            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByG_U_F_Last(
968                    long groupId, long userId, boolean firstInGroup,
969                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
970                    throws com.liferay.portal.kernel.exception.SystemException {
971                    return getPersistence()
972                                       .fetchByG_U_F_Last(groupId, userId, firstInGroup,
973                            orderByComparator);
974            }
975    
976            /**
977            * Returns the social activity achievements before and after the current social activity achievement in the ordered set where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
978            *
979            * @param activityAchievementId the primary key of the current social activity achievement
980            * @param groupId the group ID
981            * @param userId the user ID
982            * @param firstInGroup the first in group
983            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
984            * @return the previous, current, and next social activity achievement
985            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found
986            * @throws SystemException if a system exception occurred
987            */
988            public static com.liferay.portlet.social.model.SocialActivityAchievement[] findByG_U_F_PrevAndNext(
989                    long activityAchievementId, long groupId, long userId,
990                    boolean firstInGroup,
991                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
992                    throws com.liferay.portal.kernel.exception.SystemException,
993                            com.liferay.portlet.social.NoSuchActivityAchievementException {
994                    return getPersistence()
995                                       .findByG_U_F_PrevAndNext(activityAchievementId, groupId,
996                            userId, firstInGroup, orderByComparator);
997            }
998    
999            /**
1000            * Returns all the social activity achievements.
1001            *
1002            * @return the social activity achievements
1003            * @throws SystemException if a system exception occurred
1004            */
1005            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findAll()
1006                    throws com.liferay.portal.kernel.exception.SystemException {
1007                    return getPersistence().findAll();
1008            }
1009    
1010            /**
1011            * Returns a range of all the social activity achievements.
1012            *
1013            * <p>
1014            * 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.
1015            * </p>
1016            *
1017            * @param start the lower bound of the range of social activity achievements
1018            * @param end the upper bound of the range of social activity achievements (not inclusive)
1019            * @return the range of social activity achievements
1020            * @throws SystemException if a system exception occurred
1021            */
1022            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findAll(
1023                    int start, int end)
1024                    throws com.liferay.portal.kernel.exception.SystemException {
1025                    return getPersistence().findAll(start, end);
1026            }
1027    
1028            /**
1029            * Returns an ordered range of all the social activity achievements.
1030            *
1031            * <p>
1032            * 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.
1033            * </p>
1034            *
1035            * @param start the lower bound of the range of social activity achievements
1036            * @param end the upper bound of the range of social activity achievements (not inclusive)
1037            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1038            * @return the ordered range of social activity achievements
1039            * @throws SystemException if a system exception occurred
1040            */
1041            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findAll(
1042                    int start, int end,
1043                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1044                    throws com.liferay.portal.kernel.exception.SystemException {
1045                    return getPersistence().findAll(start, end, orderByComparator);
1046            }
1047    
1048            /**
1049            * Removes all the social activity achievements where groupId = &#63; from the database.
1050            *
1051            * @param groupId the group ID
1052            * @throws SystemException if a system exception occurred
1053            */
1054            public static void removeByGroupId(long groupId)
1055                    throws com.liferay.portal.kernel.exception.SystemException {
1056                    getPersistence().removeByGroupId(groupId);
1057            }
1058    
1059            /**
1060            * Removes all the social activity achievements where groupId = &#63; and userId = &#63; from the database.
1061            *
1062            * @param groupId the group ID
1063            * @param userId the user ID
1064            * @throws SystemException if a system exception occurred
1065            */
1066            public static void removeByG_U(long groupId, long userId)
1067                    throws com.liferay.portal.kernel.exception.SystemException {
1068                    getPersistence().removeByG_U(groupId, userId);
1069            }
1070    
1071            /**
1072            * Removes all the social activity achievements where groupId = &#63; and name = &#63; from the database.
1073            *
1074            * @param groupId the group ID
1075            * @param name the name
1076            * @throws SystemException if a system exception occurred
1077            */
1078            public static void removeByG_N(long groupId, java.lang.String name)
1079                    throws com.liferay.portal.kernel.exception.SystemException {
1080                    getPersistence().removeByG_N(groupId, name);
1081            }
1082    
1083            /**
1084            * Removes all the social activity achievements where groupId = &#63; and firstInGroup = &#63; from the database.
1085            *
1086            * @param groupId the group ID
1087            * @param firstInGroup the first in group
1088            * @throws SystemException if a system exception occurred
1089            */
1090            public static void removeByG_F(long groupId, boolean firstInGroup)
1091                    throws com.liferay.portal.kernel.exception.SystemException {
1092                    getPersistence().removeByG_F(groupId, firstInGroup);
1093            }
1094    
1095            /**
1096            * Removes the social activity achievement where groupId = &#63; and userId = &#63; and name = &#63; from the database.
1097            *
1098            * @param groupId the group ID
1099            * @param userId the user ID
1100            * @param name the name
1101            * @return the social activity achievement that was removed
1102            * @throws SystemException if a system exception occurred
1103            */
1104            public static com.liferay.portlet.social.model.SocialActivityAchievement removeByG_U_N(
1105                    long groupId, long userId, java.lang.String name)
1106                    throws com.liferay.portal.kernel.exception.SystemException,
1107                            com.liferay.portlet.social.NoSuchActivityAchievementException {
1108                    return getPersistence().removeByG_U_N(groupId, userId, name);
1109            }
1110    
1111            /**
1112            * Removes all the social activity achievements where groupId = &#63; and userId = &#63; and firstInGroup = &#63; from the database.
1113            *
1114            * @param groupId the group ID
1115            * @param userId the user ID
1116            * @param firstInGroup the first in group
1117            * @throws SystemException if a system exception occurred
1118            */
1119            public static void removeByG_U_F(long groupId, long userId,
1120                    boolean firstInGroup)
1121                    throws com.liferay.portal.kernel.exception.SystemException {
1122                    getPersistence().removeByG_U_F(groupId, userId, firstInGroup);
1123            }
1124    
1125            /**
1126            * Removes all the social activity achievements from the database.
1127            *
1128            * @throws SystemException if a system exception occurred
1129            */
1130            public static void removeAll()
1131                    throws com.liferay.portal.kernel.exception.SystemException {
1132                    getPersistence().removeAll();
1133            }
1134    
1135            /**
1136            * Returns the number of social activity achievements where groupId = &#63;.
1137            *
1138            * @param groupId the group ID
1139            * @return the number of matching social activity achievements
1140            * @throws SystemException if a system exception occurred
1141            */
1142            public static int countByGroupId(long groupId)
1143                    throws com.liferay.portal.kernel.exception.SystemException {
1144                    return getPersistence().countByGroupId(groupId);
1145            }
1146    
1147            /**
1148            * Returns the number of social activity achievements where groupId = &#63; and userId = &#63;.
1149            *
1150            * @param groupId the group ID
1151            * @param userId the user ID
1152            * @return the number of matching social activity achievements
1153            * @throws SystemException if a system exception occurred
1154            */
1155            public static int countByG_U(long groupId, long userId)
1156                    throws com.liferay.portal.kernel.exception.SystemException {
1157                    return getPersistence().countByG_U(groupId, userId);
1158            }
1159    
1160            /**
1161            * Returns the number of social activity achievements where groupId = &#63; and name = &#63;.
1162            *
1163            * @param groupId the group ID
1164            * @param name the name
1165            * @return the number of matching social activity achievements
1166            * @throws SystemException if a system exception occurred
1167            */
1168            public static int countByG_N(long groupId, java.lang.String name)
1169                    throws com.liferay.portal.kernel.exception.SystemException {
1170                    return getPersistence().countByG_N(groupId, name);
1171            }
1172    
1173            /**
1174            * Returns the number of social activity achievements where groupId = &#63; and firstInGroup = &#63;.
1175            *
1176            * @param groupId the group ID
1177            * @param firstInGroup the first in group
1178            * @return the number of matching social activity achievements
1179            * @throws SystemException if a system exception occurred
1180            */
1181            public static int countByG_F(long groupId, boolean firstInGroup)
1182                    throws com.liferay.portal.kernel.exception.SystemException {
1183                    return getPersistence().countByG_F(groupId, firstInGroup);
1184            }
1185    
1186            /**
1187            * Returns the number of social activity achievements where groupId = &#63; and userId = &#63; and name = &#63;.
1188            *
1189            * @param groupId the group ID
1190            * @param userId the user ID
1191            * @param name the name
1192            * @return the number of matching social activity achievements
1193            * @throws SystemException if a system exception occurred
1194            */
1195            public static int countByG_U_N(long groupId, long userId,
1196                    java.lang.String name)
1197                    throws com.liferay.portal.kernel.exception.SystemException {
1198                    return getPersistence().countByG_U_N(groupId, userId, name);
1199            }
1200    
1201            /**
1202            * Returns the number of social activity achievements where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
1203            *
1204            * @param groupId the group ID
1205            * @param userId the user ID
1206            * @param firstInGroup the first in group
1207            * @return the number of matching social activity achievements
1208            * @throws SystemException if a system exception occurred
1209            */
1210            public static int countByG_U_F(long groupId, long userId,
1211                    boolean firstInGroup)
1212                    throws com.liferay.portal.kernel.exception.SystemException {
1213                    return getPersistence().countByG_U_F(groupId, userId, firstInGroup);
1214            }
1215    
1216            /**
1217            * Returns the number of social activity achievements.
1218            *
1219            * @return the number of social activity achievements
1220            * @throws SystemException if a system exception occurred
1221            */
1222            public static int countAll()
1223                    throws com.liferay.portal.kernel.exception.SystemException {
1224                    return getPersistence().countAll();
1225            }
1226    
1227            public static SocialActivityAchievementPersistence getPersistence() {
1228                    if (_persistence == null) {
1229                            _persistence = (SocialActivityAchievementPersistence)PortalBeanLocatorUtil.locate(SocialActivityAchievementPersistence.class.getName());
1230    
1231                            ReferenceRegistry.registerReference(SocialActivityAchievementUtil.class,
1232                                    "_persistence");
1233                    }
1234    
1235                    return _persistence;
1236            }
1237    
1238            /**
1239             * @deprecated
1240             */
1241            public void setPersistence(SocialActivityAchievementPersistence persistence) {
1242            }
1243    
1244            private static SocialActivityAchievementPersistence _persistence;
1245    }