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.portlet.dynamicdatalists.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 DDLRecordFinderUtil {
027            public static int countByR_S(long recordSetId, int status)
028                    throws com.liferay.portal.kernel.exception.SystemException {
029                    return getFinder().countByR_S(recordSetId, status);
030            }
031    
032            public static int countByC_S_S(long companyId, int status, int scope)
033                    throws com.liferay.portal.kernel.exception.SystemException {
034                    return getFinder().countByC_S_S(companyId, status, scope);
035            }
036    
037            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecord> findByR_S(
038                    long recordSetId, int status, int start, int end,
039                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
040                    throws com.liferay.portal.kernel.exception.SystemException {
041                    return getFinder()
042                                       .findByR_S(recordSetId, status, start, end, orderByComparator);
043            }
044    
045            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecord> findByC_S_S(
046                    long companyId, int status, int scope, int start, int end,
047                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
048                    throws com.liferay.portal.kernel.exception.SystemException {
049                    return getFinder()
050                                       .findByC_S_S(companyId, status, scope, start, end,
051                            orderByComparator);
052            }
053    
054            public static java.lang.Long[] findByC_S_S_MinAndMax(long companyId,
055                    int status, int scope)
056                    throws com.liferay.portal.kernel.exception.SystemException {
057                    return getFinder().findByC_S_S_MinAndMax(companyId, status, scope);
058            }
059    
060            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecord> findByC_S_S_MinAndMax(
061                    long companyId, int status, int scope, long minRecordId,
062                    long maxRecordId)
063                    throws com.liferay.portal.kernel.exception.SystemException {
064                    return getFinder()
065                                       .findByC_S_S_MinAndMax(companyId, status, scope,
066                            minRecordId, maxRecordId);
067            }
068    
069            public static DDLRecordFinder getFinder() {
070                    if (_finder == null) {
071                            _finder = (DDLRecordFinder)PortalBeanLocatorUtil.locate(DDLRecordFinder.class.getName());
072    
073                            ReferenceRegistry.registerReference(DDLRecordFinderUtil.class,
074                                    "_finder");
075                    }
076    
077                    return _finder;
078            }
079    
080            public void setFinder(DDLRecordFinder finder) {
081                    _finder = finder;
082    
083                    ReferenceRegistry.registerReference(DDLRecordFinderUtil.class, "_finder");
084            }
085    
086            private static DDLRecordFinder _finder;
087    }