001    /**
002     * Copyright (c) 2000-2013 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.portal.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     */
025    @ProviderType
026    public class PortletPreferencesFinderUtil {
027            public static long countByO_O_P(long ownerId, int ownerType,
028                    java.lang.String portletId, boolean excludeDefaultPreferences)
029                    throws com.liferay.portal.kernel.exception.SystemException {
030                    return getFinder()
031                                       .countByO_O_P(ownerId, ownerType, portletId,
032                            excludeDefaultPreferences);
033            }
034    
035            public static long countByO_O_P_P_P(long ownerId, int ownerType, long plid,
036                    java.lang.String portletId, boolean excludeDefaultPreferences)
037                    throws com.liferay.portal.kernel.exception.SystemException {
038                    return getFinder()
039                                       .countByO_O_P_P_P(ownerId, ownerType, plid, portletId,
040                            excludeDefaultPreferences);
041            }
042    
043            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByPortletId(
044                    java.lang.String portletId)
045                    throws com.liferay.portal.kernel.exception.SystemException {
046                    return getFinder().findByPortletId(portletId);
047            }
048    
049            public static java.util.List<com.liferay.portal.model.PortletPreferences> findByC_G_O_O_P_P(
050                    long companyId, long groupId, long ownerId, int ownerType,
051                    java.lang.String portletId, boolean privateLayout)
052                    throws com.liferay.portal.kernel.exception.SystemException {
053                    return getFinder()
054                                       .findByC_G_O_O_P_P(companyId, groupId, ownerId, ownerType,
055                            portletId, privateLayout);
056            }
057    
058            public static PortletPreferencesFinder getFinder() {
059                    if (_finder == null) {
060                            _finder = (PortletPreferencesFinder)PortalBeanLocatorUtil.locate(PortletPreferencesFinder.class.getName());
061    
062                            ReferenceRegistry.registerReference(PortletPreferencesFinderUtil.class,
063                                    "_finder");
064                    }
065    
066                    return _finder;
067            }
068    
069            public void setFinder(PortletPreferencesFinder finder) {
070                    _finder = finder;
071    
072                    ReferenceRegistry.registerReference(PortletPreferencesFinderUtil.class,
073                            "_finder");
074            }
075    
076            private static PortletPreferencesFinder _finder;
077    }