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