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