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