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