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