1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.social.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="SocialActivityFinderUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * @author Brian Wing Shun Chan
23   */
24  public class SocialActivityFinderUtil {
25      public static int countByGroupId(long groupId)
26          throws com.liferay.portal.kernel.exception.SystemException {
27          return getFinder().countByGroupId(groupId);
28      }
29  
30      public static int countByGroupUsers(long groupId)
31          throws com.liferay.portal.kernel.exception.SystemException {
32          return getFinder().countByGroupUsers(groupId);
33      }
34  
35      public static int countByOrganizationId(long organizationId)
36          throws com.liferay.portal.kernel.exception.SystemException {
37          return getFinder().countByOrganizationId(organizationId);
38      }
39  
40      public static int countByOrganizationUsers(long organizationId)
41          throws com.liferay.portal.kernel.exception.SystemException {
42          return getFinder().countByOrganizationUsers(organizationId);
43      }
44  
45      public static int countByRelation(long userId)
46          throws com.liferay.portal.kernel.exception.SystemException {
47          return getFinder().countByRelation(userId);
48      }
49  
50      public static int countByRelationType(long userId, int type)
51          throws com.liferay.portal.kernel.exception.SystemException {
52          return getFinder().countByRelationType(userId, type);
53      }
54  
55      public static int countByUserGroups(long userId)
56          throws com.liferay.portal.kernel.exception.SystemException {
57          return getFinder().countByUserGroups(userId);
58      }
59  
60      public static int countByUserGroupsAndOrganizations(long userId)
61          throws com.liferay.portal.kernel.exception.SystemException {
62          return getFinder().countByUserGroupsAndOrganizations(userId);
63      }
64  
65      public static int countByUserOrganizations(long userId)
66          throws com.liferay.portal.kernel.exception.SystemException {
67          return getFinder().countByUserOrganizations(userId);
68      }
69  
70      public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByGroupId(
71          long groupId, int start, int end)
72          throws com.liferay.portal.kernel.exception.SystemException {
73          return getFinder().findByGroupId(groupId, start, end);
74      }
75  
76      public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByGroupUsers(
77          long groupId, int start, int end)
78          throws com.liferay.portal.kernel.exception.SystemException {
79          return getFinder().findByGroupUsers(groupId, start, end);
80      }
81  
82      public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByOrganizationId(
83          long organizationId, int start, int end)
84          throws com.liferay.portal.kernel.exception.SystemException {
85          return getFinder().findByOrganizationId(organizationId, start, end);
86      }
87  
88      public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByOrganizationUsers(
89          long organizationId, int start, int end)
90          throws com.liferay.portal.kernel.exception.SystemException {
91          return getFinder().findByOrganizationUsers(organizationId, start, end);
92      }
93  
94      public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByRelation(
95          long userId, int start, int end)
96          throws com.liferay.portal.kernel.exception.SystemException {
97          return getFinder().findByRelation(userId, start, end);
98      }
99  
100     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByRelationType(
101         long userId, int type, int start, int end)
102         throws com.liferay.portal.kernel.exception.SystemException {
103         return getFinder().findByRelationType(userId, type, start, end);
104     }
105 
106     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByUserGroups(
107         long userId, int start, int end)
108         throws com.liferay.portal.kernel.exception.SystemException {
109         return getFinder().findByUserGroups(userId, start, end);
110     }
111 
112     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByUserGroupsAndOrganizations(
113         long userId, int start, int end)
114         throws com.liferay.portal.kernel.exception.SystemException {
115         return getFinder().findByUserGroupsAndOrganizations(userId, start, end);
116     }
117 
118     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByUserOrganizations(
119         long userId, int start, int end)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getFinder().findByUserOrganizations(userId, start, end);
122     }
123 
124     public static SocialActivityFinder getFinder() {
125         if (_finder == null) {
126             _finder = (SocialActivityFinder)PortalBeanLocatorUtil.locate(SocialActivityFinder.class.getName());
127         }
128 
129         return _finder;
130     }
131 
132     public void setFinder(SocialActivityFinder finder) {
133         _finder = finder;
134     }
135 
136     private static SocialActivityFinder _finder;
137 }