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