1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="SocialActivityFinderUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   */
32  public class SocialActivityFinderUtil {
33      public static int countByGroupId(long groupId)
34          throws com.liferay.portal.SystemException {
35          return getFinder().countByGroupId(groupId);
36      }
37  
38      public static int countByGroupUsers(long groupId)
39          throws com.liferay.portal.SystemException {
40          return getFinder().countByGroupUsers(groupId);
41      }
42  
43      public static int countByOrganizationId(long organizationId)
44          throws com.liferay.portal.SystemException {
45          return getFinder().countByOrganizationId(organizationId);
46      }
47  
48      public static int countByOrganizationUsers(long organizationId)
49          throws com.liferay.portal.SystemException {
50          return getFinder().countByOrganizationUsers(organizationId);
51      }
52  
53      public static int countByRelation(long userId)
54          throws com.liferay.portal.SystemException {
55          return getFinder().countByRelation(userId);
56      }
57  
58      public static int countByRelationType(long userId, int type)
59          throws com.liferay.portal.SystemException {
60          return getFinder().countByRelationType(userId, type);
61      }
62  
63      public static int countByUserGroups(long userId)
64          throws com.liferay.portal.SystemException {
65          return getFinder().countByUserGroups(userId);
66      }
67  
68      public static int countByUserGroupsAndOrganizations(long userId)
69          throws com.liferay.portal.SystemException {
70          return getFinder().countByUserGroupsAndOrganizations(userId);
71      }
72  
73      public static int countByUserOrganizations(long userId)
74          throws com.liferay.portal.SystemException {
75          return getFinder().countByUserOrganizations(userId);
76      }
77  
78      public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByGroupId(
79          long groupId, int start, int end)
80          throws com.liferay.portal.SystemException {
81          return getFinder().findByGroupId(groupId, start, end);
82      }
83  
84      public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByGroupUsers(
85          long groupId, int start, int end)
86          throws com.liferay.portal.SystemException {
87          return getFinder().findByGroupUsers(groupId, start, end);
88      }
89  
90      public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByOrganizationId(
91          long organizationId, int start, int end)
92          throws com.liferay.portal.SystemException {
93          return getFinder().findByOrganizationId(organizationId, start, end);
94      }
95  
96      public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByOrganizationUsers(
97          long organizationId, int start, int end)
98          throws com.liferay.portal.SystemException {
99          return getFinder().findByOrganizationUsers(organizationId, start, end);
100     }
101 
102     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByRelation(
103         long userId, int start, int end)
104         throws com.liferay.portal.SystemException {
105         return getFinder().findByRelation(userId, start, end);
106     }
107 
108     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByRelationType(
109         long userId, int type, int start, int end)
110         throws com.liferay.portal.SystemException {
111         return getFinder().findByRelationType(userId, type, start, end);
112     }
113 
114     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByUserGroups(
115         long userId, int start, int end)
116         throws com.liferay.portal.SystemException {
117         return getFinder().findByUserGroups(userId, start, end);
118     }
119 
120     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByUserGroupsAndOrganizations(
121         long userId, int start, int end)
122         throws com.liferay.portal.SystemException {
123         return getFinder().findByUserGroupsAndOrganizations(userId, start, end);
124     }
125 
126     public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByUserOrganizations(
127         long userId, int start, int end)
128         throws com.liferay.portal.SystemException {
129         return getFinder().findByUserOrganizations(userId, start, end);
130     }
131 
132     public static SocialActivityFinder getFinder() {
133         if (_finder == null) {
134             _finder = (SocialActivityFinder)PortalBeanLocatorUtil.locate(SocialActivityFinder.class.getName());
135         }
136 
137         return _finder;
138     }
139 
140     public void setFinder(SocialActivityFinder finder) {
141         _finder = finder;
142     }
143 
144     private static SocialActivityFinder _finder;
145 }