001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portlet.social.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.kernel.util.ReferenceRegistry;
022    import com.liferay.portal.service.ServiceContext;
023    
024    import com.liferay.portlet.social.model.SocialActivityAchievement;
025    
026    import java.util.List;
027    
028    /**
029     * The persistence utility for the social activity achievement service. This utility wraps {@link SocialActivityAchievementPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
030     *
031     * <p>
032     * Caching information and settings can be found in <code>portal.properties</code>
033     * </p>
034     *
035     * @author Brian Wing Shun Chan
036     * @see SocialActivityAchievementPersistence
037     * @see SocialActivityAchievementPersistenceImpl
038     * @generated
039     */
040    public class SocialActivityAchievementUtil {
041            /*
042             * NOTE FOR DEVELOPERS:
043             *
044             * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
045             */
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
049             */
050            public static void clearCache() {
051                    getPersistence().clearCache();
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
056             */
057            public static void clearCache(
058                    SocialActivityAchievement socialActivityAchievement) {
059                    getPersistence().clearCache(socialActivityAchievement);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
064             */
065            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
066                    throws SystemException {
067                    return getPersistence().countWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
072             */
073            public static List<SocialActivityAchievement> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery) throws SystemException {
075                    return getPersistence().findWithDynamicQuery(dynamicQuery);
076            }
077    
078            /**
079             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
080             */
081            public static List<SocialActivityAchievement> findWithDynamicQuery(
082                    DynamicQuery dynamicQuery, int start, int end)
083                    throws SystemException {
084                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
085            }
086    
087            /**
088             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
089             */
090            public static List<SocialActivityAchievement> findWithDynamicQuery(
091                    DynamicQuery dynamicQuery, int start, int end,
092                    OrderByComparator orderByComparator) throws SystemException {
093                    return getPersistence()
094                                       .findWithDynamicQuery(dynamicQuery, start, end,
095                            orderByComparator);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
100             */
101            public static SocialActivityAchievement remove(
102                    SocialActivityAchievement socialActivityAchievement)
103                    throws SystemException {
104                    return getPersistence().remove(socialActivityAchievement);
105            }
106    
107            /**
108             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
109             */
110            public static SocialActivityAchievement update(
111                    SocialActivityAchievement socialActivityAchievement, boolean merge)
112                    throws SystemException {
113                    return getPersistence().update(socialActivityAchievement, merge);
114            }
115    
116            /**
117             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
118             */
119            public static SocialActivityAchievement update(
120                    SocialActivityAchievement socialActivityAchievement, boolean merge,
121                    ServiceContext serviceContext) throws SystemException {
122                    return getPersistence()
123                                       .update(socialActivityAchievement, merge, serviceContext);
124            }
125    
126            /**
127            * Caches the social activity achievement in the entity cache if it is enabled.
128            *
129            * @param socialActivityAchievement the social activity achievement
130            */
131            public static void cacheResult(
132                    com.liferay.portlet.social.model.SocialActivityAchievement socialActivityAchievement) {
133                    getPersistence().cacheResult(socialActivityAchievement);
134            }
135    
136            /**
137            * Caches the social activity achievements in the entity cache if it is enabled.
138            *
139            * @param socialActivityAchievements the social activity achievements
140            */
141            public static void cacheResult(
142                    java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> socialActivityAchievements) {
143                    getPersistence().cacheResult(socialActivityAchievements);
144            }
145    
146            /**
147            * Creates a new social activity achievement with the primary key. Does not add the social activity achievement to the database.
148            *
149            * @param activityAchievementId the primary key for the new social activity achievement
150            * @return the new social activity achievement
151            */
152            public static com.liferay.portlet.social.model.SocialActivityAchievement create(
153                    long activityAchievementId) {
154                    return getPersistence().create(activityAchievementId);
155            }
156    
157            /**
158            * Removes the social activity achievement with the primary key from the database. Also notifies the appropriate model listeners.
159            *
160            * @param activityAchievementId the primary key of the social activity achievement
161            * @return the social activity achievement that was removed
162            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found
163            * @throws SystemException if a system exception occurred
164            */
165            public static com.liferay.portlet.social.model.SocialActivityAchievement remove(
166                    long activityAchievementId)
167                    throws com.liferay.portal.kernel.exception.SystemException,
168                            com.liferay.portlet.social.NoSuchActivityAchievementException {
169                    return getPersistence().remove(activityAchievementId);
170            }
171    
172            public static com.liferay.portlet.social.model.SocialActivityAchievement updateImpl(
173                    com.liferay.portlet.social.model.SocialActivityAchievement socialActivityAchievement,
174                    boolean merge)
175                    throws com.liferay.portal.kernel.exception.SystemException {
176                    return getPersistence().updateImpl(socialActivityAchievement, merge);
177            }
178    
179            /**
180            * Returns the social activity achievement with the primary key or throws a {@link com.liferay.portlet.social.NoSuchActivityAchievementException} if it could not be found.
181            *
182            * @param activityAchievementId the primary key of the social activity achievement
183            * @return the social activity achievement
184            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found
185            * @throws SystemException if a system exception occurred
186            */
187            public static com.liferay.portlet.social.model.SocialActivityAchievement findByPrimaryKey(
188                    long activityAchievementId)
189                    throws com.liferay.portal.kernel.exception.SystemException,
190                            com.liferay.portlet.social.NoSuchActivityAchievementException {
191                    return getPersistence().findByPrimaryKey(activityAchievementId);
192            }
193    
194            /**
195            * Returns the social activity achievement with the primary key or returns <code>null</code> if it could not be found.
196            *
197            * @param activityAchievementId the primary key of the social activity achievement
198            * @return the social activity achievement, or <code>null</code> if a social activity achievement with the primary key could not be found
199            * @throws SystemException if a system exception occurred
200            */
201            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByPrimaryKey(
202                    long activityAchievementId)
203                    throws com.liferay.portal.kernel.exception.SystemException {
204                    return getPersistence().fetchByPrimaryKey(activityAchievementId);
205            }
206    
207            /**
208            * Returns all the social activity achievements where groupId = &#63; and userId = &#63;.
209            *
210            * @param groupId the group ID
211            * @param userId the user ID
212            * @return the matching social activity achievements
213            * @throws SystemException if a system exception occurred
214            */
215            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_U(
216                    long groupId, long userId)
217                    throws com.liferay.portal.kernel.exception.SystemException {
218                    return getPersistence().findByG_U(groupId, userId);
219            }
220    
221            /**
222            * Returns a range of all the social activity achievements where groupId = &#63; and userId = &#63;.
223            *
224            * <p>
225            * 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.
226            * </p>
227            *
228            * @param groupId the group ID
229            * @param userId the user ID
230            * @param start the lower bound of the range of social activity achievements
231            * @param end the upper bound of the range of social activity achievements (not inclusive)
232            * @return the range of matching social activity achievements
233            * @throws SystemException if a system exception occurred
234            */
235            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_U(
236                    long groupId, long userId, int start, int end)
237                    throws com.liferay.portal.kernel.exception.SystemException {
238                    return getPersistence().findByG_U(groupId, userId, start, end);
239            }
240    
241            /**
242            * Returns an ordered range of all the social activity achievements where groupId = &#63; and userId = &#63;.
243            *
244            * <p>
245            * 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.
246            * </p>
247            *
248            * @param groupId the group ID
249            * @param userId the user ID
250            * @param start the lower bound of the range of social activity achievements
251            * @param end the upper bound of the range of social activity achievements (not inclusive)
252            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
253            * @return the ordered range of matching social activity achievements
254            * @throws SystemException if a system exception occurred
255            */
256            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_U(
257                    long groupId, long userId, int start, int end,
258                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259                    throws com.liferay.portal.kernel.exception.SystemException {
260                    return getPersistence()
261                                       .findByG_U(groupId, userId, start, end, orderByComparator);
262            }
263    
264            /**
265            * Returns the first social activity achievement in the ordered set where groupId = &#63; and userId = &#63;.
266            *
267            * <p>
268            * 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.
269            * </p>
270            *
271            * @param groupId the group ID
272            * @param userId the user ID
273            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
274            * @return the first matching social activity achievement
275            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
276            * @throws SystemException if a system exception occurred
277            */
278            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_U_First(
279                    long groupId, long userId,
280                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
281                    throws com.liferay.portal.kernel.exception.SystemException,
282                            com.liferay.portlet.social.NoSuchActivityAchievementException {
283                    return getPersistence()
284                                       .findByG_U_First(groupId, userId, orderByComparator);
285            }
286    
287            /**
288            * Returns the last social activity achievement in the ordered set where groupId = &#63; and userId = &#63;.
289            *
290            * <p>
291            * 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.
292            * </p>
293            *
294            * @param groupId the group ID
295            * @param userId the user ID
296            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
297            * @return the last matching social activity achievement
298            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
299            * @throws SystemException if a system exception occurred
300            */
301            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_U_Last(
302                    long groupId, long userId,
303                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
304                    throws com.liferay.portal.kernel.exception.SystemException,
305                            com.liferay.portlet.social.NoSuchActivityAchievementException {
306                    return getPersistence()
307                                       .findByG_U_Last(groupId, userId, orderByComparator);
308            }
309    
310            /**
311            * Returns the social activity achievements before and after the current social activity achievement in the ordered set where groupId = &#63; and userId = &#63;.
312            *
313            * <p>
314            * 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.
315            * </p>
316            *
317            * @param activityAchievementId the primary key of the current social activity achievement
318            * @param groupId the group ID
319            * @param userId the user ID
320            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
321            * @return the previous, current, and next social activity achievement
322            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found
323            * @throws SystemException if a system exception occurred
324            */
325            public static com.liferay.portlet.social.model.SocialActivityAchievement[] findByG_U_PrevAndNext(
326                    long activityAchievementId, long groupId, long userId,
327                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
328                    throws com.liferay.portal.kernel.exception.SystemException,
329                            com.liferay.portlet.social.NoSuchActivityAchievementException {
330                    return getPersistence()
331                                       .findByG_U_PrevAndNext(activityAchievementId, groupId,
332                            userId, orderByComparator);
333            }
334    
335            /**
336            * Returns all the social activity achievements where groupId = &#63; and name = &#63;.
337            *
338            * @param groupId the group ID
339            * @param name the name
340            * @return the matching social activity achievements
341            * @throws SystemException if a system exception occurred
342            */
343            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_N(
344                    long groupId, java.lang.String name)
345                    throws com.liferay.portal.kernel.exception.SystemException {
346                    return getPersistence().findByG_N(groupId, name);
347            }
348    
349            /**
350            * Returns a range of all the social activity achievements where groupId = &#63; and name = &#63;.
351            *
352            * <p>
353            * 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.
354            * </p>
355            *
356            * @param groupId the group ID
357            * @param name the name
358            * @param start the lower bound of the range of social activity achievements
359            * @param end the upper bound of the range of social activity achievements (not inclusive)
360            * @return the range of matching social activity achievements
361            * @throws SystemException if a system exception occurred
362            */
363            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_N(
364                    long groupId, java.lang.String name, int start, int end)
365                    throws com.liferay.portal.kernel.exception.SystemException {
366                    return getPersistence().findByG_N(groupId, name, start, end);
367            }
368    
369            /**
370            * Returns an ordered range of all the social activity achievements where groupId = &#63; and name = &#63;.
371            *
372            * <p>
373            * 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.
374            * </p>
375            *
376            * @param groupId the group ID
377            * @param name the name
378            * @param start the lower bound of the range of social activity achievements
379            * @param end the upper bound of the range of social activity achievements (not inclusive)
380            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
381            * @return the ordered range of matching social activity achievements
382            * @throws SystemException if a system exception occurred
383            */
384            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_N(
385                    long groupId, java.lang.String name, int start, int end,
386                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
387                    throws com.liferay.portal.kernel.exception.SystemException {
388                    return getPersistence()
389                                       .findByG_N(groupId, name, start, end, orderByComparator);
390            }
391    
392            /**
393            * Returns the first social activity achievement in the ordered set where groupId = &#63; and name = &#63;.
394            *
395            * <p>
396            * 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.
397            * </p>
398            *
399            * @param groupId the group ID
400            * @param name the name
401            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
402            * @return the first matching social activity achievement
403            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
404            * @throws SystemException if a system exception occurred
405            */
406            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_N_First(
407                    long groupId, java.lang.String name,
408                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
409                    throws com.liferay.portal.kernel.exception.SystemException,
410                            com.liferay.portlet.social.NoSuchActivityAchievementException {
411                    return getPersistence().findByG_N_First(groupId, name, orderByComparator);
412            }
413    
414            /**
415            * Returns the last social activity achievement in the ordered set where groupId = &#63; and name = &#63;.
416            *
417            * <p>
418            * 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.
419            * </p>
420            *
421            * @param groupId the group ID
422            * @param name the name
423            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
424            * @return the last matching social activity achievement
425            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
426            * @throws SystemException if a system exception occurred
427            */
428            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_N_Last(
429                    long groupId, java.lang.String name,
430                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
431                    throws com.liferay.portal.kernel.exception.SystemException,
432                            com.liferay.portlet.social.NoSuchActivityAchievementException {
433                    return getPersistence().findByG_N_Last(groupId, name, orderByComparator);
434            }
435    
436            /**
437            * Returns the social activity achievements before and after the current social activity achievement in the ordered set where groupId = &#63; and name = &#63;.
438            *
439            * <p>
440            * 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.
441            * </p>
442            *
443            * @param activityAchievementId the primary key of the current social activity achievement
444            * @param groupId the group ID
445            * @param name the name
446            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
447            * @return the previous, current, and next social activity achievement
448            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found
449            * @throws SystemException if a system exception occurred
450            */
451            public static com.liferay.portlet.social.model.SocialActivityAchievement[] findByG_N_PrevAndNext(
452                    long activityAchievementId, long groupId, java.lang.String name,
453                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
454                    throws com.liferay.portal.kernel.exception.SystemException,
455                            com.liferay.portlet.social.NoSuchActivityAchievementException {
456                    return getPersistence()
457                                       .findByG_N_PrevAndNext(activityAchievementId, groupId, name,
458                            orderByComparator);
459            }
460    
461            /**
462            * Returns all the social activity achievements where groupId = &#63; and firstInGroup = &#63;.
463            *
464            * @param groupId the group ID
465            * @param firstInGroup the first in group
466            * @return the matching social activity achievements
467            * @throws SystemException if a system exception occurred
468            */
469            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_F(
470                    long groupId, boolean firstInGroup)
471                    throws com.liferay.portal.kernel.exception.SystemException {
472                    return getPersistence().findByG_F(groupId, firstInGroup);
473            }
474    
475            /**
476            * Returns a range of all the social activity achievements where groupId = &#63; and firstInGroup = &#63;.
477            *
478            * <p>
479            * 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.
480            * </p>
481            *
482            * @param groupId the group ID
483            * @param firstInGroup the first in group
484            * @param start the lower bound of the range of social activity achievements
485            * @param end the upper bound of the range of social activity achievements (not inclusive)
486            * @return the range of matching social activity achievements
487            * @throws SystemException if a system exception occurred
488            */
489            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_F(
490                    long groupId, boolean firstInGroup, int start, int end)
491                    throws com.liferay.portal.kernel.exception.SystemException {
492                    return getPersistence().findByG_F(groupId, firstInGroup, start, end);
493            }
494    
495            /**
496            * Returns an ordered range of all the social activity achievements where groupId = &#63; and firstInGroup = &#63;.
497            *
498            * <p>
499            * 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.
500            * </p>
501            *
502            * @param groupId the group ID
503            * @param firstInGroup the first in group
504            * @param start the lower bound of the range of social activity achievements
505            * @param end the upper bound of the range of social activity achievements (not inclusive)
506            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
507            * @return the ordered range of matching social activity achievements
508            * @throws SystemException if a system exception occurred
509            */
510            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_F(
511                    long groupId, boolean firstInGroup, int start, int end,
512                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
513                    throws com.liferay.portal.kernel.exception.SystemException {
514                    return getPersistence()
515                                       .findByG_F(groupId, firstInGroup, start, end,
516                            orderByComparator);
517            }
518    
519            /**
520            * Returns the first social activity achievement in the ordered set where groupId = &#63; and firstInGroup = &#63;.
521            *
522            * <p>
523            * 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.
524            * </p>
525            *
526            * @param groupId the group ID
527            * @param firstInGroup the first in group
528            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
529            * @return the first matching social activity achievement
530            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
531            * @throws SystemException if a system exception occurred
532            */
533            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_F_First(
534                    long groupId, boolean firstInGroup,
535                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
536                    throws com.liferay.portal.kernel.exception.SystemException,
537                            com.liferay.portlet.social.NoSuchActivityAchievementException {
538                    return getPersistence()
539                                       .findByG_F_First(groupId, firstInGroup, orderByComparator);
540            }
541    
542            /**
543            * Returns the last social activity achievement in the ordered set where groupId = &#63; and firstInGroup = &#63;.
544            *
545            * <p>
546            * 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.
547            * </p>
548            *
549            * @param groupId the group ID
550            * @param firstInGroup the first in group
551            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
552            * @return the last matching social activity achievement
553            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
554            * @throws SystemException if a system exception occurred
555            */
556            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_F_Last(
557                    long groupId, boolean firstInGroup,
558                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
559                    throws com.liferay.portal.kernel.exception.SystemException,
560                            com.liferay.portlet.social.NoSuchActivityAchievementException {
561                    return getPersistence()
562                                       .findByG_F_Last(groupId, firstInGroup, orderByComparator);
563            }
564    
565            /**
566            * Returns the social activity achievements before and after the current social activity achievement in the ordered set where groupId = &#63; and firstInGroup = &#63;.
567            *
568            * <p>
569            * 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.
570            * </p>
571            *
572            * @param activityAchievementId the primary key of the current social activity achievement
573            * @param groupId the group ID
574            * @param firstInGroup the first in group
575            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
576            * @return the previous, current, and next social activity achievement
577            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found
578            * @throws SystemException if a system exception occurred
579            */
580            public static com.liferay.portlet.social.model.SocialActivityAchievement[] findByG_F_PrevAndNext(
581                    long activityAchievementId, long groupId, boolean firstInGroup,
582                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
583                    throws com.liferay.portal.kernel.exception.SystemException,
584                            com.liferay.portlet.social.NoSuchActivityAchievementException {
585                    return getPersistence()
586                                       .findByG_F_PrevAndNext(activityAchievementId, groupId,
587                            firstInGroup, orderByComparator);
588            }
589    
590            /**
591            * 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.
592            *
593            * @param groupId the group ID
594            * @param userId the user ID
595            * @param name the name
596            * @return the matching social activity achievement
597            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
598            * @throws SystemException if a system exception occurred
599            */
600            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_U_N(
601                    long groupId, long userId, java.lang.String name)
602                    throws com.liferay.portal.kernel.exception.SystemException,
603                            com.liferay.portlet.social.NoSuchActivityAchievementException {
604                    return getPersistence().findByG_U_N(groupId, userId, name);
605            }
606    
607            /**
608            * 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.
609            *
610            * @param groupId the group ID
611            * @param userId the user ID
612            * @param name the name
613            * @return the matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
614            * @throws SystemException if a system exception occurred
615            */
616            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByG_U_N(
617                    long groupId, long userId, java.lang.String name)
618                    throws com.liferay.portal.kernel.exception.SystemException {
619                    return getPersistence().fetchByG_U_N(groupId, userId, name);
620            }
621    
622            /**
623            * 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.
624            *
625            * @param groupId the group ID
626            * @param userId the user ID
627            * @param name the name
628            * @param retrieveFromCache whether to use the finder cache
629            * @return the matching social activity achievement, or <code>null</code> if a matching social activity achievement could not be found
630            * @throws SystemException if a system exception occurred
631            */
632            public static com.liferay.portlet.social.model.SocialActivityAchievement fetchByG_U_N(
633                    long groupId, long userId, java.lang.String name,
634                    boolean retrieveFromCache)
635                    throws com.liferay.portal.kernel.exception.SystemException {
636                    return getPersistence()
637                                       .fetchByG_U_N(groupId, userId, name, retrieveFromCache);
638            }
639    
640            /**
641            * Returns all the social activity achievements where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
642            *
643            * @param groupId the group ID
644            * @param userId the user ID
645            * @param firstInGroup the first in group
646            * @return the matching social activity achievements
647            * @throws SystemException if a system exception occurred
648            */
649            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_U_F(
650                    long groupId, long userId, boolean firstInGroup)
651                    throws com.liferay.portal.kernel.exception.SystemException {
652                    return getPersistence().findByG_U_F(groupId, userId, firstInGroup);
653            }
654    
655            /**
656            * Returns a range of all the social activity achievements where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
657            *
658            * <p>
659            * 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.
660            * </p>
661            *
662            * @param groupId the group ID
663            * @param userId the user ID
664            * @param firstInGroup the first in group
665            * @param start the lower bound of the range of social activity achievements
666            * @param end the upper bound of the range of social activity achievements (not inclusive)
667            * @return the range of matching social activity achievements
668            * @throws SystemException if a system exception occurred
669            */
670            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_U_F(
671                    long groupId, long userId, boolean firstInGroup, int start, int end)
672                    throws com.liferay.portal.kernel.exception.SystemException {
673                    return getPersistence()
674                                       .findByG_U_F(groupId, userId, firstInGroup, start, end);
675            }
676    
677            /**
678            * Returns an ordered range of all the social activity achievements where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
679            *
680            * <p>
681            * 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.
682            * </p>
683            *
684            * @param groupId the group ID
685            * @param userId the user ID
686            * @param firstInGroup the first in group
687            * @param start the lower bound of the range of social activity achievements
688            * @param end the upper bound of the range of social activity achievements (not inclusive)
689            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
690            * @return the ordered range of matching social activity achievements
691            * @throws SystemException if a system exception occurred
692            */
693            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findByG_U_F(
694                    long groupId, long userId, boolean firstInGroup, int start, int end,
695                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
696                    throws com.liferay.portal.kernel.exception.SystemException {
697                    return getPersistence()
698                                       .findByG_U_F(groupId, userId, firstInGroup, start, end,
699                            orderByComparator);
700            }
701    
702            /**
703            * Returns the first social activity achievement in the ordered set where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
704            *
705            * <p>
706            * 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.
707            * </p>
708            *
709            * @param groupId the group ID
710            * @param userId the user ID
711            * @param firstInGroup the first in group
712            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
713            * @return the first matching social activity achievement
714            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
715            * @throws SystemException if a system exception occurred
716            */
717            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_U_F_First(
718                    long groupId, long userId, boolean firstInGroup,
719                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
720                    throws com.liferay.portal.kernel.exception.SystemException,
721                            com.liferay.portlet.social.NoSuchActivityAchievementException {
722                    return getPersistence()
723                                       .findByG_U_F_First(groupId, userId, firstInGroup,
724                            orderByComparator);
725            }
726    
727            /**
728            * Returns the last social activity achievement in the ordered set where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
729            *
730            * <p>
731            * 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.
732            * </p>
733            *
734            * @param groupId the group ID
735            * @param userId the user ID
736            * @param firstInGroup the first in group
737            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
738            * @return the last matching social activity achievement
739            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a matching social activity achievement could not be found
740            * @throws SystemException if a system exception occurred
741            */
742            public static com.liferay.portlet.social.model.SocialActivityAchievement findByG_U_F_Last(
743                    long groupId, long userId, boolean firstInGroup,
744                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
745                    throws com.liferay.portal.kernel.exception.SystemException,
746                            com.liferay.portlet.social.NoSuchActivityAchievementException {
747                    return getPersistence()
748                                       .findByG_U_F_Last(groupId, userId, firstInGroup,
749                            orderByComparator);
750            }
751    
752            /**
753            * 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;.
754            *
755            * <p>
756            * 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.
757            * </p>
758            *
759            * @param activityAchievementId the primary key of the current social activity achievement
760            * @param groupId the group ID
761            * @param userId the user ID
762            * @param firstInGroup the first in group
763            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
764            * @return the previous, current, and next social activity achievement
765            * @throws com.liferay.portlet.social.NoSuchActivityAchievementException if a social activity achievement with the primary key could not be found
766            * @throws SystemException if a system exception occurred
767            */
768            public static com.liferay.portlet.social.model.SocialActivityAchievement[] findByG_U_F_PrevAndNext(
769                    long activityAchievementId, long groupId, long userId,
770                    boolean firstInGroup,
771                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
772                    throws com.liferay.portal.kernel.exception.SystemException,
773                            com.liferay.portlet.social.NoSuchActivityAchievementException {
774                    return getPersistence()
775                                       .findByG_U_F_PrevAndNext(activityAchievementId, groupId,
776                            userId, firstInGroup, orderByComparator);
777            }
778    
779            /**
780            * Returns all the social activity achievements.
781            *
782            * @return the social activity achievements
783            * @throws SystemException if a system exception occurred
784            */
785            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findAll()
786                    throws com.liferay.portal.kernel.exception.SystemException {
787                    return getPersistence().findAll();
788            }
789    
790            /**
791            * Returns a range of all the social activity achievements.
792            *
793            * <p>
794            * 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.
795            * </p>
796            *
797            * @param start the lower bound of the range of social activity achievements
798            * @param end the upper bound of the range of social activity achievements (not inclusive)
799            * @return the range of social activity achievements
800            * @throws SystemException if a system exception occurred
801            */
802            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findAll(
803                    int start, int end)
804                    throws com.liferay.portal.kernel.exception.SystemException {
805                    return getPersistence().findAll(start, end);
806            }
807    
808            /**
809            * Returns an ordered range of all the social activity achievements.
810            *
811            * <p>
812            * 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.
813            * </p>
814            *
815            * @param start the lower bound of the range of social activity achievements
816            * @param end the upper bound of the range of social activity achievements (not inclusive)
817            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
818            * @return the ordered range of social activity achievements
819            * @throws SystemException if a system exception occurred
820            */
821            public static java.util.List<com.liferay.portlet.social.model.SocialActivityAchievement> findAll(
822                    int start, int end,
823                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
824                    throws com.liferay.portal.kernel.exception.SystemException {
825                    return getPersistence().findAll(start, end, orderByComparator);
826            }
827    
828            /**
829            * Removes all the social activity achievements where groupId = &#63; and userId = &#63; from the database.
830            *
831            * @param groupId the group ID
832            * @param userId the user ID
833            * @throws SystemException if a system exception occurred
834            */
835            public static void removeByG_U(long groupId, long userId)
836                    throws com.liferay.portal.kernel.exception.SystemException {
837                    getPersistence().removeByG_U(groupId, userId);
838            }
839    
840            /**
841            * Removes all the social activity achievements where groupId = &#63; and name = &#63; from the database.
842            *
843            * @param groupId the group ID
844            * @param name the name
845            * @throws SystemException if a system exception occurred
846            */
847            public static void removeByG_N(long groupId, java.lang.String name)
848                    throws com.liferay.portal.kernel.exception.SystemException {
849                    getPersistence().removeByG_N(groupId, name);
850            }
851    
852            /**
853            * Removes all the social activity achievements where groupId = &#63; and firstInGroup = &#63; from the database.
854            *
855            * @param groupId the group ID
856            * @param firstInGroup the first in group
857            * @throws SystemException if a system exception occurred
858            */
859            public static void removeByG_F(long groupId, boolean firstInGroup)
860                    throws com.liferay.portal.kernel.exception.SystemException {
861                    getPersistence().removeByG_F(groupId, firstInGroup);
862            }
863    
864            /**
865            * Removes the social activity achievement where groupId = &#63; and userId = &#63; and name = &#63; from the database.
866            *
867            * @param groupId the group ID
868            * @param userId the user ID
869            * @param name the name
870            * @throws SystemException if a system exception occurred
871            */
872            public static void removeByG_U_N(long groupId, long userId,
873                    java.lang.String name)
874                    throws com.liferay.portal.kernel.exception.SystemException,
875                            com.liferay.portlet.social.NoSuchActivityAchievementException {
876                    getPersistence().removeByG_U_N(groupId, userId, name);
877            }
878    
879            /**
880            * Removes all the social activity achievements where groupId = &#63; and userId = &#63; and firstInGroup = &#63; from the database.
881            *
882            * @param groupId the group ID
883            * @param userId the user ID
884            * @param firstInGroup the first in group
885            * @throws SystemException if a system exception occurred
886            */
887            public static void removeByG_U_F(long groupId, long userId,
888                    boolean firstInGroup)
889                    throws com.liferay.portal.kernel.exception.SystemException {
890                    getPersistence().removeByG_U_F(groupId, userId, firstInGroup);
891            }
892    
893            /**
894            * Removes all the social activity achievements from the database.
895            *
896            * @throws SystemException if a system exception occurred
897            */
898            public static void removeAll()
899                    throws com.liferay.portal.kernel.exception.SystemException {
900                    getPersistence().removeAll();
901            }
902    
903            /**
904            * Returns the number of social activity achievements where groupId = &#63; and userId = &#63;.
905            *
906            * @param groupId the group ID
907            * @param userId the user ID
908            * @return the number of matching social activity achievements
909            * @throws SystemException if a system exception occurred
910            */
911            public static int countByG_U(long groupId, long userId)
912                    throws com.liferay.portal.kernel.exception.SystemException {
913                    return getPersistence().countByG_U(groupId, userId);
914            }
915    
916            /**
917            * Returns the number of social activity achievements where groupId = &#63; and name = &#63;.
918            *
919            * @param groupId the group ID
920            * @param name the name
921            * @return the number of matching social activity achievements
922            * @throws SystemException if a system exception occurred
923            */
924            public static int countByG_N(long groupId, java.lang.String name)
925                    throws com.liferay.portal.kernel.exception.SystemException {
926                    return getPersistence().countByG_N(groupId, name);
927            }
928    
929            /**
930            * Returns the number of social activity achievements where groupId = &#63; and firstInGroup = &#63;.
931            *
932            * @param groupId the group ID
933            * @param firstInGroup the first in group
934            * @return the number of matching social activity achievements
935            * @throws SystemException if a system exception occurred
936            */
937            public static int countByG_F(long groupId, boolean firstInGroup)
938                    throws com.liferay.portal.kernel.exception.SystemException {
939                    return getPersistence().countByG_F(groupId, firstInGroup);
940            }
941    
942            /**
943            * Returns the number of social activity achievements where groupId = &#63; and userId = &#63; and name = &#63;.
944            *
945            * @param groupId the group ID
946            * @param userId the user ID
947            * @param name the name
948            * @return the number of matching social activity achievements
949            * @throws SystemException if a system exception occurred
950            */
951            public static int countByG_U_N(long groupId, long userId,
952                    java.lang.String name)
953                    throws com.liferay.portal.kernel.exception.SystemException {
954                    return getPersistence().countByG_U_N(groupId, userId, name);
955            }
956    
957            /**
958            * Returns the number of social activity achievements where groupId = &#63; and userId = &#63; and firstInGroup = &#63;.
959            *
960            * @param groupId the group ID
961            * @param userId the user ID
962            * @param firstInGroup the first in group
963            * @return the number of matching social activity achievements
964            * @throws SystemException if a system exception occurred
965            */
966            public static int countByG_U_F(long groupId, long userId,
967                    boolean firstInGroup)
968                    throws com.liferay.portal.kernel.exception.SystemException {
969                    return getPersistence().countByG_U_F(groupId, userId, firstInGroup);
970            }
971    
972            /**
973            * Returns the number of social activity achievements.
974            *
975            * @return the number of social activity achievements
976            * @throws SystemException if a system exception occurred
977            */
978            public static int countAll()
979                    throws com.liferay.portal.kernel.exception.SystemException {
980                    return getPersistence().countAll();
981            }
982    
983            public static SocialActivityAchievementPersistence getPersistence() {
984                    if (_persistence == null) {
985                            _persistence = (SocialActivityAchievementPersistence)PortalBeanLocatorUtil.locate(SocialActivityAchievementPersistence.class.getName());
986    
987                            ReferenceRegistry.registerReference(SocialActivityAchievementUtil.class,
988                                    "_persistence");
989                    }
990    
991                    return _persistence;
992            }
993    
994            public void setPersistence(SocialActivityAchievementPersistence persistence) {
995                    _persistence = persistence;
996    
997                    ReferenceRegistry.registerReference(SocialActivityAchievementUtil.class,
998                            "_persistence");
999            }
1000    
1001            private static SocialActivityAchievementPersistence _persistence;
1002    }