1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.social.service.persistence;
24  
25  /**
26   * <a href="SocialRelationUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public class SocialRelationUtil {
32      public static void cacheResult(
33          com.liferay.portlet.social.model.SocialRelation socialRelation) {
34          getPersistence().cacheResult(socialRelation);
35      }
36  
37      public static void cacheResult(
38          java.util.List<com.liferay.portlet.social.model.SocialRelation> socialRelations) {
39          getPersistence().cacheResult(socialRelations);
40      }
41  
42      public static void clearCache() {
43          getPersistence().clearCache();
44      }
45  
46      public static com.liferay.portlet.social.model.SocialRelation create(
47          long relationId) {
48          return getPersistence().create(relationId);
49      }
50  
51      public static com.liferay.portlet.social.model.SocialRelation remove(
52          long relationId)
53          throws com.liferay.portal.SystemException,
54              com.liferay.portlet.social.NoSuchRelationException {
55          return getPersistence().remove(relationId);
56      }
57  
58      public static com.liferay.portlet.social.model.SocialRelation remove(
59          com.liferay.portlet.social.model.SocialRelation socialRelation)
60          throws com.liferay.portal.SystemException {
61          return getPersistence().remove(socialRelation);
62      }
63  
64      /**
65       * @deprecated Use <code>update(SocialRelation socialRelation, boolean merge)</code>.
66       */
67      public static com.liferay.portlet.social.model.SocialRelation update(
68          com.liferay.portlet.social.model.SocialRelation socialRelation)
69          throws com.liferay.portal.SystemException {
70          return getPersistence().update(socialRelation);
71      }
72  
73      /**
74       * Add, update, or merge, the entity. This method also calls the model
75       * listeners to trigger the proper events associated with adding, deleting,
76       * or updating an entity.
77       *
78       * @param        socialRelation the entity to add, update, or merge
79       * @param        merge boolean value for whether to merge the entity. The
80       *                default value is false. Setting merge to true is more
81       *                expensive and should only be true when socialRelation is
82       *                transient. See LEP-5473 for a detailed discussion of this
83       *                method.
84       * @return        true if the portlet can be displayed via Ajax
85       */
86      public static com.liferay.portlet.social.model.SocialRelation update(
87          com.liferay.portlet.social.model.SocialRelation socialRelation,
88          boolean merge) throws com.liferay.portal.SystemException {
89          return getPersistence().update(socialRelation, merge);
90      }
91  
92      public static com.liferay.portlet.social.model.SocialRelation updateImpl(
93          com.liferay.portlet.social.model.SocialRelation socialRelation,
94          boolean merge) throws com.liferay.portal.SystemException {
95          return getPersistence().updateImpl(socialRelation, merge);
96      }
97  
98      public static com.liferay.portlet.social.model.SocialRelation findByPrimaryKey(
99          long relationId)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portlet.social.NoSuchRelationException {
102         return getPersistence().findByPrimaryKey(relationId);
103     }
104 
105     public static com.liferay.portlet.social.model.SocialRelation fetchByPrimaryKey(
106         long relationId) throws com.liferay.portal.SystemException {
107         return getPersistence().fetchByPrimaryKey(relationId);
108     }
109 
110     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUuid(
111         java.lang.String uuid) throws com.liferay.portal.SystemException {
112         return getPersistence().findByUuid(uuid);
113     }
114 
115     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUuid(
116         java.lang.String uuid, int start, int end)
117         throws com.liferay.portal.SystemException {
118         return getPersistence().findByUuid(uuid, start, end);
119     }
120 
121     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUuid(
122         java.lang.String uuid, int start, int end,
123         com.liferay.portal.kernel.util.OrderByComparator obc)
124         throws com.liferay.portal.SystemException {
125         return getPersistence().findByUuid(uuid, start, end, obc);
126     }
127 
128     public static com.liferay.portlet.social.model.SocialRelation findByUuid_First(
129         java.lang.String uuid,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.social.NoSuchRelationException {
133         return getPersistence().findByUuid_First(uuid, obc);
134     }
135 
136     public static com.liferay.portlet.social.model.SocialRelation findByUuid_Last(
137         java.lang.String uuid,
138         com.liferay.portal.kernel.util.OrderByComparator obc)
139         throws com.liferay.portal.SystemException,
140             com.liferay.portlet.social.NoSuchRelationException {
141         return getPersistence().findByUuid_Last(uuid, obc);
142     }
143 
144     public static com.liferay.portlet.social.model.SocialRelation[] findByUuid_PrevAndNext(
145         long relationId, java.lang.String uuid,
146         com.liferay.portal.kernel.util.OrderByComparator obc)
147         throws com.liferay.portal.SystemException,
148             com.liferay.portlet.social.NoSuchRelationException {
149         return getPersistence().findByUuid_PrevAndNext(relationId, uuid, obc);
150     }
151 
152     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByCompanyId(
153         long companyId) throws com.liferay.portal.SystemException {
154         return getPersistence().findByCompanyId(companyId);
155     }
156 
157     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByCompanyId(
158         long companyId, int start, int end)
159         throws com.liferay.portal.SystemException {
160         return getPersistence().findByCompanyId(companyId, start, end);
161     }
162 
163     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByCompanyId(
164         long companyId, int start, int end,
165         com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.SystemException {
167         return getPersistence().findByCompanyId(companyId, start, end, obc);
168     }
169 
170     public static com.liferay.portlet.social.model.SocialRelation findByCompanyId_First(
171         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.social.NoSuchRelationException {
174         return getPersistence().findByCompanyId_First(companyId, obc);
175     }
176 
177     public static com.liferay.portlet.social.model.SocialRelation findByCompanyId_Last(
178         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.SystemException,
180             com.liferay.portlet.social.NoSuchRelationException {
181         return getPersistence().findByCompanyId_Last(companyId, obc);
182     }
183 
184     public static com.liferay.portlet.social.model.SocialRelation[] findByCompanyId_PrevAndNext(
185         long relationId, long companyId,
186         com.liferay.portal.kernel.util.OrderByComparator obc)
187         throws com.liferay.portal.SystemException,
188             com.liferay.portlet.social.NoSuchRelationException {
189         return getPersistence()
190                    .findByCompanyId_PrevAndNext(relationId, companyId, obc);
191     }
192 
193     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId1(
194         long userId1) throws com.liferay.portal.SystemException {
195         return getPersistence().findByUserId1(userId1);
196     }
197 
198     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId1(
199         long userId1, int start, int end)
200         throws com.liferay.portal.SystemException {
201         return getPersistence().findByUserId1(userId1, start, end);
202     }
203 
204     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId1(
205         long userId1, int start, int end,
206         com.liferay.portal.kernel.util.OrderByComparator obc)
207         throws com.liferay.portal.SystemException {
208         return getPersistence().findByUserId1(userId1, start, end, obc);
209     }
210 
211     public static com.liferay.portlet.social.model.SocialRelation findByUserId1_First(
212         long userId1, com.liferay.portal.kernel.util.OrderByComparator obc)
213         throws com.liferay.portal.SystemException,
214             com.liferay.portlet.social.NoSuchRelationException {
215         return getPersistence().findByUserId1_First(userId1, obc);
216     }
217 
218     public static com.liferay.portlet.social.model.SocialRelation findByUserId1_Last(
219         long userId1, com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.SystemException,
221             com.liferay.portlet.social.NoSuchRelationException {
222         return getPersistence().findByUserId1_Last(userId1, obc);
223     }
224 
225     public static com.liferay.portlet.social.model.SocialRelation[] findByUserId1_PrevAndNext(
226         long relationId, long userId1,
227         com.liferay.portal.kernel.util.OrderByComparator obc)
228         throws com.liferay.portal.SystemException,
229             com.liferay.portlet.social.NoSuchRelationException {
230         return getPersistence()
231                    .findByUserId1_PrevAndNext(relationId, userId1, obc);
232     }
233 
234     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId2(
235         long userId2) throws com.liferay.portal.SystemException {
236         return getPersistence().findByUserId2(userId2);
237     }
238 
239     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId2(
240         long userId2, int start, int end)
241         throws com.liferay.portal.SystemException {
242         return getPersistence().findByUserId2(userId2, start, end);
243     }
244 
245     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByUserId2(
246         long userId2, int start, int end,
247         com.liferay.portal.kernel.util.OrderByComparator obc)
248         throws com.liferay.portal.SystemException {
249         return getPersistence().findByUserId2(userId2, start, end, obc);
250     }
251 
252     public static com.liferay.portlet.social.model.SocialRelation findByUserId2_First(
253         long userId2, com.liferay.portal.kernel.util.OrderByComparator obc)
254         throws com.liferay.portal.SystemException,
255             com.liferay.portlet.social.NoSuchRelationException {
256         return getPersistence().findByUserId2_First(userId2, obc);
257     }
258 
259     public static com.liferay.portlet.social.model.SocialRelation findByUserId2_Last(
260         long userId2, com.liferay.portal.kernel.util.OrderByComparator obc)
261         throws com.liferay.portal.SystemException,
262             com.liferay.portlet.social.NoSuchRelationException {
263         return getPersistence().findByUserId2_Last(userId2, obc);
264     }
265 
266     public static com.liferay.portlet.social.model.SocialRelation[] findByUserId2_PrevAndNext(
267         long relationId, long userId2,
268         com.liferay.portal.kernel.util.OrderByComparator obc)
269         throws com.liferay.portal.SystemException,
270             com.liferay.portlet.social.NoSuchRelationException {
271         return getPersistence()
272                    .findByUserId2_PrevAndNext(relationId, userId2, obc);
273     }
274 
275     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByType(
276         int type) throws com.liferay.portal.SystemException {
277         return getPersistence().findByType(type);
278     }
279 
280     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByType(
281         int type, int start, int end) throws com.liferay.portal.SystemException {
282         return getPersistence().findByType(type, start, end);
283     }
284 
285     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByType(
286         int type, int start, int end,
287         com.liferay.portal.kernel.util.OrderByComparator obc)
288         throws com.liferay.portal.SystemException {
289         return getPersistence().findByType(type, start, end, obc);
290     }
291 
292     public static com.liferay.portlet.social.model.SocialRelation findByType_First(
293         int type, com.liferay.portal.kernel.util.OrderByComparator obc)
294         throws com.liferay.portal.SystemException,
295             com.liferay.portlet.social.NoSuchRelationException {
296         return getPersistence().findByType_First(type, obc);
297     }
298 
299     public static com.liferay.portlet.social.model.SocialRelation findByType_Last(
300         int type, com.liferay.portal.kernel.util.OrderByComparator obc)
301         throws com.liferay.portal.SystemException,
302             com.liferay.portlet.social.NoSuchRelationException {
303         return getPersistence().findByType_Last(type, obc);
304     }
305 
306     public static com.liferay.portlet.social.model.SocialRelation[] findByType_PrevAndNext(
307         long relationId, int type,
308         com.liferay.portal.kernel.util.OrderByComparator obc)
309         throws com.liferay.portal.SystemException,
310             com.liferay.portlet.social.NoSuchRelationException {
311         return getPersistence().findByType_PrevAndNext(relationId, type, obc);
312     }
313 
314     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByC_T(
315         long companyId, int type) throws com.liferay.portal.SystemException {
316         return getPersistence().findByC_T(companyId, type);
317     }
318 
319     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByC_T(
320         long companyId, int type, int start, int end)
321         throws com.liferay.portal.SystemException {
322         return getPersistence().findByC_T(companyId, type, start, end);
323     }
324 
325     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByC_T(
326         long companyId, int type, int start, int end,
327         com.liferay.portal.kernel.util.OrderByComparator obc)
328         throws com.liferay.portal.SystemException {
329         return getPersistence().findByC_T(companyId, type, start, end, obc);
330     }
331 
332     public static com.liferay.portlet.social.model.SocialRelation findByC_T_First(
333         long companyId, int type,
334         com.liferay.portal.kernel.util.OrderByComparator obc)
335         throws com.liferay.portal.SystemException,
336             com.liferay.portlet.social.NoSuchRelationException {
337         return getPersistence().findByC_T_First(companyId, type, obc);
338     }
339 
340     public static com.liferay.portlet.social.model.SocialRelation findByC_T_Last(
341         long companyId, int type,
342         com.liferay.portal.kernel.util.OrderByComparator obc)
343         throws com.liferay.portal.SystemException,
344             com.liferay.portlet.social.NoSuchRelationException {
345         return getPersistence().findByC_T_Last(companyId, type, obc);
346     }
347 
348     public static com.liferay.portlet.social.model.SocialRelation[] findByC_T_PrevAndNext(
349         long relationId, long companyId, int type,
350         com.liferay.portal.kernel.util.OrderByComparator obc)
351         throws com.liferay.portal.SystemException,
352             com.liferay.portlet.social.NoSuchRelationException {
353         return getPersistence()
354                    .findByC_T_PrevAndNext(relationId, companyId, type, obc);
355     }
356 
357     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU1_T(
358         long userId1, int type) throws com.liferay.portal.SystemException {
359         return getPersistence().findByU1_T(userId1, type);
360     }
361 
362     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU1_T(
363         long userId1, int type, int start, int end)
364         throws com.liferay.portal.SystemException {
365         return getPersistence().findByU1_T(userId1, type, start, end);
366     }
367 
368     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU1_T(
369         long userId1, int type, int start, int end,
370         com.liferay.portal.kernel.util.OrderByComparator obc)
371         throws com.liferay.portal.SystemException {
372         return getPersistence().findByU1_T(userId1, type, start, end, obc);
373     }
374 
375     public static com.liferay.portlet.social.model.SocialRelation findByU1_T_First(
376         long userId1, int type,
377         com.liferay.portal.kernel.util.OrderByComparator obc)
378         throws com.liferay.portal.SystemException,
379             com.liferay.portlet.social.NoSuchRelationException {
380         return getPersistence().findByU1_T_First(userId1, type, obc);
381     }
382 
383     public static com.liferay.portlet.social.model.SocialRelation findByU1_T_Last(
384         long userId1, int type,
385         com.liferay.portal.kernel.util.OrderByComparator obc)
386         throws com.liferay.portal.SystemException,
387             com.liferay.portlet.social.NoSuchRelationException {
388         return getPersistence().findByU1_T_Last(userId1, type, obc);
389     }
390 
391     public static com.liferay.portlet.social.model.SocialRelation[] findByU1_T_PrevAndNext(
392         long relationId, long userId1, int type,
393         com.liferay.portal.kernel.util.OrderByComparator obc)
394         throws com.liferay.portal.SystemException,
395             com.liferay.portlet.social.NoSuchRelationException {
396         return getPersistence()
397                    .findByU1_T_PrevAndNext(relationId, userId1, type, obc);
398     }
399 
400     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU2_T(
401         long userId2, int type) throws com.liferay.portal.SystemException {
402         return getPersistence().findByU2_T(userId2, type);
403     }
404 
405     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU2_T(
406         long userId2, int type, int start, int end)
407         throws com.liferay.portal.SystemException {
408         return getPersistence().findByU2_T(userId2, type, start, end);
409     }
410 
411     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findByU2_T(
412         long userId2, int type, int start, int end,
413         com.liferay.portal.kernel.util.OrderByComparator obc)
414         throws com.liferay.portal.SystemException {
415         return getPersistence().findByU2_T(userId2, type, start, end, obc);
416     }
417 
418     public static com.liferay.portlet.social.model.SocialRelation findByU2_T_First(
419         long userId2, int type,
420         com.liferay.portal.kernel.util.OrderByComparator obc)
421         throws com.liferay.portal.SystemException,
422             com.liferay.portlet.social.NoSuchRelationException {
423         return getPersistence().findByU2_T_First(userId2, type, obc);
424     }
425 
426     public static com.liferay.portlet.social.model.SocialRelation findByU2_T_Last(
427         long userId2, int type,
428         com.liferay.portal.kernel.util.OrderByComparator obc)
429         throws com.liferay.portal.SystemException,
430             com.liferay.portlet.social.NoSuchRelationException {
431         return getPersistence().findByU2_T_Last(userId2, type, obc);
432     }
433 
434     public static com.liferay.portlet.social.model.SocialRelation[] findByU2_T_PrevAndNext(
435         long relationId, long userId2, int type,
436         com.liferay.portal.kernel.util.OrderByComparator obc)
437         throws com.liferay.portal.SystemException,
438             com.liferay.portlet.social.NoSuchRelationException {
439         return getPersistence()
440                    .findByU2_T_PrevAndNext(relationId, userId2, type, obc);
441     }
442 
443     public static com.liferay.portlet.social.model.SocialRelation findByU1_U2_T(
444         long userId1, long userId2, int type)
445         throws com.liferay.portal.SystemException,
446             com.liferay.portlet.social.NoSuchRelationException {
447         return getPersistence().findByU1_U2_T(userId1, userId2, type);
448     }
449 
450     public static com.liferay.portlet.social.model.SocialRelation fetchByU1_U2_T(
451         long userId1, long userId2, int type)
452         throws com.liferay.portal.SystemException {
453         return getPersistence().fetchByU1_U2_T(userId1, userId2, type);
454     }
455 
456     public static com.liferay.portlet.social.model.SocialRelation fetchByU1_U2_T(
457         long userId1, long userId2, int type, boolean retrieveFromCache)
458         throws com.liferay.portal.SystemException {
459         return getPersistence()
460                    .fetchByU1_U2_T(userId1, userId2, type, retrieveFromCache);
461     }
462 
463     public static java.util.List<Object> findWithDynamicQuery(
464         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
465         throws com.liferay.portal.SystemException {
466         return getPersistence().findWithDynamicQuery(dynamicQuery);
467     }
468 
469     public static java.util.List<Object> findWithDynamicQuery(
470         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
471         int end) throws com.liferay.portal.SystemException {
472         return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
473     }
474 
475     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findAll()
476         throws com.liferay.portal.SystemException {
477         return getPersistence().findAll();
478     }
479 
480     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findAll(
481         int start, int end) throws com.liferay.portal.SystemException {
482         return getPersistence().findAll(start, end);
483     }
484 
485     public static java.util.List<com.liferay.portlet.social.model.SocialRelation> findAll(
486         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
487         throws com.liferay.portal.SystemException {
488         return getPersistence().findAll(start, end, obc);
489     }
490 
491     public static void removeByUuid(java.lang.String uuid)
492         throws com.liferay.portal.SystemException {
493         getPersistence().removeByUuid(uuid);
494     }
495 
496     public static void removeByCompanyId(long companyId)
497         throws com.liferay.portal.SystemException {
498         getPersistence().removeByCompanyId(companyId);
499     }
500 
501     public static void removeByUserId1(long userId1)
502         throws com.liferay.portal.SystemException {
503         getPersistence().removeByUserId1(userId1);
504     }
505 
506     public static void removeByUserId2(long userId2)
507         throws com.liferay.portal.SystemException {
508         getPersistence().removeByUserId2(userId2);
509     }
510 
511     public static void removeByType(int type)
512         throws com.liferay.portal.SystemException {
513         getPersistence().removeByType(type);
514     }
515 
516     public static void removeByC_T(long companyId, int type)
517         throws com.liferay.portal.SystemException {
518         getPersistence().removeByC_T(companyId, type);
519     }
520 
521     public static void removeByU1_T(long userId1, int type)
522         throws com.liferay.portal.SystemException {
523         getPersistence().removeByU1_T(userId1, type);
524     }
525 
526     public static void removeByU2_T(long userId2, int type)
527         throws com.liferay.portal.SystemException {
528         getPersistence().removeByU2_T(userId2, type);
529     }
530 
531     public static void removeByU1_U2_T(long userId1, long userId2, int type)
532         throws com.liferay.portal.SystemException,
533             com.liferay.portlet.social.NoSuchRelationException {
534         getPersistence().removeByU1_U2_T(userId1, userId2, type);
535     }
536 
537     public static void removeAll() throws com.liferay.portal.SystemException {
538         getPersistence().removeAll();
539     }
540 
541     public static int countByUuid(java.lang.String uuid)
542         throws com.liferay.portal.SystemException {
543         return getPersistence().countByUuid(uuid);
544     }
545 
546     public static int countByCompanyId(long companyId)
547         throws com.liferay.portal.SystemException {
548         return getPersistence().countByCompanyId(companyId);
549     }
550 
551     public static int countByUserId1(long userId1)
552         throws com.liferay.portal.SystemException {
553         return getPersistence().countByUserId1(userId1);
554     }
555 
556     public static int countByUserId2(long userId2)
557         throws com.liferay.portal.SystemException {
558         return getPersistence().countByUserId2(userId2);
559     }
560 
561     public static int countByType(int type)
562         throws com.liferay.portal.SystemException {
563         return getPersistence().countByType(type);
564     }
565 
566     public static int countByC_T(long companyId, int type)
567         throws com.liferay.portal.SystemException {
568         return getPersistence().countByC_T(companyId, type);
569     }
570 
571     public static int countByU1_T(long userId1, int type)
572         throws com.liferay.portal.SystemException {
573         return getPersistence().countByU1_T(userId1, type);
574     }
575 
576     public static int countByU2_T(long userId2, int type)
577         throws com.liferay.portal.SystemException {
578         return getPersistence().countByU2_T(userId2, type);
579     }
580 
581     public static int countByU1_U2_T(long userId1, long userId2, int type)
582         throws com.liferay.portal.SystemException {
583         return getPersistence().countByU1_U2_T(userId1, userId2, type);
584     }
585 
586     public static int countAll() throws com.liferay.portal.SystemException {
587         return getPersistence().countAll();
588     }
589 
590     public static SocialRelationPersistence getPersistence() {
591         return _persistence;
592     }
593 
594     public void setPersistence(SocialRelationPersistence persistence) {
595         _persistence = persistence;
596     }
597 
598     private static SocialRelationPersistence _persistence;
599 }