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