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