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