001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * @author Brian Wing Shun Chan
024     * @generated
025     */
026    @ProviderType
027    public class SocialActivitySetFinderUtil {
028            public static int countByRelation(long userId) {
029                    return getFinder().countByRelation(userId);
030            }
031    
032            public static int countByRelationType(long userId, int type) {
033                    return getFinder().countByRelationType(userId, type);
034            }
035    
036            public static int countByUser(long userId) {
037                    return getFinder().countByUser(userId);
038            }
039    
040            public static int countByUserGroups(long userId) {
041                    return getFinder().countByUserGroups(userId);
042            }
043    
044            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySet> findByRelation(
045                    long userId, int start, int end) {
046                    return getFinder().findByRelation(userId, start, end);
047            }
048    
049            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySet> findByRelationType(
050                    long userId, int type, int start, int end) {
051                    return getFinder().findByRelationType(userId, type, start, end);
052            }
053    
054            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySet> findByUser(
055                    long userId, int start, int end) {
056                    return getFinder().findByUser(userId, start, end);
057            }
058    
059            public static java.util.List<com.liferay.portlet.social.model.SocialActivitySet> findByUserGroups(
060                    long userId, int start, int end) {
061                    return getFinder().findByUserGroups(userId, start, end);
062            }
063    
064            public static SocialActivitySetFinder getFinder() {
065                    if (_finder == null) {
066                            _finder = (SocialActivitySetFinder)PortalBeanLocatorUtil.locate(SocialActivitySetFinder.class.getName());
067    
068                            ReferenceRegistry.registerReference(SocialActivitySetFinderUtil.class,
069                                    "_finder");
070                    }
071    
072                    return _finder;
073            }
074    
075            public void setFinder(SocialActivitySetFinder finder) {
076                    _finder = finder;
077    
078                    ReferenceRegistry.registerReference(SocialActivitySetFinderUtil.class,
079                            "_finder");
080            }
081    
082            private static SocialActivitySetFinder _finder;
083    }