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