001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.social.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
019    import com.liferay.portal.kernel.exception.SystemException;
020    import com.liferay.portal.kernel.util.OrderByComparator;
021    import com.liferay.portal.service.ServiceContext;
022    
023    import com.liferay.portlet.social.model.SocialActivity;
024    
025    import java.util.List;
026    
027    /**
028     * The persistence utility for the social activity service.
029     *
030     * <p>
031     * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this class.
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see SocialActivityPersistence
036     * @see SocialActivityPersistenceImpl
037     * @generated
038     */
039    public class SocialActivityUtil {
040            /**
041             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
042             */
043            public static void clearCache() {
044                    getPersistence().clearCache();
045            }
046    
047            /**
048             * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
049             */
050            public static void clearCache(SocialActivity socialActivity) {
051                    getPersistence().clearCache(socialActivity);
052            }
053    
054            /**
055             * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
056             */
057            public long countWithDynamicQuery(DynamicQuery dynamicQuery)
058                    throws SystemException {
059                    return getPersistence().countWithDynamicQuery(dynamicQuery);
060            }
061    
062            /**
063             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
064             */
065            public static List<SocialActivity> findWithDynamicQuery(
066                    DynamicQuery dynamicQuery) throws SystemException {
067                    return getPersistence().findWithDynamicQuery(dynamicQuery);
068            }
069    
070            /**
071             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
072             */
073            public static List<SocialActivity> findWithDynamicQuery(
074                    DynamicQuery dynamicQuery, int start, int end)
075                    throws SystemException {
076                    return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
077            }
078    
079            /**
080             * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
081             */
082            public static List<SocialActivity> findWithDynamicQuery(
083                    DynamicQuery dynamicQuery, int start, int end,
084                    OrderByComparator orderByComparator) throws SystemException {
085                    return getPersistence()
086                                       .findWithDynamicQuery(dynamicQuery, start, end,
087                            orderByComparator);
088            }
089    
090            /**
091             * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
092             */
093            public static SocialActivity remove(SocialActivity socialActivity)
094                    throws SystemException {
095                    return getPersistence().remove(socialActivity);
096            }
097    
098            /**
099             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
100             */
101            public static SocialActivity update(SocialActivity socialActivity,
102                    boolean merge) throws SystemException {
103                    return getPersistence().update(socialActivity, merge);
104            }
105    
106            /**
107             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
108             */
109            public static SocialActivity update(SocialActivity socialActivity,
110                    boolean merge, ServiceContext serviceContext) throws SystemException {
111                    return getPersistence().update(socialActivity, merge, serviceContext);
112            }
113    
114            /**
115            * Caches the social activity in the entity cache if it is enabled.
116            *
117            * @param socialActivity the social activity to cache
118            */
119            public static void cacheResult(
120                    com.liferay.portlet.social.model.SocialActivity socialActivity) {
121                    getPersistence().cacheResult(socialActivity);
122            }
123    
124            /**
125            * Caches the social activities in the entity cache if it is enabled.
126            *
127            * @param socialActivities the social activities to cache
128            */
129            public static void cacheResult(
130                    java.util.List<com.liferay.portlet.social.model.SocialActivity> socialActivities) {
131                    getPersistence().cacheResult(socialActivities);
132            }
133    
134            /**
135            * Creates a new social activity with the primary key.
136            *
137            * @param activityId the primary key for the new social activity
138            * @return the new social activity
139            */
140            public static com.liferay.portlet.social.model.SocialActivity create(
141                    long activityId) {
142                    return getPersistence().create(activityId);
143            }
144    
145            /**
146            * Removes the social activity with the primary key from the database. Also notifies the appropriate model listeners.
147            *
148            * @param activityId the primary key of the social activity to remove
149            * @return the social activity that was removed
150            * @throws com.liferay.portlet.social.NoSuchActivityException if a social activity with the primary key could not be found
151            * @throws SystemException if a system exception occurred
152            */
153            public static com.liferay.portlet.social.model.SocialActivity remove(
154                    long activityId)
155                    throws com.liferay.portal.kernel.exception.SystemException,
156                            com.liferay.portlet.social.NoSuchActivityException {
157                    return getPersistence().remove(activityId);
158            }
159    
160            public static com.liferay.portlet.social.model.SocialActivity updateImpl(
161                    com.liferay.portlet.social.model.SocialActivity socialActivity,
162                    boolean merge)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    return getPersistence().updateImpl(socialActivity, merge);
165            }
166    
167            /**
168            * Finds the social activity with the primary key or throws a {@link com.liferay.portlet.social.NoSuchActivityException} if it could not be found.
169            *
170            * @param activityId the primary key of the social activity to find
171            * @return the social activity
172            * @throws com.liferay.portlet.social.NoSuchActivityException if a social activity with the primary key could not be found
173            * @throws SystemException if a system exception occurred
174            */
175            public static com.liferay.portlet.social.model.SocialActivity findByPrimaryKey(
176                    long activityId)
177                    throws com.liferay.portal.kernel.exception.SystemException,
178                            com.liferay.portlet.social.NoSuchActivityException {
179                    return getPersistence().findByPrimaryKey(activityId);
180            }
181    
182            /**
183            * Finds the social activity with the primary key or returns <code>null</code> if it could not be found.
184            *
185            * @param activityId the primary key of the social activity to find
186            * @return the social activity, or <code>null</code> if a social activity with the primary key could not be found
187            * @throws SystemException if a system exception occurred
188            */
189            public static com.liferay.portlet.social.model.SocialActivity fetchByPrimaryKey(
190                    long activityId)
191                    throws com.liferay.portal.kernel.exception.SystemException {
192                    return getPersistence().fetchByPrimaryKey(activityId);
193            }
194    
195            /**
196            * Finds all the social activities where groupId = &#63;.
197            *
198            * @param groupId the group id to search with
199            * @return the matching social activities
200            * @throws SystemException if a system exception occurred
201            */
202            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByGroupId(
203                    long groupId)
204                    throws com.liferay.portal.kernel.exception.SystemException {
205                    return getPersistence().findByGroupId(groupId);
206            }
207    
208            /**
209            * Finds a range of all the social activities where groupId = &#63;.
210            *
211            * <p>
212            * 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.
213            * </p>
214            *
215            * @param groupId the group id to search with
216            * @param start the lower bound of the range of social activities to return
217            * @param end the upper bound of the range of social activities to return (not inclusive)
218            * @return the range of matching social activities
219            * @throws SystemException if a system exception occurred
220            */
221            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByGroupId(
222                    long groupId, int start, int end)
223                    throws com.liferay.portal.kernel.exception.SystemException {
224                    return getPersistence().findByGroupId(groupId, start, end);
225            }
226    
227            /**
228            * Finds an ordered range of all the social activities where groupId = &#63;.
229            *
230            * <p>
231            * 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.
232            * </p>
233            *
234            * @param groupId the group id to search with
235            * @param start the lower bound of the range of social activities to return
236            * @param end the upper bound of the range of social activities to return (not inclusive)
237            * @param orderByComparator the comparator to order the results by
238            * @return the ordered range of matching social activities
239            * @throws SystemException if a system exception occurred
240            */
241            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByGroupId(
242                    long groupId, int start, int end,
243                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
244                    throws com.liferay.portal.kernel.exception.SystemException {
245                    return getPersistence()
246                                       .findByGroupId(groupId, start, end, orderByComparator);
247            }
248    
249            /**
250            * Finds the first social activity in the ordered set where groupId = &#63;.
251            *
252            * <p>
253            * 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.
254            * </p>
255            *
256            * @param groupId the group id to search with
257            * @param orderByComparator the comparator to order the set by
258            * @return the first matching social activity
259            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
260            * @throws SystemException if a system exception occurred
261            */
262            public static com.liferay.portlet.social.model.SocialActivity findByGroupId_First(
263                    long groupId,
264                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
265                    throws com.liferay.portal.kernel.exception.SystemException,
266                            com.liferay.portlet.social.NoSuchActivityException {
267                    return getPersistence().findByGroupId_First(groupId, orderByComparator);
268            }
269    
270            /**
271            * Finds the last social activity in the ordered set where groupId = &#63;.
272            *
273            * <p>
274            * 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.
275            * </p>
276            *
277            * @param groupId the group id to search with
278            * @param orderByComparator the comparator to order the set by
279            * @return the last matching social activity
280            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
281            * @throws SystemException if a system exception occurred
282            */
283            public static com.liferay.portlet.social.model.SocialActivity findByGroupId_Last(
284                    long groupId,
285                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
286                    throws com.liferay.portal.kernel.exception.SystemException,
287                            com.liferay.portlet.social.NoSuchActivityException {
288                    return getPersistence().findByGroupId_Last(groupId, orderByComparator);
289            }
290    
291            /**
292            * Finds the social activities before and after the current social activity in the ordered set where groupId = &#63;.
293            *
294            * <p>
295            * 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.
296            * </p>
297            *
298            * @param activityId the primary key of the current social activity
299            * @param groupId the group id to search with
300            * @param orderByComparator the comparator to order the set by
301            * @return the previous, current, and next social activity
302            * @throws com.liferay.portlet.social.NoSuchActivityException if a social activity with the primary key could not be found
303            * @throws SystemException if a system exception occurred
304            */
305            public static com.liferay.portlet.social.model.SocialActivity[] findByGroupId_PrevAndNext(
306                    long activityId, long groupId,
307                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
308                    throws com.liferay.portal.kernel.exception.SystemException,
309                            com.liferay.portlet.social.NoSuchActivityException {
310                    return getPersistence()
311                                       .findByGroupId_PrevAndNext(activityId, groupId,
312                            orderByComparator);
313            }
314    
315            /**
316            * Finds all the social activities where companyId = &#63;.
317            *
318            * @param companyId the company id to search with
319            * @return the matching social activities
320            * @throws SystemException if a system exception occurred
321            */
322            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByCompanyId(
323                    long companyId)
324                    throws com.liferay.portal.kernel.exception.SystemException {
325                    return getPersistence().findByCompanyId(companyId);
326            }
327    
328            /**
329            * Finds a range of all the social activities where companyId = &#63;.
330            *
331            * <p>
332            * 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.
333            * </p>
334            *
335            * @param companyId the company id to search with
336            * @param start the lower bound of the range of social activities to return
337            * @param end the upper bound of the range of social activities to return (not inclusive)
338            * @return the range of matching social activities
339            * @throws SystemException if a system exception occurred
340            */
341            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByCompanyId(
342                    long companyId, int start, int end)
343                    throws com.liferay.portal.kernel.exception.SystemException {
344                    return getPersistence().findByCompanyId(companyId, start, end);
345            }
346    
347            /**
348            * Finds an ordered range of all the social activities where companyId = &#63;.
349            *
350            * <p>
351            * 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.
352            * </p>
353            *
354            * @param companyId the company id to search with
355            * @param start the lower bound of the range of social activities to return
356            * @param end the upper bound of the range of social activities to return (not inclusive)
357            * @param orderByComparator the comparator to order the results by
358            * @return the ordered range of matching social activities
359            * @throws SystemException if a system exception occurred
360            */
361            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByCompanyId(
362                    long companyId, int start, int end,
363                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
364                    throws com.liferay.portal.kernel.exception.SystemException {
365                    return getPersistence()
366                                       .findByCompanyId(companyId, start, end, orderByComparator);
367            }
368    
369            /**
370            * Finds the first social activity in the ordered set where companyId = &#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 companyId the company id to search with
377            * @param orderByComparator the comparator to order the set by
378            * @return the first matching social activity
379            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
380            * @throws SystemException if a system exception occurred
381            */
382            public static com.liferay.portlet.social.model.SocialActivity findByCompanyId_First(
383                    long companyId,
384                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
385                    throws com.liferay.portal.kernel.exception.SystemException,
386                            com.liferay.portlet.social.NoSuchActivityException {
387                    return getPersistence()
388                                       .findByCompanyId_First(companyId, orderByComparator);
389            }
390    
391            /**
392            * Finds the last social activity in the ordered set where companyId = &#63;.
393            *
394            * <p>
395            * 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.
396            * </p>
397            *
398            * @param companyId the company id to search with
399            * @param orderByComparator the comparator to order the set by
400            * @return the last matching social activity
401            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
402            * @throws SystemException if a system exception occurred
403            */
404            public static com.liferay.portlet.social.model.SocialActivity findByCompanyId_Last(
405                    long companyId,
406                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
407                    throws com.liferay.portal.kernel.exception.SystemException,
408                            com.liferay.portlet.social.NoSuchActivityException {
409                    return getPersistence()
410                                       .findByCompanyId_Last(companyId, orderByComparator);
411            }
412    
413            /**
414            * Finds the social activities before and after the current social activity in the ordered set where companyId = &#63;.
415            *
416            * <p>
417            * 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.
418            * </p>
419            *
420            * @param activityId the primary key of the current social activity
421            * @param companyId the company id to search with
422            * @param orderByComparator the comparator to order the set by
423            * @return the previous, current, and next social activity
424            * @throws com.liferay.portlet.social.NoSuchActivityException if a social activity with the primary key could not be found
425            * @throws SystemException if a system exception occurred
426            */
427            public static com.liferay.portlet.social.model.SocialActivity[] findByCompanyId_PrevAndNext(
428                    long activityId, long companyId,
429                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
430                    throws com.liferay.portal.kernel.exception.SystemException,
431                            com.liferay.portlet.social.NoSuchActivityException {
432                    return getPersistence()
433                                       .findByCompanyId_PrevAndNext(activityId, companyId,
434                            orderByComparator);
435            }
436    
437            /**
438            * Finds all the social activities where userId = &#63;.
439            *
440            * @param userId the user id to search with
441            * @return the matching social activities
442            * @throws SystemException if a system exception occurred
443            */
444            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByUserId(
445                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
446                    return getPersistence().findByUserId(userId);
447            }
448    
449            /**
450            * Finds a range of all the social activities where userId = &#63;.
451            *
452            * <p>
453            * 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.
454            * </p>
455            *
456            * @param userId the user id to search with
457            * @param start the lower bound of the range of social activities to return
458            * @param end the upper bound of the range of social activities to return (not inclusive)
459            * @return the range of matching social activities
460            * @throws SystemException if a system exception occurred
461            */
462            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByUserId(
463                    long userId, int start, int end)
464                    throws com.liferay.portal.kernel.exception.SystemException {
465                    return getPersistence().findByUserId(userId, start, end);
466            }
467    
468            /**
469            * Finds an ordered range of all the social activities where userId = &#63;.
470            *
471            * <p>
472            * 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.
473            * </p>
474            *
475            * @param userId the user id to search with
476            * @param start the lower bound of the range of social activities to return
477            * @param end the upper bound of the range of social activities to return (not inclusive)
478            * @param orderByComparator the comparator to order the results by
479            * @return the ordered range of matching social activities
480            * @throws SystemException if a system exception occurred
481            */
482            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByUserId(
483                    long userId, int start, int end,
484                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
485                    throws com.liferay.portal.kernel.exception.SystemException {
486                    return getPersistence()
487                                       .findByUserId(userId, start, end, orderByComparator);
488            }
489    
490            /**
491            * Finds the first social activity in the ordered set where userId = &#63;.
492            *
493            * <p>
494            * 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.
495            * </p>
496            *
497            * @param userId the user id to search with
498            * @param orderByComparator the comparator to order the set by
499            * @return the first matching social activity
500            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
501            * @throws SystemException if a system exception occurred
502            */
503            public static com.liferay.portlet.social.model.SocialActivity findByUserId_First(
504                    long userId,
505                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
506                    throws com.liferay.portal.kernel.exception.SystemException,
507                            com.liferay.portlet.social.NoSuchActivityException {
508                    return getPersistence().findByUserId_First(userId, orderByComparator);
509            }
510    
511            /**
512            * Finds the last social activity in the ordered set where userId = &#63;.
513            *
514            * <p>
515            * 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.
516            * </p>
517            *
518            * @param userId the user id to search with
519            * @param orderByComparator the comparator to order the set by
520            * @return the last matching social activity
521            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
522            * @throws SystemException if a system exception occurred
523            */
524            public static com.liferay.portlet.social.model.SocialActivity findByUserId_Last(
525                    long userId,
526                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
527                    throws com.liferay.portal.kernel.exception.SystemException,
528                            com.liferay.portlet.social.NoSuchActivityException {
529                    return getPersistence().findByUserId_Last(userId, orderByComparator);
530            }
531    
532            /**
533            * Finds the social activities before and after the current social activity in the ordered set where userId = &#63;.
534            *
535            * <p>
536            * 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.
537            * </p>
538            *
539            * @param activityId the primary key of the current social activity
540            * @param userId the user id to search with
541            * @param orderByComparator the comparator to order the set by
542            * @return the previous, current, and next social activity
543            * @throws com.liferay.portlet.social.NoSuchActivityException if a social activity with the primary key could not be found
544            * @throws SystemException if a system exception occurred
545            */
546            public static com.liferay.portlet.social.model.SocialActivity[] findByUserId_PrevAndNext(
547                    long activityId, long userId,
548                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
549                    throws com.liferay.portal.kernel.exception.SystemException,
550                            com.liferay.portlet.social.NoSuchActivityException {
551                    return getPersistence()
552                                       .findByUserId_PrevAndNext(activityId, userId,
553                            orderByComparator);
554            }
555    
556            /**
557            * Finds the social activity where mirrorActivityId = &#63; or throws a {@link com.liferay.portlet.social.NoSuchActivityException} if it could not be found.
558            *
559            * @param mirrorActivityId the mirror activity id to search with
560            * @return the matching social activity
561            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
562            * @throws SystemException if a system exception occurred
563            */
564            public static com.liferay.portlet.social.model.SocialActivity findByMirrorActivityId(
565                    long mirrorActivityId)
566                    throws com.liferay.portal.kernel.exception.SystemException,
567                            com.liferay.portlet.social.NoSuchActivityException {
568                    return getPersistence().findByMirrorActivityId(mirrorActivityId);
569            }
570    
571            /**
572            * Finds the social activity where mirrorActivityId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
573            *
574            * @param mirrorActivityId the mirror activity id to search with
575            * @return the matching social activity, or <code>null</code> if a matching social activity could not be found
576            * @throws SystemException if a system exception occurred
577            */
578            public static com.liferay.portlet.social.model.SocialActivity fetchByMirrorActivityId(
579                    long mirrorActivityId)
580                    throws com.liferay.portal.kernel.exception.SystemException {
581                    return getPersistence().fetchByMirrorActivityId(mirrorActivityId);
582            }
583    
584            /**
585            * Finds the social activity where mirrorActivityId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
586            *
587            * @param mirrorActivityId the mirror activity id to search with
588            * @return the matching social activity, or <code>null</code> if a matching social activity could not be found
589            * @throws SystemException if a system exception occurred
590            */
591            public static com.liferay.portlet.social.model.SocialActivity fetchByMirrorActivityId(
592                    long mirrorActivityId, boolean retrieveFromCache)
593                    throws com.liferay.portal.kernel.exception.SystemException {
594                    return getPersistence()
595                                       .fetchByMirrorActivityId(mirrorActivityId, retrieveFromCache);
596            }
597    
598            /**
599            * Finds all the social activities where classNameId = &#63;.
600            *
601            * @param classNameId the class name id to search with
602            * @return the matching social activities
603            * @throws SystemException if a system exception occurred
604            */
605            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByClassNameId(
606                    long classNameId)
607                    throws com.liferay.portal.kernel.exception.SystemException {
608                    return getPersistence().findByClassNameId(classNameId);
609            }
610    
611            /**
612            * Finds a range of all the social activities where classNameId = &#63;.
613            *
614            * <p>
615            * 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.
616            * </p>
617            *
618            * @param classNameId the class name id to search with
619            * @param start the lower bound of the range of social activities to return
620            * @param end the upper bound of the range of social activities to return (not inclusive)
621            * @return the range of matching social activities
622            * @throws SystemException if a system exception occurred
623            */
624            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByClassNameId(
625                    long classNameId, int start, int end)
626                    throws com.liferay.portal.kernel.exception.SystemException {
627                    return getPersistence().findByClassNameId(classNameId, start, end);
628            }
629    
630            /**
631            * Finds an ordered range of all the social activities where classNameId = &#63;.
632            *
633            * <p>
634            * 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.
635            * </p>
636            *
637            * @param classNameId the class name id to search with
638            * @param start the lower bound of the range of social activities to return
639            * @param end the upper bound of the range of social activities to return (not inclusive)
640            * @param orderByComparator the comparator to order the results by
641            * @return the ordered range of matching social activities
642            * @throws SystemException if a system exception occurred
643            */
644            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByClassNameId(
645                    long classNameId, int start, int end,
646                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
647                    throws com.liferay.portal.kernel.exception.SystemException {
648                    return getPersistence()
649                                       .findByClassNameId(classNameId, start, end, orderByComparator);
650            }
651    
652            /**
653            * Finds the first social activity in the ordered set where classNameId = &#63;.
654            *
655            * <p>
656            * 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.
657            * </p>
658            *
659            * @param classNameId the class name id to search with
660            * @param orderByComparator the comparator to order the set by
661            * @return the first matching social activity
662            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
663            * @throws SystemException if a system exception occurred
664            */
665            public static com.liferay.portlet.social.model.SocialActivity findByClassNameId_First(
666                    long classNameId,
667                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
668                    throws com.liferay.portal.kernel.exception.SystemException,
669                            com.liferay.portlet.social.NoSuchActivityException {
670                    return getPersistence()
671                                       .findByClassNameId_First(classNameId, orderByComparator);
672            }
673    
674            /**
675            * Finds the last social activity in the ordered set where classNameId = &#63;.
676            *
677            * <p>
678            * 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.
679            * </p>
680            *
681            * @param classNameId the class name id to search with
682            * @param orderByComparator the comparator to order the set by
683            * @return the last matching social activity
684            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
685            * @throws SystemException if a system exception occurred
686            */
687            public static com.liferay.portlet.social.model.SocialActivity findByClassNameId_Last(
688                    long classNameId,
689                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
690                    throws com.liferay.portal.kernel.exception.SystemException,
691                            com.liferay.portlet.social.NoSuchActivityException {
692                    return getPersistence()
693                                       .findByClassNameId_Last(classNameId, orderByComparator);
694            }
695    
696            /**
697            * Finds the social activities before and after the current social activity in the ordered set where classNameId = &#63;.
698            *
699            * <p>
700            * 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.
701            * </p>
702            *
703            * @param activityId the primary key of the current social activity
704            * @param classNameId the class name id to search with
705            * @param orderByComparator the comparator to order the set by
706            * @return the previous, current, and next social activity
707            * @throws com.liferay.portlet.social.NoSuchActivityException if a social activity with the primary key could not be found
708            * @throws SystemException if a system exception occurred
709            */
710            public static com.liferay.portlet.social.model.SocialActivity[] findByClassNameId_PrevAndNext(
711                    long activityId, long classNameId,
712                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
713                    throws com.liferay.portal.kernel.exception.SystemException,
714                            com.liferay.portlet.social.NoSuchActivityException {
715                    return getPersistence()
716                                       .findByClassNameId_PrevAndNext(activityId, classNameId,
717                            orderByComparator);
718            }
719    
720            /**
721            * Finds all the social activities where receiverUserId = &#63;.
722            *
723            * @param receiverUserId the receiver user id to search with
724            * @return the matching social activities
725            * @throws SystemException if a system exception occurred
726            */
727            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByReceiverUserId(
728                    long receiverUserId)
729                    throws com.liferay.portal.kernel.exception.SystemException {
730                    return getPersistence().findByReceiverUserId(receiverUserId);
731            }
732    
733            /**
734            * Finds a range of all the social activities where receiverUserId = &#63;.
735            *
736            * <p>
737            * 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.
738            * </p>
739            *
740            * @param receiverUserId the receiver user id to search with
741            * @param start the lower bound of the range of social activities to return
742            * @param end the upper bound of the range of social activities to return (not inclusive)
743            * @return the range of matching social activities
744            * @throws SystemException if a system exception occurred
745            */
746            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByReceiverUserId(
747                    long receiverUserId, int start, int end)
748                    throws com.liferay.portal.kernel.exception.SystemException {
749                    return getPersistence().findByReceiverUserId(receiverUserId, start, end);
750            }
751    
752            /**
753            * Finds an ordered range of all the social activities where receiverUserId = &#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 receiverUserId the receiver user id to search with
760            * @param start the lower bound of the range of social activities to return
761            * @param end the upper bound of the range of social activities to return (not inclusive)
762            * @param orderByComparator the comparator to order the results by
763            * @return the ordered range of matching social activities
764            * @throws SystemException if a system exception occurred
765            */
766            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByReceiverUserId(
767                    long receiverUserId, int start, int end,
768                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
769                    throws com.liferay.portal.kernel.exception.SystemException {
770                    return getPersistence()
771                                       .findByReceiverUserId(receiverUserId, start, end,
772                            orderByComparator);
773            }
774    
775            /**
776            * Finds the first social activity in the ordered set where receiverUserId = &#63;.
777            *
778            * <p>
779            * 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.
780            * </p>
781            *
782            * @param receiverUserId the receiver user id to search with
783            * @param orderByComparator the comparator to order the set by
784            * @return the first matching social activity
785            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
786            * @throws SystemException if a system exception occurred
787            */
788            public static com.liferay.portlet.social.model.SocialActivity findByReceiverUserId_First(
789                    long receiverUserId,
790                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
791                    throws com.liferay.portal.kernel.exception.SystemException,
792                            com.liferay.portlet.social.NoSuchActivityException {
793                    return getPersistence()
794                                       .findByReceiverUserId_First(receiverUserId, orderByComparator);
795            }
796    
797            /**
798            * Finds the last social activity in the ordered set where receiverUserId = &#63;.
799            *
800            * <p>
801            * 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.
802            * </p>
803            *
804            * @param receiverUserId the receiver user id to search with
805            * @param orderByComparator the comparator to order the set by
806            * @return the last matching social activity
807            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
808            * @throws SystemException if a system exception occurred
809            */
810            public static com.liferay.portlet.social.model.SocialActivity findByReceiverUserId_Last(
811                    long receiverUserId,
812                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
813                    throws com.liferay.portal.kernel.exception.SystemException,
814                            com.liferay.portlet.social.NoSuchActivityException {
815                    return getPersistence()
816                                       .findByReceiverUserId_Last(receiverUserId, orderByComparator);
817            }
818    
819            /**
820            * Finds the social activities before and after the current social activity in the ordered set where receiverUserId = &#63;.
821            *
822            * <p>
823            * 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.
824            * </p>
825            *
826            * @param activityId the primary key of the current social activity
827            * @param receiverUserId the receiver user id to search with
828            * @param orderByComparator the comparator to order the set by
829            * @return the previous, current, and next social activity
830            * @throws com.liferay.portlet.social.NoSuchActivityException if a social activity with the primary key could not be found
831            * @throws SystemException if a system exception occurred
832            */
833            public static com.liferay.portlet.social.model.SocialActivity[] findByReceiverUserId_PrevAndNext(
834                    long activityId, long receiverUserId,
835                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
836                    throws com.liferay.portal.kernel.exception.SystemException,
837                            com.liferay.portlet.social.NoSuchActivityException {
838                    return getPersistence()
839                                       .findByReceiverUserId_PrevAndNext(activityId,
840                            receiverUserId, orderByComparator);
841            }
842    
843            /**
844            * Finds all the social activities where classNameId = &#63; and classPK = &#63;.
845            *
846            * @param classNameId the class name id to search with
847            * @param classPK the class p k to search with
848            * @return the matching social activities
849            * @throws SystemException if a system exception occurred
850            */
851            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByC_C(
852                    long classNameId, long classPK)
853                    throws com.liferay.portal.kernel.exception.SystemException {
854                    return getPersistence().findByC_C(classNameId, classPK);
855            }
856    
857            /**
858            * Finds a range of all the social activities where classNameId = &#63; and classPK = &#63;.
859            *
860            * <p>
861            * 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.
862            * </p>
863            *
864            * @param classNameId the class name id to search with
865            * @param classPK the class p k to search with
866            * @param start the lower bound of the range of social activities to return
867            * @param end the upper bound of the range of social activities to return (not inclusive)
868            * @return the range of matching social activities
869            * @throws SystemException if a system exception occurred
870            */
871            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByC_C(
872                    long classNameId, long classPK, int start, int end)
873                    throws com.liferay.portal.kernel.exception.SystemException {
874                    return getPersistence().findByC_C(classNameId, classPK, start, end);
875            }
876    
877            /**
878            * Finds an ordered range of all the social activities where classNameId = &#63; and classPK = &#63;.
879            *
880            * <p>
881            * 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.
882            * </p>
883            *
884            * @param classNameId the class name id to search with
885            * @param classPK the class p k to search with
886            * @param start the lower bound of the range of social activities to return
887            * @param end the upper bound of the range of social activities to return (not inclusive)
888            * @param orderByComparator the comparator to order the results by
889            * @return the ordered range of matching social activities
890            * @throws SystemException if a system exception occurred
891            */
892            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByC_C(
893                    long classNameId, long classPK, int start, int end,
894                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
895                    throws com.liferay.portal.kernel.exception.SystemException {
896                    return getPersistence()
897                                       .findByC_C(classNameId, classPK, start, end,
898                            orderByComparator);
899            }
900    
901            /**
902            * Finds the first social activity in the ordered set where classNameId = &#63; and classPK = &#63;.
903            *
904            * <p>
905            * 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.
906            * </p>
907            *
908            * @param classNameId the class name id to search with
909            * @param classPK the class p k to search with
910            * @param orderByComparator the comparator to order the set by
911            * @return the first matching social activity
912            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
913            * @throws SystemException if a system exception occurred
914            */
915            public static com.liferay.portlet.social.model.SocialActivity findByC_C_First(
916                    long classNameId, long classPK,
917                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
918                    throws com.liferay.portal.kernel.exception.SystemException,
919                            com.liferay.portlet.social.NoSuchActivityException {
920                    return getPersistence()
921                                       .findByC_C_First(classNameId, classPK, orderByComparator);
922            }
923    
924            /**
925            * Finds the last social activity in the ordered set where classNameId = &#63; and classPK = &#63;.
926            *
927            * <p>
928            * 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.
929            * </p>
930            *
931            * @param classNameId the class name id to search with
932            * @param classPK the class p k to search with
933            * @param orderByComparator the comparator to order the set by
934            * @return the last matching social activity
935            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
936            * @throws SystemException if a system exception occurred
937            */
938            public static com.liferay.portlet.social.model.SocialActivity findByC_C_Last(
939                    long classNameId, long classPK,
940                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
941                    throws com.liferay.portal.kernel.exception.SystemException,
942                            com.liferay.portlet.social.NoSuchActivityException {
943                    return getPersistence()
944                                       .findByC_C_Last(classNameId, classPK, orderByComparator);
945            }
946    
947            /**
948            * Finds the social activities before and after the current social activity in the ordered set where classNameId = &#63; and classPK = &#63;.
949            *
950            * <p>
951            * 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.
952            * </p>
953            *
954            * @param activityId the primary key of the current social activity
955            * @param classNameId the class name id to search with
956            * @param classPK the class p k to search with
957            * @param orderByComparator the comparator to order the set by
958            * @return the previous, current, and next social activity
959            * @throws com.liferay.portlet.social.NoSuchActivityException if a social activity with the primary key could not be found
960            * @throws SystemException if a system exception occurred
961            */
962            public static com.liferay.portlet.social.model.SocialActivity[] findByC_C_PrevAndNext(
963                    long activityId, long classNameId, long classPK,
964                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
965                    throws com.liferay.portal.kernel.exception.SystemException,
966                            com.liferay.portlet.social.NoSuchActivityException {
967                    return getPersistence()
968                                       .findByC_C_PrevAndNext(activityId, classNameId, classPK,
969                            orderByComparator);
970            }
971    
972            /**
973            * Finds all the social activities where mirrorActivityId = &#63; and classNameId = &#63; and classPK = &#63;.
974            *
975            * @param mirrorActivityId the mirror activity id to search with
976            * @param classNameId the class name id to search with
977            * @param classPK the class p k to search with
978            * @return the matching social activities
979            * @throws SystemException if a system exception occurred
980            */
981            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByM_C_C(
982                    long mirrorActivityId, long classNameId, long classPK)
983                    throws com.liferay.portal.kernel.exception.SystemException {
984                    return getPersistence()
985                                       .findByM_C_C(mirrorActivityId, classNameId, classPK);
986            }
987    
988            /**
989            * Finds a range of all the social activities where mirrorActivityId = &#63; and classNameId = &#63; and classPK = &#63;.
990            *
991            * <p>
992            * 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.
993            * </p>
994            *
995            * @param mirrorActivityId the mirror activity id to search with
996            * @param classNameId the class name id to search with
997            * @param classPK the class p k to search with
998            * @param start the lower bound of the range of social activities to return
999            * @param end the upper bound of the range of social activities to return (not inclusive)
1000            * @return the range of matching social activities
1001            * @throws SystemException if a system exception occurred
1002            */
1003            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByM_C_C(
1004                    long mirrorActivityId, long classNameId, long classPK, int start,
1005                    int end) throws com.liferay.portal.kernel.exception.SystemException {
1006                    return getPersistence()
1007                                       .findByM_C_C(mirrorActivityId, classNameId, classPK, start,
1008                            end);
1009            }
1010    
1011            /**
1012            * Finds an ordered range of all the social activities where mirrorActivityId = &#63; and classNameId = &#63; and classPK = &#63;.
1013            *
1014            * <p>
1015            * 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.
1016            * </p>
1017            *
1018            * @param mirrorActivityId the mirror activity id to search with
1019            * @param classNameId the class name id to search with
1020            * @param classPK the class p k to search with
1021            * @param start the lower bound of the range of social activities to return
1022            * @param end the upper bound of the range of social activities to return (not inclusive)
1023            * @param orderByComparator the comparator to order the results by
1024            * @return the ordered range of matching social activities
1025            * @throws SystemException if a system exception occurred
1026            */
1027            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByM_C_C(
1028                    long mirrorActivityId, long classNameId, long classPK, int start,
1029                    int end,
1030                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1031                    throws com.liferay.portal.kernel.exception.SystemException {
1032                    return getPersistence()
1033                                       .findByM_C_C(mirrorActivityId, classNameId, classPK, start,
1034                            end, orderByComparator);
1035            }
1036    
1037            /**
1038            * Finds the first social activity in the ordered set where mirrorActivityId = &#63; and classNameId = &#63; and classPK = &#63;.
1039            *
1040            * <p>
1041            * 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.
1042            * </p>
1043            *
1044            * @param mirrorActivityId the mirror activity id to search with
1045            * @param classNameId the class name id to search with
1046            * @param classPK the class p k to search with
1047            * @param orderByComparator the comparator to order the set by
1048            * @return the first matching social activity
1049            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
1050            * @throws SystemException if a system exception occurred
1051            */
1052            public static com.liferay.portlet.social.model.SocialActivity findByM_C_C_First(
1053                    long mirrorActivityId, long classNameId, long classPK,
1054                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1055                    throws com.liferay.portal.kernel.exception.SystemException,
1056                            com.liferay.portlet.social.NoSuchActivityException {
1057                    return getPersistence()
1058                                       .findByM_C_C_First(mirrorActivityId, classNameId, classPK,
1059                            orderByComparator);
1060            }
1061    
1062            /**
1063            * Finds the last social activity in the ordered set where mirrorActivityId = &#63; and classNameId = &#63; and classPK = &#63;.
1064            *
1065            * <p>
1066            * 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.
1067            * </p>
1068            *
1069            * @param mirrorActivityId the mirror activity id to search with
1070            * @param classNameId the class name id to search with
1071            * @param classPK the class p k to search with
1072            * @param orderByComparator the comparator to order the set by
1073            * @return the last matching social activity
1074            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
1075            * @throws SystemException if a system exception occurred
1076            */
1077            public static com.liferay.portlet.social.model.SocialActivity findByM_C_C_Last(
1078                    long mirrorActivityId, long classNameId, long classPK,
1079                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1080                    throws com.liferay.portal.kernel.exception.SystemException,
1081                            com.liferay.portlet.social.NoSuchActivityException {
1082                    return getPersistence()
1083                                       .findByM_C_C_Last(mirrorActivityId, classNameId, classPK,
1084                            orderByComparator);
1085            }
1086    
1087            /**
1088            * Finds the social activities before and after the current social activity in the ordered set where mirrorActivityId = &#63; and classNameId = &#63; and classPK = &#63;.
1089            *
1090            * <p>
1091            * 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.
1092            * </p>
1093            *
1094            * @param activityId the primary key of the current social activity
1095            * @param mirrorActivityId the mirror activity id to search with
1096            * @param classNameId the class name id to search with
1097            * @param classPK the class p k to search with
1098            * @param orderByComparator the comparator to order the set by
1099            * @return the previous, current, and next social activity
1100            * @throws com.liferay.portlet.social.NoSuchActivityException if a social activity with the primary key could not be found
1101            * @throws SystemException if a system exception occurred
1102            */
1103            public static com.liferay.portlet.social.model.SocialActivity[] findByM_C_C_PrevAndNext(
1104                    long activityId, long mirrorActivityId, long classNameId, long classPK,
1105                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1106                    throws com.liferay.portal.kernel.exception.SystemException,
1107                            com.liferay.portlet.social.NoSuchActivityException {
1108                    return getPersistence()
1109                                       .findByM_C_C_PrevAndNext(activityId, mirrorActivityId,
1110                            classNameId, classPK, orderByComparator);
1111            }
1112    
1113            /**
1114            * Finds the social activity where groupId = &#63; and userId = &#63; and createDate = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and receiverUserId = &#63; or throws a {@link com.liferay.portlet.social.NoSuchActivityException} if it could not be found.
1115            *
1116            * @param groupId the group id to search with
1117            * @param userId the user id to search with
1118            * @param createDate the create date to search with
1119            * @param classNameId the class name id to search with
1120            * @param classPK the class p k to search with
1121            * @param type the type to search with
1122            * @param receiverUserId the receiver user id to search with
1123            * @return the matching social activity
1124            * @throws com.liferay.portlet.social.NoSuchActivityException if a matching social activity could not be found
1125            * @throws SystemException if a system exception occurred
1126            */
1127            public static com.liferay.portlet.social.model.SocialActivity findByG_U_CD_C_C_T_R(
1128                    long groupId, long userId, long createDate, long classNameId,
1129                    long classPK, int type, long receiverUserId)
1130                    throws com.liferay.portal.kernel.exception.SystemException,
1131                            com.liferay.portlet.social.NoSuchActivityException {
1132                    return getPersistence()
1133                                       .findByG_U_CD_C_C_T_R(groupId, userId, createDate,
1134                            classNameId, classPK, type, receiverUserId);
1135            }
1136    
1137            /**
1138            * Finds the social activity where groupId = &#63; and userId = &#63; and createDate = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and receiverUserId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
1139            *
1140            * @param groupId the group id to search with
1141            * @param userId the user id to search with
1142            * @param createDate the create date to search with
1143            * @param classNameId the class name id to search with
1144            * @param classPK the class p k to search with
1145            * @param type the type to search with
1146            * @param receiverUserId the receiver user id to search with
1147            * @return the matching social activity, or <code>null</code> if a matching social activity could not be found
1148            * @throws SystemException if a system exception occurred
1149            */
1150            public static com.liferay.portlet.social.model.SocialActivity fetchByG_U_CD_C_C_T_R(
1151                    long groupId, long userId, long createDate, long classNameId,
1152                    long classPK, int type, long receiverUserId)
1153                    throws com.liferay.portal.kernel.exception.SystemException {
1154                    return getPersistence()
1155                                       .fetchByG_U_CD_C_C_T_R(groupId, userId, createDate,
1156                            classNameId, classPK, type, receiverUserId);
1157            }
1158    
1159            /**
1160            * Finds the social activity where groupId = &#63; and userId = &#63; and createDate = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and receiverUserId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
1161            *
1162            * @param groupId the group id to search with
1163            * @param userId the user id to search with
1164            * @param createDate the create date to search with
1165            * @param classNameId the class name id to search with
1166            * @param classPK the class p k to search with
1167            * @param type the type to search with
1168            * @param receiverUserId the receiver user id to search with
1169            * @return the matching social activity, or <code>null</code> if a matching social activity could not be found
1170            * @throws SystemException if a system exception occurred
1171            */
1172            public static com.liferay.portlet.social.model.SocialActivity fetchByG_U_CD_C_C_T_R(
1173                    long groupId, long userId, long createDate, long classNameId,
1174                    long classPK, int type, long receiverUserId, boolean retrieveFromCache)
1175                    throws com.liferay.portal.kernel.exception.SystemException {
1176                    return getPersistence()
1177                                       .fetchByG_U_CD_C_C_T_R(groupId, userId, createDate,
1178                            classNameId, classPK, type, receiverUserId, retrieveFromCache);
1179            }
1180    
1181            /**
1182            * Finds all the social activities.
1183            *
1184            * @return the social activities
1185            * @throws SystemException if a system exception occurred
1186            */
1187            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findAll()
1188                    throws com.liferay.portal.kernel.exception.SystemException {
1189                    return getPersistence().findAll();
1190            }
1191    
1192            /**
1193            * Finds a range of all the social activities.
1194            *
1195            * <p>
1196            * 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.
1197            * </p>
1198            *
1199            * @param start the lower bound of the range of social activities to return
1200            * @param end the upper bound of the range of social activities to return (not inclusive)
1201            * @return the range of social activities
1202            * @throws SystemException if a system exception occurred
1203            */
1204            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findAll(
1205                    int start, int end)
1206                    throws com.liferay.portal.kernel.exception.SystemException {
1207                    return getPersistence().findAll(start, end);
1208            }
1209    
1210            /**
1211            * Finds an ordered range of all the social activities.
1212            *
1213            * <p>
1214            * 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.
1215            * </p>
1216            *
1217            * @param start the lower bound of the range of social activities to return
1218            * @param end the upper bound of the range of social activities to return (not inclusive)
1219            * @param orderByComparator the comparator to order the results by
1220            * @return the ordered range of social activities
1221            * @throws SystemException if a system exception occurred
1222            */
1223            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findAll(
1224                    int start, int end,
1225                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1226                    throws com.liferay.portal.kernel.exception.SystemException {
1227                    return getPersistence().findAll(start, end, orderByComparator);
1228            }
1229    
1230            /**
1231            * Removes all the social activities where groupId = &#63; from the database.
1232            *
1233            * @param groupId the group id to search with
1234            * @throws SystemException if a system exception occurred
1235            */
1236            public static void removeByGroupId(long groupId)
1237                    throws com.liferay.portal.kernel.exception.SystemException {
1238                    getPersistence().removeByGroupId(groupId);
1239            }
1240    
1241            /**
1242            * Removes all the social activities where companyId = &#63; from the database.
1243            *
1244            * @param companyId the company id to search with
1245            * @throws SystemException if a system exception occurred
1246            */
1247            public static void removeByCompanyId(long companyId)
1248                    throws com.liferay.portal.kernel.exception.SystemException {
1249                    getPersistence().removeByCompanyId(companyId);
1250            }
1251    
1252            /**
1253            * Removes all the social activities where userId = &#63; from the database.
1254            *
1255            * @param userId the user id to search with
1256            * @throws SystemException if a system exception occurred
1257            */
1258            public static void removeByUserId(long userId)
1259                    throws com.liferay.portal.kernel.exception.SystemException {
1260                    getPersistence().removeByUserId(userId);
1261            }
1262    
1263            /**
1264            * Removes the social activity where mirrorActivityId = &#63; from the database.
1265            *
1266            * @param mirrorActivityId the mirror activity id to search with
1267            * @throws SystemException if a system exception occurred
1268            */
1269            public static void removeByMirrorActivityId(long mirrorActivityId)
1270                    throws com.liferay.portal.kernel.exception.SystemException,
1271                            com.liferay.portlet.social.NoSuchActivityException {
1272                    getPersistence().removeByMirrorActivityId(mirrorActivityId);
1273            }
1274    
1275            /**
1276            * Removes all the social activities where classNameId = &#63; from the database.
1277            *
1278            * @param classNameId the class name id to search with
1279            * @throws SystemException if a system exception occurred
1280            */
1281            public static void removeByClassNameId(long classNameId)
1282                    throws com.liferay.portal.kernel.exception.SystemException {
1283                    getPersistence().removeByClassNameId(classNameId);
1284            }
1285    
1286            /**
1287            * Removes all the social activities where receiverUserId = &#63; from the database.
1288            *
1289            * @param receiverUserId the receiver user id to search with
1290            * @throws SystemException if a system exception occurred
1291            */
1292            public static void removeByReceiverUserId(long receiverUserId)
1293                    throws com.liferay.portal.kernel.exception.SystemException {
1294                    getPersistence().removeByReceiverUserId(receiverUserId);
1295            }
1296    
1297            /**
1298            * Removes all the social activities where classNameId = &#63; and classPK = &#63; from the database.
1299            *
1300            * @param classNameId the class name id to search with
1301            * @param classPK the class p k to search with
1302            * @throws SystemException if a system exception occurred
1303            */
1304            public static void removeByC_C(long classNameId, long classPK)
1305                    throws com.liferay.portal.kernel.exception.SystemException {
1306                    getPersistence().removeByC_C(classNameId, classPK);
1307            }
1308    
1309            /**
1310            * Removes all the social activities where mirrorActivityId = &#63; and classNameId = &#63; and classPK = &#63; from the database.
1311            *
1312            * @param mirrorActivityId the mirror activity id to search with
1313            * @param classNameId the class name id to search with
1314            * @param classPK the class p k to search with
1315            * @throws SystemException if a system exception occurred
1316            */
1317            public static void removeByM_C_C(long mirrorActivityId, long classNameId,
1318                    long classPK)
1319                    throws com.liferay.portal.kernel.exception.SystemException {
1320                    getPersistence().removeByM_C_C(mirrorActivityId, classNameId, classPK);
1321            }
1322    
1323            /**
1324            * Removes the social activity where groupId = &#63; and userId = &#63; and createDate = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and receiverUserId = &#63; from the database.
1325            *
1326            * @param groupId the group id to search with
1327            * @param userId the user id to search with
1328            * @param createDate the create date to search with
1329            * @param classNameId the class name id to search with
1330            * @param classPK the class p k to search with
1331            * @param type the type to search with
1332            * @param receiverUserId the receiver user id to search with
1333            * @throws SystemException if a system exception occurred
1334            */
1335            public static void removeByG_U_CD_C_C_T_R(long groupId, long userId,
1336                    long createDate, long classNameId, long classPK, int type,
1337                    long receiverUserId)
1338                    throws com.liferay.portal.kernel.exception.SystemException,
1339                            com.liferay.portlet.social.NoSuchActivityException {
1340                    getPersistence()
1341                            .removeByG_U_CD_C_C_T_R(groupId, userId, createDate, classNameId,
1342                            classPK, type, receiverUserId);
1343            }
1344    
1345            /**
1346            * Removes all the social activities from the database.
1347            *
1348            * @throws SystemException if a system exception occurred
1349            */
1350            public static void removeAll()
1351                    throws com.liferay.portal.kernel.exception.SystemException {
1352                    getPersistence().removeAll();
1353            }
1354    
1355            /**
1356            * Counts all the social activities where groupId = &#63;.
1357            *
1358            * @param groupId the group id to search with
1359            * @return the number of matching social activities
1360            * @throws SystemException if a system exception occurred
1361            */
1362            public static int countByGroupId(long groupId)
1363                    throws com.liferay.portal.kernel.exception.SystemException {
1364                    return getPersistence().countByGroupId(groupId);
1365            }
1366    
1367            /**
1368            * Counts all the social activities where companyId = &#63;.
1369            *
1370            * @param companyId the company id to search with
1371            * @return the number of matching social activities
1372            * @throws SystemException if a system exception occurred
1373            */
1374            public static int countByCompanyId(long companyId)
1375                    throws com.liferay.portal.kernel.exception.SystemException {
1376                    return getPersistence().countByCompanyId(companyId);
1377            }
1378    
1379            /**
1380            * Counts all the social activities where userId = &#63;.
1381            *
1382            * @param userId the user id to search with
1383            * @return the number of matching social activities
1384            * @throws SystemException if a system exception occurred
1385            */
1386            public static int countByUserId(long userId)
1387                    throws com.liferay.portal.kernel.exception.SystemException {
1388                    return getPersistence().countByUserId(userId);
1389            }
1390    
1391            /**
1392            * Counts all the social activities where mirrorActivityId = &#63;.
1393            *
1394            * @param mirrorActivityId the mirror activity id to search with
1395            * @return the number of matching social activities
1396            * @throws SystemException if a system exception occurred
1397            */
1398            public static int countByMirrorActivityId(long mirrorActivityId)
1399                    throws com.liferay.portal.kernel.exception.SystemException {
1400                    return getPersistence().countByMirrorActivityId(mirrorActivityId);
1401            }
1402    
1403            /**
1404            * Counts all the social activities where classNameId = &#63;.
1405            *
1406            * @param classNameId the class name id to search with
1407            * @return the number of matching social activities
1408            * @throws SystemException if a system exception occurred
1409            */
1410            public static int countByClassNameId(long classNameId)
1411                    throws com.liferay.portal.kernel.exception.SystemException {
1412                    return getPersistence().countByClassNameId(classNameId);
1413            }
1414    
1415            /**
1416            * Counts all the social activities where receiverUserId = &#63;.
1417            *
1418            * @param receiverUserId the receiver user id to search with
1419            * @return the number of matching social activities
1420            * @throws SystemException if a system exception occurred
1421            */
1422            public static int countByReceiverUserId(long receiverUserId)
1423                    throws com.liferay.portal.kernel.exception.SystemException {
1424                    return getPersistence().countByReceiverUserId(receiverUserId);
1425            }
1426    
1427            /**
1428            * Counts all the social activities where classNameId = &#63; and classPK = &#63;.
1429            *
1430            * @param classNameId the class name id to search with
1431            * @param classPK the class p k to search with
1432            * @return the number of matching social activities
1433            * @throws SystemException if a system exception occurred
1434            */
1435            public static int countByC_C(long classNameId, long classPK)
1436                    throws com.liferay.portal.kernel.exception.SystemException {
1437                    return getPersistence().countByC_C(classNameId, classPK);
1438            }
1439    
1440            /**
1441            * Counts all the social activities where mirrorActivityId = &#63; and classNameId = &#63; and classPK = &#63;.
1442            *
1443            * @param mirrorActivityId the mirror activity id to search with
1444            * @param classNameId the class name id to search with
1445            * @param classPK the class p k to search with
1446            * @return the number of matching social activities
1447            * @throws SystemException if a system exception occurred
1448            */
1449            public static int countByM_C_C(long mirrorActivityId, long classNameId,
1450                    long classPK)
1451                    throws com.liferay.portal.kernel.exception.SystemException {
1452                    return getPersistence()
1453                                       .countByM_C_C(mirrorActivityId, classNameId, classPK);
1454            }
1455    
1456            /**
1457            * Counts all the social activities where groupId = &#63; and userId = &#63; and createDate = &#63; and classNameId = &#63; and classPK = &#63; and type = &#63; and receiverUserId = &#63;.
1458            *
1459            * @param groupId the group id to search with
1460            * @param userId the user id to search with
1461            * @param createDate the create date to search with
1462            * @param classNameId the class name id to search with
1463            * @param classPK the class p k to search with
1464            * @param type the type to search with
1465            * @param receiverUserId the receiver user id to search with
1466            * @return the number of matching social activities
1467            * @throws SystemException if a system exception occurred
1468            */
1469            public static int countByG_U_CD_C_C_T_R(long groupId, long userId,
1470                    long createDate, long classNameId, long classPK, int type,
1471                    long receiverUserId)
1472                    throws com.liferay.portal.kernel.exception.SystemException {
1473                    return getPersistence()
1474                                       .countByG_U_CD_C_C_T_R(groupId, userId, createDate,
1475                            classNameId, classPK, type, receiverUserId);
1476            }
1477    
1478            /**
1479            * Counts all the social activities.
1480            *
1481            * @return the number of social activities
1482            * @throws SystemException if a system exception occurred
1483            */
1484            public static int countAll()
1485                    throws com.liferay.portal.kernel.exception.SystemException {
1486                    return getPersistence().countAll();
1487            }
1488    
1489            public static SocialActivityPersistence getPersistence() {
1490                    if (_persistence == null) {
1491                            _persistence = (SocialActivityPersistence)PortalBeanLocatorUtil.locate(SocialActivityPersistence.class.getName());
1492                    }
1493    
1494                    return _persistence;
1495            }
1496    
1497            public void setPersistence(SocialActivityPersistence persistence) {
1498                    _persistence = persistence;
1499            }
1500    
1501            private static SocialActivityPersistence _persistence;
1502    }