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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * @author Brian Wing Shun Chan
022     */
023    public class DDLRecordSetFinderUtil {
024            public static int countByKeywords(long companyId, long groupId,
025                    java.lang.String keywords, int scope)
026                    throws com.liferay.portal.kernel.exception.SystemException {
027                    return getFinder().countByKeywords(companyId, groupId, keywords, scope);
028            }
029    
030            public static int countByC_G_N_D_S(long companyId, long groupId,
031                    java.lang.String name, java.lang.String description, int scope,
032                    boolean andOperator)
033                    throws com.liferay.portal.kernel.exception.SystemException {
034                    return getFinder()
035                                       .countByC_G_N_D_S(companyId, groupId, name, description,
036                            scope, andOperator);
037            }
038    
039            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> findByKeywords(
040                    long companyId, long groupId, java.lang.String keywords, int scope,
041                    int start, int end,
042                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
043                    throws com.liferay.portal.kernel.exception.SystemException {
044                    return getFinder()
045                                       .findByKeywords(companyId, groupId, keywords, scope, start,
046                            end, orderByComparator);
047            }
048    
049            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> findByC_G_N_D_S(
050                    long companyId, long groupId, java.lang.String name,
051                    java.lang.String description, int scope, boolean andOperator,
052                    int start, int end,
053                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
054                    throws com.liferay.portal.kernel.exception.SystemException {
055                    return getFinder()
056                                       .findByC_G_N_D_S(companyId, groupId, name, description,
057                            scope, andOperator, start, end, orderByComparator);
058            }
059    
060            public static java.util.List<com.liferay.portlet.dynamicdatalists.model.DDLRecordSet> findByC_G_N_D_S(
061                    long companyId, long groupId, java.lang.String[] names,
062                    java.lang.String[] descriptions, int scope, boolean andOperator,
063                    int start, int end,
064                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
065                    throws com.liferay.portal.kernel.exception.SystemException {
066                    return getFinder()
067                                       .findByC_G_N_D_S(companyId, groupId, names, descriptions,
068                            scope, andOperator, start, end, orderByComparator);
069            }
070    
071            public static DDLRecordSetFinder getFinder() {
072                    if (_finder == null) {
073                            _finder = (DDLRecordSetFinder)PortalBeanLocatorUtil.locate(DDLRecordSetFinder.class.getName());
074    
075                            ReferenceRegistry.registerReference(DDLRecordSetFinderUtil.class,
076                                    "_finder");
077                    }
078    
079                    return _finder;
080            }
081    
082            public void setFinder(DDLRecordSetFinder finder) {
083                    _finder = finder;
084    
085                    ReferenceRegistry.registerReference(DDLRecordSetFinderUtil.class,
086                            "_finder");
087            }
088    
089            private static DDLRecordSetFinder _finder;
090    }