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