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