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