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