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