001    /**
002     * Copyright (c) 2000-2010 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.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * @author Brian Wing Shun Chan
021     */
022    public class SocialActivityFinderUtil {
023            public static int countByGroupId(long groupId)
024                    throws com.liferay.portal.kernel.exception.SystemException {
025                    return getFinder().countByGroupId(groupId);
026            }
027    
028            public static int countByGroupUsers(long groupId)
029                    throws com.liferay.portal.kernel.exception.SystemException {
030                    return getFinder().countByGroupUsers(groupId);
031            }
032    
033            public static int countByOrganizationId(long organizationId)
034                    throws com.liferay.portal.kernel.exception.SystemException {
035                    return getFinder().countByOrganizationId(organizationId);
036            }
037    
038            public static int countByOrganizationUsers(long organizationId)
039                    throws com.liferay.portal.kernel.exception.SystemException {
040                    return getFinder().countByOrganizationUsers(organizationId);
041            }
042    
043            public static int countByRelation(long userId)
044                    throws com.liferay.portal.kernel.exception.SystemException {
045                    return getFinder().countByRelation(userId);
046            }
047    
048            public static int countByRelationType(long userId, int type)
049                    throws com.liferay.portal.kernel.exception.SystemException {
050                    return getFinder().countByRelationType(userId, type);
051            }
052    
053            public static int countByUserGroups(long userId)
054                    throws com.liferay.portal.kernel.exception.SystemException {
055                    return getFinder().countByUserGroups(userId);
056            }
057    
058            public static int countByUserGroupsAndOrganizations(long userId)
059                    throws com.liferay.portal.kernel.exception.SystemException {
060                    return getFinder().countByUserGroupsAndOrganizations(userId);
061            }
062    
063            public static int countByUserOrganizations(long userId)
064                    throws com.liferay.portal.kernel.exception.SystemException {
065                    return getFinder().countByUserOrganizations(userId);
066            }
067    
068            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByGroupId(
069                    long groupId, int start, int end)
070                    throws com.liferay.portal.kernel.exception.SystemException {
071                    return getFinder().findByGroupId(groupId, start, end);
072            }
073    
074            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByGroupUsers(
075                    long groupId, int start, int end)
076                    throws com.liferay.portal.kernel.exception.SystemException {
077                    return getFinder().findByGroupUsers(groupId, start, end);
078            }
079    
080            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByOrganizationId(
081                    long organizationId, int start, int end)
082                    throws com.liferay.portal.kernel.exception.SystemException {
083                    return getFinder().findByOrganizationId(organizationId, start, end);
084            }
085    
086            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByOrganizationUsers(
087                    long organizationId, int start, int end)
088                    throws com.liferay.portal.kernel.exception.SystemException {
089                    return getFinder().findByOrganizationUsers(organizationId, start, end);
090            }
091    
092            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByRelation(
093                    long userId, int start, int end)
094                    throws com.liferay.portal.kernel.exception.SystemException {
095                    return getFinder().findByRelation(userId, start, end);
096            }
097    
098            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByRelationType(
099                    long userId, int type, int start, int end)
100                    throws com.liferay.portal.kernel.exception.SystemException {
101                    return getFinder().findByRelationType(userId, type, start, end);
102            }
103    
104            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByUserGroups(
105                    long userId, int start, int end)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getFinder().findByUserGroups(userId, start, end);
108            }
109    
110            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByUserGroupsAndOrganizations(
111                    long userId, int start, int end)
112                    throws com.liferay.portal.kernel.exception.SystemException {
113                    return getFinder().findByUserGroupsAndOrganizations(userId, start, end);
114            }
115    
116            public static java.util.List<com.liferay.portlet.social.model.SocialActivity> findByUserOrganizations(
117                    long userId, int start, int end)
118                    throws com.liferay.portal.kernel.exception.SystemException {
119                    return getFinder().findByUserOrganizations(userId, start, end);
120            }
121    
122            public static SocialActivityFinder getFinder() {
123                    if (_finder == null) {
124                            _finder = (SocialActivityFinder)PortalBeanLocatorUtil.locate(SocialActivityFinder.class.getName());
125                    }
126    
127                    return _finder;
128            }
129    
130            public void setFinder(SocialActivityFinder finder) {
131                    _finder = finder;
132            }
133    
134            private static SocialActivityFinder _finder;
135    }