001    /**
002     * Copyright (c) 2000-2012 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)
099             */
100            public static SocialRelation update(SocialRelation socialRelation)
101                    throws SystemException {
102                    return getPersistence().update(socialRelation);
103            }
104    
105            /**
106             * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext)
107             */
108            public static SocialRelation update(SocialRelation socialRelation,
109                    ServiceContext serviceContext) throws SystemException {
110                    return getPersistence().update(socialRelation, 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                    throws com.liferay.portal.kernel.exception.SystemException {
162                    return getPersistence().updateImpl(socialRelation);
163            }
164    
165            /**
166            * Returns the social relation with the primary key or throws a {@link com.liferay.portlet.social.NoSuchRelationException} if it could not be found.
167            *
168            * @param relationId the primary key of the social relation
169            * @return the social relation
170            * @throws com.liferay.portlet.social.NoSuchRelationException if a social relation with the primary key could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public static com.liferay.portlet.social.model.SocialRelation findByPrimaryKey(
174                    long relationId)
175                    throws com.liferay.portal.kernel.exception.SystemException,
176                            com.liferay.portlet.social.NoSuchRelationException {
177                    return getPersistence().findByPrimaryKey(relationId);
178            }
179    
180            /**
181            * Returns the social relation with the primary key or returns <code>null</code> if it could not be found.
182            *
183            * @param relationId the primary key of the social relation
184            * @return the social relation, or <code>null</code> if a social relation with the primary key could not be found
185            * @throws SystemException if a system exception occurred
186            */
187            public static com.liferay.portlet.social.model.SocialRelation fetchByPrimaryKey(
188                    long relationId)
189                    throws com.liferay.portal.kernel.exception.SystemException {
190                    return getPersistence().fetchByPrimaryKey(relationId);
191            }
192    
193            /**
194            * Returns all the social relations where uuid = &#63;.
195            *
196            * @param uuid the uuid
197            * @return the matching social relations
198            * @throws SystemException if a system exception occurred
199            */
200            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUuid(
201                    java.lang.String uuid)
202                    throws com.liferay.portal.kernel.exception.SystemException {
203                    return getPersistence().findByUuid(uuid);
204            }
205    
206            /**
207            * Returns a range of all the social relations where uuid = &#63;.
208            *
209            * <p>
210            * 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.
211            * </p>
212            *
213            * @param uuid the uuid
214            * @param start the lower bound of the range of social relations
215            * @param end the upper bound of the range of social relations (not inclusive)
216            * @return the range of matching social relations
217            * @throws SystemException if a system exception occurred
218            */
219            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUuid(
220                    java.lang.String uuid, int start, int end)
221                    throws com.liferay.portal.kernel.exception.SystemException {
222                    return getPersistence().findByUuid(uuid, start, end);
223            }
224    
225            /**
226            * Returns an ordered range of all the social relations where uuid = &#63;.
227            *
228            * <p>
229            * 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.
230            * </p>
231            *
232            * @param uuid the uuid
233            * @param start the lower bound of the range of social relations
234            * @param end the upper bound of the range of social relations (not inclusive)
235            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
236            * @return the ordered range of matching social relations
237            * @throws SystemException if a system exception occurred
238            */
239            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUuid(
240                    java.lang.String uuid, int start, int end,
241                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
242                    throws com.liferay.portal.kernel.exception.SystemException {
243                    return getPersistence().findByUuid(uuid, start, end, orderByComparator);
244            }
245    
246            /**
247            * Returns the first social relation in the ordered set where uuid = &#63;.
248            *
249            * @param uuid the uuid
250            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
251            * @return the first matching social relation
252            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
253            * @throws SystemException if a system exception occurred
254            */
255            public static com.liferay.portlet.social.model.SocialRelation findByUuid_First(
256                    java.lang.String uuid,
257                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
258                    throws com.liferay.portal.kernel.exception.SystemException,
259                            com.liferay.portlet.social.NoSuchRelationException {
260                    return getPersistence().findByUuid_First(uuid, orderByComparator);
261            }
262    
263            /**
264            * Returns the first social relation in the ordered set where uuid = &#63;.
265            *
266            * @param uuid the uuid
267            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
268            * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found
269            * @throws SystemException if a system exception occurred
270            */
271            public static com.liferay.portlet.social.model.SocialRelation fetchByUuid_First(
272                    java.lang.String uuid,
273                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
274                    throws com.liferay.portal.kernel.exception.SystemException {
275                    return getPersistence().fetchByUuid_First(uuid, orderByComparator);
276            }
277    
278            /**
279            * Returns the last social relation in the ordered set where uuid = &#63;.
280            *
281            * @param uuid the uuid
282            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
283            * @return the last matching social relation
284            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
285            * @throws SystemException if a system exception occurred
286            */
287            public static com.liferay.portlet.social.model.SocialRelation findByUuid_Last(
288                    java.lang.String uuid,
289                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
290                    throws com.liferay.portal.kernel.exception.SystemException,
291                            com.liferay.portlet.social.NoSuchRelationException {
292                    return getPersistence().findByUuid_Last(uuid, orderByComparator);
293            }
294    
295            /**
296            * Returns the last social relation in the ordered set where uuid = &#63;.
297            *
298            * @param uuid the uuid
299            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
300            * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found
301            * @throws SystemException if a system exception occurred
302            */
303            public static com.liferay.portlet.social.model.SocialRelation fetchByUuid_Last(
304                    java.lang.String uuid,
305                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
306                    throws com.liferay.portal.kernel.exception.SystemException {
307                    return getPersistence().fetchByUuid_Last(uuid, orderByComparator);
308            }
309    
310            /**
311            * Returns the social relations before and after the current social relation in the ordered set where uuid = &#63;.
312            *
313            * @param relationId the primary key of the current social relation
314            * @param uuid the uuid
315            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
316            * @return the previous, current, and next social relation
317            * @throws com.liferay.portlet.social.NoSuchRelationException if a social relation with the primary key could not be found
318            * @throws SystemException if a system exception occurred
319            */
320            public static com.liferay.portlet.social.model.SocialRelation[] findByUuid_PrevAndNext(
321                    long relationId, java.lang.String uuid,
322                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
323                    throws com.liferay.portal.kernel.exception.SystemException,
324                            com.liferay.portlet.social.NoSuchRelationException {
325                    return getPersistence()
326                                       .findByUuid_PrevAndNext(relationId, uuid, orderByComparator);
327            }
328    
329            /**
330            * Returns all the social relations where uuid = &#63; and companyId = &#63;.
331            *
332            * @param uuid the uuid
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> findByUuid_C(
338                    java.lang.String uuid, long companyId)
339                    throws com.liferay.portal.kernel.exception.SystemException {
340                    return getPersistence().findByUuid_C(uuid, companyId);
341            }
342    
343            /**
344            * Returns a range of all the social relations where uuid = &#63; and 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 uuid the uuid
351            * @param companyId the company ID
352            * @param start the lower bound of the range of social relations
353            * @param end the upper bound of the range of social relations (not inclusive)
354            * @return the range of matching social relations
355            * @throws SystemException if a system exception occurred
356            */
357            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUuid_C(
358                    java.lang.String uuid, long companyId, int start, int end)
359                    throws com.liferay.portal.kernel.exception.SystemException {
360                    return getPersistence().findByUuid_C(uuid, companyId, start, end);
361            }
362    
363            /**
364            * Returns an ordered range of all the social relations where uuid = &#63; and companyId = &#63;.
365            *
366            * <p>
367            * 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.
368            * </p>
369            *
370            * @param uuid the uuid
371            * @param companyId the company ID
372            * @param start the lower bound of the range of social relations
373            * @param end the upper bound of the range of social relations (not inclusive)
374            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
375            * @return the ordered range of matching social relations
376            * @throws SystemException if a system exception occurred
377            */
378            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUuid_C(
379                    java.lang.String uuid, long companyId, int start, int end,
380                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
381                    throws com.liferay.portal.kernel.exception.SystemException {
382                    return getPersistence()
383                                       .findByUuid_C(uuid, companyId, start, end, orderByComparator);
384            }
385    
386            /**
387            * Returns the first social relation in the ordered set where uuid = &#63; and companyId = &#63;.
388            *
389            * @param uuid the uuid
390            * @param companyId the company ID
391            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
392            * @return the first matching social relation
393            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
394            * @throws SystemException if a system exception occurred
395            */
396            public static com.liferay.portlet.social.model.SocialRelation findByUuid_C_First(
397                    java.lang.String uuid, long companyId,
398                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
399                    throws com.liferay.portal.kernel.exception.SystemException,
400                            com.liferay.portlet.social.NoSuchRelationException {
401                    return getPersistence()
402                                       .findByUuid_C_First(uuid, companyId, orderByComparator);
403            }
404    
405            /**
406            * Returns the first social relation in the ordered set where uuid = &#63; and companyId = &#63;.
407            *
408            * @param uuid the uuid
409            * @param companyId the company ID
410            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
411            * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found
412            * @throws SystemException if a system exception occurred
413            */
414            public static com.liferay.portlet.social.model.SocialRelation fetchByUuid_C_First(
415                    java.lang.String uuid, long companyId,
416                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
417                    throws com.liferay.portal.kernel.exception.SystemException {
418                    return getPersistence()
419                                       .fetchByUuid_C_First(uuid, companyId, orderByComparator);
420            }
421    
422            /**
423            * Returns the last social relation in the ordered set where uuid = &#63; and companyId = &#63;.
424            *
425            * @param uuid the uuid
426            * @param companyId the company ID
427            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
428            * @return the last matching social relation
429            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
430            * @throws SystemException if a system exception occurred
431            */
432            public static com.liferay.portlet.social.model.SocialRelation findByUuid_C_Last(
433                    java.lang.String uuid, long companyId,
434                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
435                    throws com.liferay.portal.kernel.exception.SystemException,
436                            com.liferay.portlet.social.NoSuchRelationException {
437                    return getPersistence()
438                                       .findByUuid_C_Last(uuid, companyId, orderByComparator);
439            }
440    
441            /**
442            * Returns the last social relation in the ordered set where uuid = &#63; and companyId = &#63;.
443            *
444            * @param uuid the uuid
445            * @param companyId the company ID
446            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
447            * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found
448            * @throws SystemException if a system exception occurred
449            */
450            public static com.liferay.portlet.social.model.SocialRelation fetchByUuid_C_Last(
451                    java.lang.String uuid, long companyId,
452                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
453                    throws com.liferay.portal.kernel.exception.SystemException {
454                    return getPersistence()
455                                       .fetchByUuid_C_Last(uuid, companyId, orderByComparator);
456            }
457    
458            /**
459            * Returns the social relations before and after the current social relation in the ordered set where uuid = &#63; and companyId = &#63;.
460            *
461            * @param relationId the primary key of the current social relation
462            * @param uuid the uuid
463            * @param companyId the company ID
464            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
465            * @return the previous, current, and next social relation
466            * @throws com.liferay.portlet.social.NoSuchRelationException if a social relation with the primary key could not be found
467            * @throws SystemException if a system exception occurred
468            */
469            public static com.liferay.portlet.social.model.SocialRelation[] findByUuid_C_PrevAndNext(
470                    long relationId, java.lang.String uuid, long companyId,
471                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
472                    throws com.liferay.portal.kernel.exception.SystemException,
473                            com.liferay.portlet.social.NoSuchRelationException {
474                    return getPersistence()
475                                       .findByUuid_C_PrevAndNext(relationId, uuid, companyId,
476                            orderByComparator);
477            }
478    
479            /**
480            * Returns all the social relations where companyId = &#63;.
481            *
482            * @param companyId the company ID
483            * @return the matching social relations
484            * @throws SystemException if a system exception occurred
485            */
486            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByCompanyId(
487                    long companyId)
488                    throws com.liferay.portal.kernel.exception.SystemException {
489                    return getPersistence().findByCompanyId(companyId);
490            }
491    
492            /**
493            * Returns a range of all the social relations where companyId = &#63;.
494            *
495            * <p>
496            * 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.
497            * </p>
498            *
499            * @param companyId the company ID
500            * @param start the lower bound of the range of social relations
501            * @param end the upper bound of the range of social relations (not inclusive)
502            * @return the range of matching social relations
503            * @throws SystemException if a system exception occurred
504            */
505            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByCompanyId(
506                    long companyId, int start, int end)
507                    throws com.liferay.portal.kernel.exception.SystemException {
508                    return getPersistence().findByCompanyId(companyId, start, end);
509            }
510    
511            /**
512            * Returns an ordered range of all the social relations where companyId = &#63;.
513            *
514            * <p>
515            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
516            * </p>
517            *
518            * @param companyId the company ID
519            * @param start the lower bound of the range of social relations
520            * @param end the upper bound of the range of social relations (not inclusive)
521            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
522            * @return the ordered range of matching social relations
523            * @throws SystemException if a system exception occurred
524            */
525            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByCompanyId(
526                    long companyId, int start, int end,
527                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
528                    throws com.liferay.portal.kernel.exception.SystemException {
529                    return getPersistence()
530                                       .findByCompanyId(companyId, start, end, orderByComparator);
531            }
532    
533            /**
534            * Returns the first social relation in the ordered set where companyId = &#63;.
535            *
536            * @param companyId the company ID
537            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
538            * @return the first matching social relation
539            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
540            * @throws SystemException if a system exception occurred
541            */
542            public static com.liferay.portlet.social.model.SocialRelation findByCompanyId_First(
543                    long companyId,
544                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
545                    throws com.liferay.portal.kernel.exception.SystemException,
546                            com.liferay.portlet.social.NoSuchRelationException {
547                    return getPersistence()
548                                       .findByCompanyId_First(companyId, orderByComparator);
549            }
550    
551            /**
552            * Returns the first social relation in the ordered set where companyId = &#63;.
553            *
554            * @param companyId the company ID
555            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
556            * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found
557            * @throws SystemException if a system exception occurred
558            */
559            public static com.liferay.portlet.social.model.SocialRelation fetchByCompanyId_First(
560                    long companyId,
561                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
562                    throws com.liferay.portal.kernel.exception.SystemException {
563                    return getPersistence()
564                                       .fetchByCompanyId_First(companyId, orderByComparator);
565            }
566    
567            /**
568            * Returns the last social relation in the ordered set where companyId = &#63;.
569            *
570            * @param companyId the company ID
571            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
572            * @return the last matching social relation
573            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
574            * @throws SystemException if a system exception occurred
575            */
576            public static com.liferay.portlet.social.model.SocialRelation findByCompanyId_Last(
577                    long companyId,
578                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
579                    throws com.liferay.portal.kernel.exception.SystemException,
580                            com.liferay.portlet.social.NoSuchRelationException {
581                    return getPersistence()
582                                       .findByCompanyId_Last(companyId, orderByComparator);
583            }
584    
585            /**
586            * Returns the last social relation in the ordered set where companyId = &#63;.
587            *
588            * @param companyId the company ID
589            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
590            * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found
591            * @throws SystemException if a system exception occurred
592            */
593            public static com.liferay.portlet.social.model.SocialRelation fetchByCompanyId_Last(
594                    long companyId,
595                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
596                    throws com.liferay.portal.kernel.exception.SystemException {
597                    return getPersistence()
598                                       .fetchByCompanyId_Last(companyId, orderByComparator);
599            }
600    
601            /**
602            * Returns the social relations before and after the current social relation in the ordered set where companyId = &#63;.
603            *
604            * @param relationId the primary key of the current social relation
605            * @param companyId the company ID
606            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
607            * @return the previous, current, and next social relation
608            * @throws com.liferay.portlet.social.NoSuchRelationException if a social relation with the primary key could not be found
609            * @throws SystemException if a system exception occurred
610            */
611            public static com.liferay.portlet.social.model.SocialRelation[] findByCompanyId_PrevAndNext(
612                    long relationId, long companyId,
613                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
614                    throws com.liferay.portal.kernel.exception.SystemException,
615                            com.liferay.portlet.social.NoSuchRelationException {
616                    return getPersistence()
617                                       .findByCompanyId_PrevAndNext(relationId, companyId,
618                            orderByComparator);
619            }
620    
621            /**
622            * Returns all the social relations where userId1 = &#63;.
623            *
624            * @param userId1 the user id1
625            * @return the matching social relations
626            * @throws SystemException if a system exception occurred
627            */
628            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId1(
629                    long userId1)
630                    throws com.liferay.portal.kernel.exception.SystemException {
631                    return getPersistence().findByUserId1(userId1);
632            }
633    
634            /**
635            * Returns a range of all the social relations where userId1 = &#63;.
636            *
637            * <p>
638            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
639            * </p>
640            *
641            * @param userId1 the user id1
642            * @param start the lower bound of the range of social relations
643            * @param end the upper bound of the range of social relations (not inclusive)
644            * @return the range of matching social relations
645            * @throws SystemException if a system exception occurred
646            */
647            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId1(
648                    long userId1, int start, int end)
649                    throws com.liferay.portal.kernel.exception.SystemException {
650                    return getPersistence().findByUserId1(userId1, start, end);
651            }
652    
653            /**
654            * Returns an ordered range of all the social relations where userId1 = &#63;.
655            *
656            * <p>
657            * 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.
658            * </p>
659            *
660            * @param userId1 the user id1
661            * @param start the lower bound of the range of social relations
662            * @param end the upper bound of the range of social relations (not inclusive)
663            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
664            * @return the ordered range of matching social relations
665            * @throws SystemException if a system exception occurred
666            */
667            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId1(
668                    long userId1, int start, int end,
669                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
670                    throws com.liferay.portal.kernel.exception.SystemException {
671                    return getPersistence()
672                                       .findByUserId1(userId1, start, end, orderByComparator);
673            }
674    
675            /**
676            * Returns the first social relation in the ordered set where userId1 = &#63;.
677            *
678            * @param userId1 the user id1
679            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
680            * @return the first matching social relation
681            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
682            * @throws SystemException if a system exception occurred
683            */
684            public static com.liferay.portlet.social.model.SocialRelation findByUserId1_First(
685                    long userId1,
686                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
687                    throws com.liferay.portal.kernel.exception.SystemException,
688                            com.liferay.portlet.social.NoSuchRelationException {
689                    return getPersistence().findByUserId1_First(userId1, orderByComparator);
690            }
691    
692            /**
693            * Returns the first social relation in the ordered set where userId1 = &#63;.
694            *
695            * @param userId1 the user id1
696            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
697            * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found
698            * @throws SystemException if a system exception occurred
699            */
700            public static com.liferay.portlet.social.model.SocialRelation fetchByUserId1_First(
701                    long userId1,
702                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
703                    throws com.liferay.portal.kernel.exception.SystemException {
704                    return getPersistence().fetchByUserId1_First(userId1, orderByComparator);
705            }
706    
707            /**
708            * Returns the last social relation in the ordered set where userId1 = &#63;.
709            *
710            * @param userId1 the user id1
711            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
712            * @return the last matching social relation
713            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
714            * @throws SystemException if a system exception occurred
715            */
716            public static com.liferay.portlet.social.model.SocialRelation findByUserId1_Last(
717                    long userId1,
718                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
719                    throws com.liferay.portal.kernel.exception.SystemException,
720                            com.liferay.portlet.social.NoSuchRelationException {
721                    return getPersistence().findByUserId1_Last(userId1, orderByComparator);
722            }
723    
724            /**
725            * Returns the last social relation in the ordered set where userId1 = &#63;.
726            *
727            * @param userId1 the user id1
728            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
729            * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found
730            * @throws SystemException if a system exception occurred
731            */
732            public static com.liferay.portlet.social.model.SocialRelation fetchByUserId1_Last(
733                    long userId1,
734                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
735                    throws com.liferay.portal.kernel.exception.SystemException {
736                    return getPersistence().fetchByUserId1_Last(userId1, orderByComparator);
737            }
738    
739            /**
740            * Returns the social relations before and after the current social relation in the ordered set where userId1 = &#63;.
741            *
742            * @param relationId the primary key of the current social relation
743            * @param userId1 the user id1
744            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
745            * @return the previous, current, and next social relation
746            * @throws com.liferay.portlet.social.NoSuchRelationException if a social relation with the primary key could not be found
747            * @throws SystemException if a system exception occurred
748            */
749            public static com.liferay.portlet.social.model.SocialRelation[] findByUserId1_PrevAndNext(
750                    long relationId, long userId1,
751                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
752                    throws com.liferay.portal.kernel.exception.SystemException,
753                            com.liferay.portlet.social.NoSuchRelationException {
754                    return getPersistence()
755                                       .findByUserId1_PrevAndNext(relationId, userId1,
756                            orderByComparator);
757            }
758    
759            /**
760            * Returns all the social relations where userId2 = &#63;.
761            *
762            * @param userId2 the user id2
763            * @return the matching social relations
764            * @throws SystemException if a system exception occurred
765            */
766            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId2(
767                    long userId2)
768                    throws com.liferay.portal.kernel.exception.SystemException {
769                    return getPersistence().findByUserId2(userId2);
770            }
771    
772            /**
773            * Returns a range of all the social relations where userId2 = &#63;.
774            *
775            * <p>
776            * 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.
777            * </p>
778            *
779            * @param userId2 the user id2
780            * @param start the lower bound of the range of social relations
781            * @param end the upper bound of the range of social relations (not inclusive)
782            * @return the range of matching social relations
783            * @throws SystemException if a system exception occurred
784            */
785            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId2(
786                    long userId2, int start, int end)
787                    throws com.liferay.portal.kernel.exception.SystemException {
788                    return getPersistence().findByUserId2(userId2, start, end);
789            }
790    
791            /**
792            * Returns an ordered range of all the social relations where userId2 = &#63;.
793            *
794            * <p>
795            * 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.
796            * </p>
797            *
798            * @param userId2 the user id2
799            * @param start the lower bound of the range of social relations
800            * @param end the upper bound of the range of social relations (not inclusive)
801            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
802            * @return the ordered range of matching social relations
803            * @throws SystemException if a system exception occurred
804            */
805            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId2(
806                    long userId2, int start, int end,
807                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
808                    throws com.liferay.portal.kernel.exception.SystemException {
809                    return getPersistence()
810                                       .findByUserId2(userId2, start, end, orderByComparator);
811            }
812    
813            /**
814            * Returns the first social relation in the ordered set where userId2 = &#63;.
815            *
816            * @param userId2 the user id2
817            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
818            * @return the first matching social relation
819            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
820            * @throws SystemException if a system exception occurred
821            */
822            public static com.liferay.portlet.social.model.SocialRelation findByUserId2_First(
823                    long userId2,
824                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
825                    throws com.liferay.portal.kernel.exception.SystemException,
826                            com.liferay.portlet.social.NoSuchRelationException {
827                    return getPersistence().findByUserId2_First(userId2, orderByComparator);
828            }
829    
830            /**
831            * Returns the first social relation in the ordered set where userId2 = &#63;.
832            *
833            * @param userId2 the user id2
834            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
835            * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found
836            * @throws SystemException if a system exception occurred
837            */
838            public static com.liferay.portlet.social.model.SocialRelation fetchByUserId2_First(
839                    long userId2,
840                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
841                    throws com.liferay.portal.kernel.exception.SystemException {
842                    return getPersistence().fetchByUserId2_First(userId2, orderByComparator);
843            }
844    
845            /**
846            * Returns the last social relation in the ordered set where userId2 = &#63;.
847            *
848            * @param userId2 the user id2
849            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
850            * @return the last matching social relation
851            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
852            * @throws SystemException if a system exception occurred
853            */
854            public static com.liferay.portlet.social.model.SocialRelation findByUserId2_Last(
855                    long userId2,
856                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
857                    throws com.liferay.portal.kernel.exception.SystemException,
858                            com.liferay.portlet.social.NoSuchRelationException {
859                    return getPersistence().findByUserId2_Last(userId2, orderByComparator);
860            }
861    
862            /**
863            * Returns the last social relation in the ordered set where userId2 = &#63;.
864            *
865            * @param userId2 the user id2
866            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
867            * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found
868            * @throws SystemException if a system exception occurred
869            */
870            public static com.liferay.portlet.social.model.SocialRelation fetchByUserId2_Last(
871                    long userId2,
872                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
873                    throws com.liferay.portal.kernel.exception.SystemException {
874                    return getPersistence().fetchByUserId2_Last(userId2, orderByComparator);
875            }
876    
877            /**
878            * Returns the social relations before and after the current social relation in the ordered set where userId2 = &#63;.
879            *
880            * @param relationId the primary key of the current social relation
881            * @param userId2 the user id2
882            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
883            * @return the previous, current, and next social relation
884            * @throws com.liferay.portlet.social.NoSuchRelationException if a social relation with the primary key could not be found
885            * @throws SystemException if a system exception occurred
886            */
887            public static com.liferay.portlet.social.model.SocialRelation[] findByUserId2_PrevAndNext(
888                    long relationId, long userId2,
889                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
890                    throws com.liferay.portal.kernel.exception.SystemException,
891                            com.liferay.portlet.social.NoSuchRelationException {
892                    return getPersistence()
893                                       .findByUserId2_PrevAndNext(relationId, userId2,
894                            orderByComparator);
895            }
896    
897            /**
898            * Returns all the social relations where type = &#63;.
899            *
900            * @param type the type
901            * @return the matching social relations
902            * @throws SystemException if a system exception occurred
903            */
904            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByType(
905                    int type) throws com.liferay.portal.kernel.exception.SystemException {
906                    return getPersistence().findByType(type);
907            }
908    
909            /**
910            * Returns a range of all the social relations where type = &#63;.
911            *
912            * <p>
913            * 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.
914            * </p>
915            *
916            * @param type the type
917            * @param start the lower bound of the range of social relations
918            * @param end the upper bound of the range of social relations (not inclusive)
919            * @return the range of matching social relations
920            * @throws SystemException if a system exception occurred
921            */
922            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByType(
923                    int type, int start, int end)
924                    throws com.liferay.portal.kernel.exception.SystemException {
925                    return getPersistence().findByType(type, start, end);
926            }
927    
928            /**
929            * Returns an ordered range of all the social relations where type = &#63;.
930            *
931            * <p>
932            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
933            * </p>
934            *
935            * @param type the type
936            * @param start the lower bound of the range of social relations
937            * @param end the upper bound of the range of social relations (not inclusive)
938            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
939            * @return the ordered range of matching social relations
940            * @throws SystemException if a system exception occurred
941            */
942            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByType(
943                    int type, int start, int end,
944                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
945                    throws com.liferay.portal.kernel.exception.SystemException {
946                    return getPersistence().findByType(type, start, end, orderByComparator);
947            }
948    
949            /**
950            * Returns the first social relation in the ordered set where type = &#63;.
951            *
952            * @param type the type
953            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
954            * @return the first matching social relation
955            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
956            * @throws SystemException if a system exception occurred
957            */
958            public static com.liferay.portlet.social.model.SocialRelation findByType_First(
959                    int type,
960                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
961                    throws com.liferay.portal.kernel.exception.SystemException,
962                            com.liferay.portlet.social.NoSuchRelationException {
963                    return getPersistence().findByType_First(type, orderByComparator);
964            }
965    
966            /**
967            * Returns the first social relation in the ordered set where type = &#63;.
968            *
969            * @param type the type
970            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
971            * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found
972            * @throws SystemException if a system exception occurred
973            */
974            public static com.liferay.portlet.social.model.SocialRelation fetchByType_First(
975                    int type,
976                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
977                    throws com.liferay.portal.kernel.exception.SystemException {
978                    return getPersistence().fetchByType_First(type, orderByComparator);
979            }
980    
981            /**
982            * Returns the last social relation in the ordered set where type = &#63;.
983            *
984            * @param type the type
985            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
986            * @return the last matching social relation
987            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
988            * @throws SystemException if a system exception occurred
989            */
990            public static com.liferay.portlet.social.model.SocialRelation findByType_Last(
991                    int type,
992                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
993                    throws com.liferay.portal.kernel.exception.SystemException,
994                            com.liferay.portlet.social.NoSuchRelationException {
995                    return getPersistence().findByType_Last(type, orderByComparator);
996            }
997    
998            /**
999            * Returns the last social relation in the ordered set where type = &#63;.
1000            *
1001            * @param type the type
1002            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1003            * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found
1004            * @throws SystemException if a system exception occurred
1005            */
1006            public static com.liferay.portlet.social.model.SocialRelation fetchByType_Last(
1007                    int type,
1008                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1009                    throws com.liferay.portal.kernel.exception.SystemException {
1010                    return getPersistence().fetchByType_Last(type, orderByComparator);
1011            }
1012    
1013            /**
1014            * Returns the social relations before and after the current social relation in the ordered set where type = &#63;.
1015            *
1016            * @param relationId the primary key of the current social relation
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[] findByType_PrevAndNext(
1024                    long relationId, 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                                       .findByType_PrevAndNext(relationId, type, orderByComparator);
1030            }
1031    
1032            /**
1033            * Returns all the social relations where companyId = &#63; and type = &#63;.
1034            *
1035            * @param companyId the company ID
1036            * @param type the type
1037            * @return the matching social relations
1038            * @throws SystemException if a system exception occurred
1039            */
1040            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByC_T(
1041                    long companyId, int type)
1042                    throws com.liferay.portal.kernel.exception.SystemException {
1043                    return getPersistence().findByC_T(companyId, type);
1044            }
1045    
1046            /**
1047            * Returns a range of all the social relations where companyId = &#63; and type = &#63;.
1048            *
1049            * <p>
1050            * 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.
1051            * </p>
1052            *
1053            * @param companyId the company ID
1054            * @param type the type
1055            * @param start the lower bound of the range of social relations
1056            * @param end the upper bound of the range of social relations (not inclusive)
1057            * @return the range of matching social relations
1058            * @throws SystemException if a system exception occurred
1059            */
1060            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByC_T(
1061                    long companyId, int type, int start, int end)
1062                    throws com.liferay.portal.kernel.exception.SystemException {
1063                    return getPersistence().findByC_T(companyId, type, start, end);
1064            }
1065    
1066            /**
1067            * Returns an ordered range of all the social relations where companyId = &#63; and type = &#63;.
1068            *
1069            * <p>
1070            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1071            * </p>
1072            *
1073            * @param companyId the company ID
1074            * @param type the type
1075            * @param start the lower bound of the range of social relations
1076            * @param end the upper bound of the range of social relations (not inclusive)
1077            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1078            * @return the ordered range of matching social relations
1079            * @throws SystemException if a system exception occurred
1080            */
1081            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByC_T(
1082                    long companyId, int type, int start, int end,
1083                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1084                    throws com.liferay.portal.kernel.exception.SystemException {
1085                    return getPersistence()
1086                                       .findByC_T(companyId, type, start, end, orderByComparator);
1087            }
1088    
1089            /**
1090            * Returns the first social relation in the ordered set where companyId = &#63; and type = &#63;.
1091            *
1092            * @param companyId the company ID
1093            * @param type the type
1094            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1095            * @return the first matching social relation
1096            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
1097            * @throws SystemException if a system exception occurred
1098            */
1099            public static com.liferay.portlet.social.model.SocialRelation findByC_T_First(
1100                    long companyId, int type,
1101                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1102                    throws com.liferay.portal.kernel.exception.SystemException,
1103                            com.liferay.portlet.social.NoSuchRelationException {
1104                    return getPersistence()
1105                                       .findByC_T_First(companyId, type, orderByComparator);
1106            }
1107    
1108            /**
1109            * Returns the first social relation in the ordered set where companyId = &#63; and type = &#63;.
1110            *
1111            * @param companyId the company ID
1112            * @param type the type
1113            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1114            * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found
1115            * @throws SystemException if a system exception occurred
1116            */
1117            public static com.liferay.portlet.social.model.SocialRelation fetchByC_T_First(
1118                    long companyId, int type,
1119                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1120                    throws com.liferay.portal.kernel.exception.SystemException {
1121                    return getPersistence()
1122                                       .fetchByC_T_First(companyId, type, orderByComparator);
1123            }
1124    
1125            /**
1126            * Returns the last social relation in the ordered set where companyId = &#63; and type = &#63;.
1127            *
1128            * @param companyId the company ID
1129            * @param type the type
1130            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1131            * @return the last matching social relation
1132            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
1133            * @throws SystemException if a system exception occurred
1134            */
1135            public static com.liferay.portlet.social.model.SocialRelation findByC_T_Last(
1136                    long companyId, int type,
1137                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1138                    throws com.liferay.portal.kernel.exception.SystemException,
1139                            com.liferay.portlet.social.NoSuchRelationException {
1140                    return getPersistence()
1141                                       .findByC_T_Last(companyId, type, orderByComparator);
1142            }
1143    
1144            /**
1145            * Returns the last social relation in the ordered set where companyId = &#63; and type = &#63;.
1146            *
1147            * @param companyId the company ID
1148            * @param type the type
1149            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1150            * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found
1151            * @throws SystemException if a system exception occurred
1152            */
1153            public static com.liferay.portlet.social.model.SocialRelation fetchByC_T_Last(
1154                    long companyId, int type,
1155                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1156                    throws com.liferay.portal.kernel.exception.SystemException {
1157                    return getPersistence()
1158                                       .fetchByC_T_Last(companyId, type, orderByComparator);
1159            }
1160    
1161            /**
1162            * Returns the social relations before and after the current social relation in the ordered set where companyId = &#63; and type = &#63;.
1163            *
1164            * @param relationId the primary key of the current social relation
1165            * @param companyId the company ID
1166            * @param type the type
1167            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1168            * @return the previous, current, and next social relation
1169            * @throws com.liferay.portlet.social.NoSuchRelationException if a social relation with the primary key could not be found
1170            * @throws SystemException if a system exception occurred
1171            */
1172            public static com.liferay.portlet.social.model.SocialRelation[] findByC_T_PrevAndNext(
1173                    long relationId, long companyId, int type,
1174                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1175                    throws com.liferay.portal.kernel.exception.SystemException,
1176                            com.liferay.portlet.social.NoSuchRelationException {
1177                    return getPersistence()
1178                                       .findByC_T_PrevAndNext(relationId, companyId, type,
1179                            orderByComparator);
1180            }
1181    
1182            /**
1183            * Returns all the social relations where userId1 = &#63; and userId2 = &#63;.
1184            *
1185            * @param userId1 the user id1
1186            * @param userId2 the user id2
1187            * @return the matching social relations
1188            * @throws SystemException if a system exception occurred
1189            */
1190            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU1_U2(
1191                    long userId1, long userId2)
1192                    throws com.liferay.portal.kernel.exception.SystemException {
1193                    return getPersistence().findByU1_U2(userId1, userId2);
1194            }
1195    
1196            /**
1197            * Returns a range of all the social relations where userId1 = &#63; and userId2 = &#63;.
1198            *
1199            * <p>
1200            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
1201            * </p>
1202            *
1203            * @param userId1 the user id1
1204            * @param userId2 the user id2
1205            * @param start the lower bound of the range of social relations
1206            * @param end the upper bound of the range of social relations (not inclusive)
1207            * @return the range of matching social relations
1208            * @throws SystemException if a system exception occurred
1209            */
1210            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU1_U2(
1211                    long userId1, long userId2, int start, int end)
1212                    throws com.liferay.portal.kernel.exception.SystemException {
1213                    return getPersistence().findByU1_U2(userId1, userId2, start, end);
1214            }
1215    
1216            /**
1217            * Returns an ordered range of all the social relations where userId1 = &#63; and userId2 = &#63;.
1218            *
1219            * <p>
1220            * 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.
1221            * </p>
1222            *
1223            * @param userId1 the user id1
1224            * @param userId2 the user id2
1225            * @param start the lower bound of the range of social relations
1226            * @param end the upper bound of the range of social relations (not inclusive)
1227            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1228            * @return the ordered range of matching social relations
1229            * @throws SystemException if a system exception occurred
1230            */
1231            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU1_U2(
1232                    long userId1, long userId2, int start, int end,
1233                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1234                    throws com.liferay.portal.kernel.exception.SystemException {
1235                    return getPersistence()
1236                                       .findByU1_U2(userId1, userId2, start, end, orderByComparator);
1237            }
1238    
1239            /**
1240            * Returns the first social relation in the ordered set where userId1 = &#63; and userId2 = &#63;.
1241            *
1242            * @param userId1 the user id1
1243            * @param userId2 the user id2
1244            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1245            * @return the first matching social relation
1246            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
1247            * @throws SystemException if a system exception occurred
1248            */
1249            public static com.liferay.portlet.social.model.SocialRelation findByU1_U2_First(
1250                    long userId1, long userId2,
1251                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1252                    throws com.liferay.portal.kernel.exception.SystemException,
1253                            com.liferay.portlet.social.NoSuchRelationException {
1254                    return getPersistence()
1255                                       .findByU1_U2_First(userId1, userId2, orderByComparator);
1256            }
1257    
1258            /**
1259            * Returns the first social relation in the ordered set where userId1 = &#63; and userId2 = &#63;.
1260            *
1261            * @param userId1 the user id1
1262            * @param userId2 the user id2
1263            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1264            * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found
1265            * @throws SystemException if a system exception occurred
1266            */
1267            public static com.liferay.portlet.social.model.SocialRelation fetchByU1_U2_First(
1268                    long userId1, long userId2,
1269                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1270                    throws com.liferay.portal.kernel.exception.SystemException {
1271                    return getPersistence()
1272                                       .fetchByU1_U2_First(userId1, userId2, orderByComparator);
1273            }
1274    
1275            /**
1276            * Returns the last social relation in the ordered set where userId1 = &#63; and userId2 = &#63;.
1277            *
1278            * @param userId1 the user id1
1279            * @param userId2 the user id2
1280            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1281            * @return the last matching social relation
1282            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
1283            * @throws SystemException if a system exception occurred
1284            */
1285            public static com.liferay.portlet.social.model.SocialRelation findByU1_U2_Last(
1286                    long userId1, long userId2,
1287                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1288                    throws com.liferay.portal.kernel.exception.SystemException,
1289                            com.liferay.portlet.social.NoSuchRelationException {
1290                    return getPersistence()
1291                                       .findByU1_U2_Last(userId1, userId2, orderByComparator);
1292            }
1293    
1294            /**
1295            * Returns the last social relation in the ordered set where userId1 = &#63; and userId2 = &#63;.
1296            *
1297            * @param userId1 the user id1
1298            * @param userId2 the user id2
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_U2_Last(
1304                    long userId1, long userId2,
1305                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1306                    throws com.liferay.portal.kernel.exception.SystemException {
1307                    return getPersistence()
1308                                       .fetchByU1_U2_Last(userId1, userId2, orderByComparator);
1309            }
1310    
1311            /**
1312            * Returns the social relations before and after the current social relation in the ordered set where userId1 = &#63; and userId2 = &#63;.
1313            *
1314            * @param relationId the primary key of the current social relation
1315            * @param userId1 the user id1
1316            * @param userId2 the user id2
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_U2_PrevAndNext(
1323                    long relationId, long userId1, long userId2,
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_U2_PrevAndNext(relationId, userId1, userId2,
1329                            orderByComparator);
1330            }
1331    
1332            /**
1333            * Returns all the social relations where userId1 = &#63; and type = &#63;.
1334            *
1335            * @param userId1 the user id1
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> findByU1_T(
1341                    long userId1, int type)
1342                    throws com.liferay.portal.kernel.exception.SystemException {
1343                    return getPersistence().findByU1_T(userId1, type);
1344            }
1345    
1346            /**
1347            * Returns a range of all the social relations where userId1 = &#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 userId1 the user id1
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> findByU1_T(
1361                    long userId1, int type, int start, int end)
1362                    throws com.liferay.portal.kernel.exception.SystemException {
1363                    return getPersistence().findByU1_T(userId1, type, start, end);
1364            }
1365    
1366            /**
1367            * Returns an ordered range of all the social relations where userId1 = &#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 userId1 the user id1
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> findByU1_T(
1382                    long userId1, 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                                       .findByU1_T(userId1, type, start, end, orderByComparator);
1387            }
1388    
1389            /**
1390            * Returns the first social relation in the ordered set where userId1 = &#63; and type = &#63;.
1391            *
1392            * @param userId1 the user id1
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 findByU1_T_First(
1400                    long userId1, 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                                       .findByU1_T_First(userId1, type, orderByComparator);
1406            }
1407    
1408            /**
1409            * Returns the first social relation in the ordered set where userId1 = &#63; and type = &#63;.
1410            *
1411            * @param userId1 the user id1
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 fetchByU1_T_First(
1418                    long userId1, int type,
1419                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1420                    throws com.liferay.portal.kernel.exception.SystemException {
1421                    return getPersistence()
1422                                       .fetchByU1_T_First(userId1, type, orderByComparator);
1423            }
1424    
1425            /**
1426            * Returns the last social relation in the ordered set where userId1 = &#63; and type = &#63;.
1427            *
1428            * @param userId1 the user id1
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 findByU1_T_Last(
1436                    long userId1, 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().findByU1_T_Last(userId1, type, orderByComparator);
1441            }
1442    
1443            /**
1444            * Returns the last social relation in the ordered set where userId1 = &#63; and type = &#63;.
1445            *
1446            * @param userId1 the user id1
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 fetchByU1_T_Last(
1453                    long userId1, int type,
1454                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1455                    throws com.liferay.portal.kernel.exception.SystemException {
1456                    return getPersistence()
1457                                       .fetchByU1_T_Last(userId1, type, orderByComparator);
1458            }
1459    
1460            /**
1461            * Returns the social relations before and after the current social relation in the ordered set where userId1 = &#63; and type = &#63;.
1462            *
1463            * @param relationId the primary key of the current social relation
1464            * @param userId1 the user id1
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[] findByU1_T_PrevAndNext(
1472                    long relationId, long userId1, 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                                       .findByU1_T_PrevAndNext(relationId, userId1, type,
1478                            orderByComparator);
1479            }
1480    
1481            /**
1482            * Returns all the social relations where userId2 = &#63; and type = &#63;.
1483            *
1484            * @param userId2 the user id2
1485            * @param type the type
1486            * @return the matching social relations
1487            * @throws SystemException if a system exception occurred
1488            */
1489            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU2_T(
1490                    long userId2, int type)
1491                    throws com.liferay.portal.kernel.exception.SystemException {
1492                    return getPersistence().findByU2_T(userId2, type);
1493            }
1494    
1495            /**
1496            * Returns a range of all the social relations where userId2 = &#63; and type = &#63;.
1497            *
1498            * <p>
1499            * 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.
1500            * </p>
1501            *
1502            * @param userId2 the user id2
1503            * @param type the type
1504            * @param start the lower bound of the range of social relations
1505            * @param end the upper bound of the range of social relations (not inclusive)
1506            * @return the range of matching social relations
1507            * @throws SystemException if a system exception occurred
1508            */
1509            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU2_T(
1510                    long userId2, int type, int start, int end)
1511                    throws com.liferay.portal.kernel.exception.SystemException {
1512                    return getPersistence().findByU2_T(userId2, type, start, end);
1513            }
1514    
1515            /**
1516            * Returns an ordered range of all the social relations where userId2 = &#63; and type = &#63;.
1517            *
1518            * <p>
1519            * 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.
1520            * </p>
1521            *
1522            * @param userId2 the user id2
1523            * @param type the type
1524            * @param start the lower bound of the range of social relations
1525            * @param end the upper bound of the range of social relations (not inclusive)
1526            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1527            * @return the ordered range of matching social relations
1528            * @throws SystemException if a system exception occurred
1529            */
1530            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU2_T(
1531                    long userId2, int type, int start, int end,
1532                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1533                    throws com.liferay.portal.kernel.exception.SystemException {
1534                    return getPersistence()
1535                                       .findByU2_T(userId2, type, start, end, orderByComparator);
1536            }
1537    
1538            /**
1539            * Returns the first social relation in the ordered set where userId2 = &#63; and type = &#63;.
1540            *
1541            * @param userId2 the user id2
1542            * @param type the type
1543            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1544            * @return the first matching social relation
1545            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
1546            * @throws SystemException if a system exception occurred
1547            */
1548            public static com.liferay.portlet.social.model.SocialRelation findByU2_T_First(
1549                    long userId2, int type,
1550                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1551                    throws com.liferay.portal.kernel.exception.SystemException,
1552                            com.liferay.portlet.social.NoSuchRelationException {
1553                    return getPersistence()
1554                                       .findByU2_T_First(userId2, type, orderByComparator);
1555            }
1556    
1557            /**
1558            * Returns the first social relation in the ordered set where userId2 = &#63; and type = &#63;.
1559            *
1560            * @param userId2 the user id2
1561            * @param type the type
1562            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1563            * @return the first matching social relation, or <code>null</code> if a matching social relation could not be found
1564            * @throws SystemException if a system exception occurred
1565            */
1566            public static com.liferay.portlet.social.model.SocialRelation fetchByU2_T_First(
1567                    long userId2, int type,
1568                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1569                    throws com.liferay.portal.kernel.exception.SystemException {
1570                    return getPersistence()
1571                                       .fetchByU2_T_First(userId2, type, orderByComparator);
1572            }
1573    
1574            /**
1575            * Returns the last social relation in the ordered set where userId2 = &#63; and type = &#63;.
1576            *
1577            * @param userId2 the user id2
1578            * @param type the type
1579            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1580            * @return the last matching social relation
1581            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
1582            * @throws SystemException if a system exception occurred
1583            */
1584            public static com.liferay.portlet.social.model.SocialRelation findByU2_T_Last(
1585                    long userId2, int type,
1586                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1587                    throws com.liferay.portal.kernel.exception.SystemException,
1588                            com.liferay.portlet.social.NoSuchRelationException {
1589                    return getPersistence().findByU2_T_Last(userId2, type, orderByComparator);
1590            }
1591    
1592            /**
1593            * Returns the last social relation in the ordered set where userId2 = &#63; and type = &#63;.
1594            *
1595            * @param userId2 the user id2
1596            * @param type the type
1597            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1598            * @return the last matching social relation, or <code>null</code> if a matching social relation could not be found
1599            * @throws SystemException if a system exception occurred
1600            */
1601            public static com.liferay.portlet.social.model.SocialRelation fetchByU2_T_Last(
1602                    long userId2, int type,
1603                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1604                    throws com.liferay.portal.kernel.exception.SystemException {
1605                    return getPersistence()
1606                                       .fetchByU2_T_Last(userId2, type, orderByComparator);
1607            }
1608    
1609            /**
1610            * Returns the social relations before and after the current social relation in the ordered set where userId2 = &#63; and type = &#63;.
1611            *
1612            * @param relationId the primary key of the current social relation
1613            * @param userId2 the user id2
1614            * @param type the type
1615            * @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
1616            * @return the previous, current, and next social relation
1617            * @throws com.liferay.portlet.social.NoSuchRelationException if a social relation with the primary key could not be found
1618            * @throws SystemException if a system exception occurred
1619            */
1620            public static com.liferay.portlet.social.model.SocialRelation[] findByU2_T_PrevAndNext(
1621                    long relationId, long userId2, int type,
1622                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1623                    throws com.liferay.portal.kernel.exception.SystemException,
1624                            com.liferay.portlet.social.NoSuchRelationException {
1625                    return getPersistence()
1626                                       .findByU2_T_PrevAndNext(relationId, userId2, type,
1627                            orderByComparator);
1628            }
1629    
1630            /**
1631            * 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.
1632            *
1633            * @param userId1 the user id1
1634            * @param userId2 the user id2
1635            * @param type the type
1636            * @return the matching social relation
1637            * @throws com.liferay.portlet.social.NoSuchRelationException if a matching social relation could not be found
1638            * @throws SystemException if a system exception occurred
1639            */
1640            public static com.liferay.portlet.social.model.SocialRelation findByU1_U2_T(
1641                    long userId1, long userId2, int type)
1642                    throws com.liferay.portal.kernel.exception.SystemException,
1643                            com.liferay.portlet.social.NoSuchRelationException {
1644                    return getPersistence().findByU1_U2_T(userId1, userId2, type);
1645            }
1646    
1647            /**
1648            * 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.
1649            *
1650            * @param userId1 the user id1
1651            * @param userId2 the user id2
1652            * @param type the type
1653            * @return the matching social relation, or <code>null</code> if a matching social relation could not be found
1654            * @throws SystemException if a system exception occurred
1655            */
1656            public static com.liferay.portlet.social.model.SocialRelation fetchByU1_U2_T(
1657                    long userId1, long userId2, int type)
1658                    throws com.liferay.portal.kernel.exception.SystemException {
1659                    return getPersistence().fetchByU1_U2_T(userId1, userId2, type);
1660            }
1661    
1662            /**
1663            * 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.
1664            *
1665            * @param userId1 the user id1
1666            * @param userId2 the user id2
1667            * @param type the type
1668            * @param retrieveFromCache whether to use the finder cache
1669            * @return the matching social relation, or <code>null</code> if a matching social relation could not be found
1670            * @throws SystemException if a system exception occurred
1671            */
1672            public static com.liferay.portlet.social.model.SocialRelation fetchByU1_U2_T(
1673                    long userId1, long userId2, int type, boolean retrieveFromCache)
1674                    throws com.liferay.portal.kernel.exception.SystemException {
1675                    return getPersistence()
1676                                       .fetchByU1_U2_T(userId1, userId2, type, retrieveFromCache);
1677            }
1678    
1679            /**
1680            * Returns all the social relations.
1681            *
1682            * @return the social relations
1683            * @throws SystemException if a system exception occurred
1684            */
1685            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findAll()
1686                    throws com.liferay.portal.kernel.exception.SystemException {
1687                    return getPersistence().findAll();
1688            }
1689    
1690            /**
1691            * Returns a range of all the social relations.
1692            *
1693            * <p>
1694            * 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.
1695            * </p>
1696            *
1697            * @param start the lower bound of the range of social relations
1698            * @param end the upper bound of the range of social relations (not inclusive)
1699            * @return the range of social relations
1700            * @throws SystemException if a system exception occurred
1701            */
1702            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findAll(
1703                    int start, int end)
1704                    throws com.liferay.portal.kernel.exception.SystemException {
1705                    return getPersistence().findAll(start, end);
1706            }
1707    
1708            /**
1709            * Returns an ordered range of all the social relations.
1710            *
1711            * <p>
1712            * 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.
1713            * </p>
1714            *
1715            * @param start the lower bound of the range of social relations
1716            * @param end the upper bound of the range of social relations (not inclusive)
1717            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
1718            * @return the ordered range of social relations
1719            * @throws SystemException if a system exception occurred
1720            */
1721            public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findAll(
1722                    int start, int end,
1723                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
1724                    throws com.liferay.portal.kernel.exception.SystemException {
1725                    return getPersistence().findAll(start, end, orderByComparator);
1726            }
1727    
1728            /**
1729            * Removes all the social relations where uuid = &#63; from the database.
1730            *
1731            * @param uuid the uuid
1732            * @throws SystemException if a system exception occurred
1733            */
1734            public static void removeByUuid(java.lang.String uuid)
1735                    throws com.liferay.portal.kernel.exception.SystemException {
1736                    getPersistence().removeByUuid(uuid);
1737            }
1738    
1739            /**
1740            * Removes all the social relations where uuid = &#63; and companyId = &#63; from the database.
1741            *
1742            * @param uuid the uuid
1743            * @param companyId the company ID
1744            * @throws SystemException if a system exception occurred
1745            */
1746            public static void removeByUuid_C(java.lang.String uuid, long companyId)
1747                    throws com.liferay.portal.kernel.exception.SystemException {
1748                    getPersistence().removeByUuid_C(uuid, companyId);
1749            }
1750    
1751            /**
1752            * Removes all the social relations where companyId = &#63; from the database.
1753            *
1754            * @param companyId the company ID
1755            * @throws SystemException if a system exception occurred
1756            */
1757            public static void removeByCompanyId(long companyId)
1758                    throws com.liferay.portal.kernel.exception.SystemException {
1759                    getPersistence().removeByCompanyId(companyId);
1760            }
1761    
1762            /**
1763            * Removes all the social relations where userId1 = &#63; from the database.
1764            *
1765            * @param userId1 the user id1
1766            * @throws SystemException if a system exception occurred
1767            */
1768            public static void removeByUserId1(long userId1)
1769                    throws com.liferay.portal.kernel.exception.SystemException {
1770                    getPersistence().removeByUserId1(userId1);
1771            }
1772    
1773            /**
1774            * Removes all the social relations where userId2 = &#63; from the database.
1775            *
1776            * @param userId2 the user id2
1777            * @throws SystemException if a system exception occurred
1778            */
1779            public static void removeByUserId2(long userId2)
1780                    throws com.liferay.portal.kernel.exception.SystemException {
1781                    getPersistence().removeByUserId2(userId2);
1782            }
1783    
1784            /**
1785            * Removes all the social relations where type = &#63; from the database.
1786            *
1787            * @param type the type
1788            * @throws SystemException if a system exception occurred
1789            */
1790            public static void removeByType(int type)
1791                    throws com.liferay.portal.kernel.exception.SystemException {
1792                    getPersistence().removeByType(type);
1793            }
1794    
1795            /**
1796            * Removes all the social relations where companyId = &#63; and type = &#63; from the database.
1797            *
1798            * @param companyId the company ID
1799            * @param type the type
1800            * @throws SystemException if a system exception occurred
1801            */
1802            public static void removeByC_T(long companyId, int type)
1803                    throws com.liferay.portal.kernel.exception.SystemException {
1804                    getPersistence().removeByC_T(companyId, type);
1805            }
1806    
1807            /**
1808            * Removes all the social relations where userId1 = &#63; and userId2 = &#63; from the database.
1809            *
1810            * @param userId1 the user id1
1811            * @param userId2 the user id2
1812            * @throws SystemException if a system exception occurred
1813            */
1814            public static void removeByU1_U2(long userId1, long userId2)
1815                    throws com.liferay.portal.kernel.exception.SystemException {
1816                    getPersistence().removeByU1_U2(userId1, userId2);
1817            }
1818    
1819            /**
1820            * Removes all the social relations where userId1 = &#63; and type = &#63; from the database.
1821            *
1822            * @param userId1 the user id1
1823            * @param type the type
1824            * @throws SystemException if a system exception occurred
1825            */
1826            public static void removeByU1_T(long userId1, int type)
1827                    throws com.liferay.portal.kernel.exception.SystemException {
1828                    getPersistence().removeByU1_T(userId1, type);
1829            }
1830    
1831            /**
1832            * Removes all the social relations where userId2 = &#63; and type = &#63; from the database.
1833            *
1834            * @param userId2 the user id2
1835            * @param type the type
1836            * @throws SystemException if a system exception occurred
1837            */
1838            public static void removeByU2_T(long userId2, int type)
1839                    throws com.liferay.portal.kernel.exception.SystemException {
1840                    getPersistence().removeByU2_T(userId2, type);
1841            }
1842    
1843            /**
1844            * Removes the social relation where userId1 = &#63; and userId2 = &#63; and type = &#63; from the database.
1845            *
1846            * @param userId1 the user id1
1847            * @param userId2 the user id2
1848            * @param type the type
1849            * @return the social relation that was removed
1850            * @throws SystemException if a system exception occurred
1851            */
1852            public static com.liferay.portlet.social.model.SocialRelation removeByU1_U2_T(
1853                    long userId1, long userId2, int type)
1854                    throws com.liferay.portal.kernel.exception.SystemException,
1855                            com.liferay.portlet.social.NoSuchRelationException {
1856                    return getPersistence().removeByU1_U2_T(userId1, userId2, type);
1857            }
1858    
1859            /**
1860            * Removes all the social relations from the database.
1861            *
1862            * @throws SystemException if a system exception occurred
1863            */
1864            public static void removeAll()
1865                    throws com.liferay.portal.kernel.exception.SystemException {
1866                    getPersistence().removeAll();
1867            }
1868    
1869            /**
1870            * Returns the number of social relations where uuid = &#63;.
1871            *
1872            * @param uuid the uuid
1873            * @return the number of matching social relations
1874            * @throws SystemException if a system exception occurred
1875            */
1876            public static int countByUuid(java.lang.String uuid)
1877                    throws com.liferay.portal.kernel.exception.SystemException {
1878                    return getPersistence().countByUuid(uuid);
1879            }
1880    
1881            /**
1882            * Returns the number of social relations where uuid = &#63; and companyId = &#63;.
1883            *
1884            * @param uuid the uuid
1885            * @param companyId the company ID
1886            * @return the number of matching social relations
1887            * @throws SystemException if a system exception occurred
1888            */
1889            public static int countByUuid_C(java.lang.String uuid, long companyId)
1890                    throws com.liferay.portal.kernel.exception.SystemException {
1891                    return getPersistence().countByUuid_C(uuid, companyId);
1892            }
1893    
1894            /**
1895            * Returns the number of social relations where companyId = &#63;.
1896            *
1897            * @param companyId the company ID
1898            * @return the number of matching social relations
1899            * @throws SystemException if a system exception occurred
1900            */
1901            public static int countByCompanyId(long companyId)
1902                    throws com.liferay.portal.kernel.exception.SystemException {
1903                    return getPersistence().countByCompanyId(companyId);
1904            }
1905    
1906            /**
1907            * Returns the number of social relations where userId1 = &#63;.
1908            *
1909            * @param userId1 the user id1
1910            * @return the number of matching social relations
1911            * @throws SystemException if a system exception occurred
1912            */
1913            public static int countByUserId1(long userId1)
1914                    throws com.liferay.portal.kernel.exception.SystemException {
1915                    return getPersistence().countByUserId1(userId1);
1916            }
1917    
1918            /**
1919            * Returns the number of social relations where userId2 = &#63;.
1920            *
1921            * @param userId2 the user id2
1922            * @return the number of matching social relations
1923            * @throws SystemException if a system exception occurred
1924            */
1925            public static int countByUserId2(long userId2)
1926                    throws com.liferay.portal.kernel.exception.SystemException {
1927                    return getPersistence().countByUserId2(userId2);
1928            }
1929    
1930            /**
1931            * Returns the number of social relations where type = &#63;.
1932            *
1933            * @param type the type
1934            * @return the number of matching social relations
1935            * @throws SystemException if a system exception occurred
1936            */
1937            public static int countByType(int type)
1938                    throws com.liferay.portal.kernel.exception.SystemException {
1939                    return getPersistence().countByType(type);
1940            }
1941    
1942            /**
1943            * Returns the number of social relations where companyId = &#63; and type = &#63;.
1944            *
1945            * @param companyId the company ID
1946            * @param type the type
1947            * @return the number of matching social relations
1948            * @throws SystemException if a system exception occurred
1949            */
1950            public static int countByC_T(long companyId, int type)
1951                    throws com.liferay.portal.kernel.exception.SystemException {
1952                    return getPersistence().countByC_T(companyId, type);
1953            }
1954    
1955            /**
1956            * Returns the number of social relations where userId1 = &#63; and userId2 = &#63;.
1957            *
1958            * @param userId1 the user id1
1959            * @param userId2 the user id2
1960            * @return the number of matching social relations
1961            * @throws SystemException if a system exception occurred
1962            */
1963            public static int countByU1_U2(long userId1, long userId2)
1964                    throws com.liferay.portal.kernel.exception.SystemException {
1965                    return getPersistence().countByU1_U2(userId1, userId2);
1966            }
1967    
1968            /**
1969            * Returns the number of social relations where userId1 = &#63; and type = &#63;.
1970            *
1971            * @param userId1 the user id1
1972            * @param type the type
1973            * @return the number of matching social relations
1974            * @throws SystemException if a system exception occurred
1975            */
1976            public static int countByU1_T(long userId1, int type)
1977                    throws com.liferay.portal.kernel.exception.SystemException {
1978                    return getPersistence().countByU1_T(userId1, type);
1979            }
1980    
1981            /**
1982            * Returns the number of social relations where userId2 = &#63; and type = &#63;.
1983            *
1984            * @param userId2 the user id2
1985            * @param type the type
1986            * @return the number of matching social relations
1987            * @throws SystemException if a system exception occurred
1988            */
1989            public static int countByU2_T(long userId2, int type)
1990                    throws com.liferay.portal.kernel.exception.SystemException {
1991                    return getPersistence().countByU2_T(userId2, type);
1992            }
1993    
1994            /**
1995            * Returns the number of social relations where userId1 = &#63; and userId2 = &#63; and type = &#63;.
1996            *
1997            * @param userId1 the user id1
1998            * @param userId2 the user id2
1999            * @param type the type
2000            * @return the number of matching social relations
2001            * @throws SystemException if a system exception occurred
2002            */
2003            public static int countByU1_U2_T(long userId1, long userId2, int type)
2004                    throws com.liferay.portal.kernel.exception.SystemException {
2005                    return getPersistence().countByU1_U2_T(userId1, userId2, type);
2006            }
2007    
2008            /**
2009            * Returns the number of social relations.
2010            *
2011            * @return the number of social relations
2012            * @throws SystemException if a system exception occurred
2013            */
2014            public static int countAll()
2015                    throws com.liferay.portal.kernel.exception.SystemException {
2016                    return getPersistence().countAll();
2017            }
2018    
2019            public static SocialRelationPersistence getPersistence() {
2020                    if (_persistence == null) {
2021                            _persistence = (SocialRelationPersistence)PortalBeanLocatorUtil.locate(SocialRelationPersistence.class.getName());
2022    
2023                            ReferenceRegistry.registerReference(SocialRelationUtil.class,
2024                                    "_persistence");
2025                    }
2026    
2027                    return _persistence;
2028            }
2029    
2030            /**
2031             * @deprecated
2032             */
2033            public void setPersistence(SocialRelationPersistence persistence) {
2034            }
2035    
2036            private static SocialRelationPersistence _persistence;
2037    }