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