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