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.shopping.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * @author Brian Wing Shun Chan
021     */
022    public class ShoppingItemFinderUtil {
023            public static int countByG_C(long groupId,
024                    java.util.List<java.lang.Long> categoryIds)
025                    throws com.liferay.portal.kernel.exception.SystemException {
026                    return getFinder().countByG_C(groupId, categoryIds);
027            }
028    
029            public static int countByFeatured(long groupId, long[] categoryIds)
030                    throws com.liferay.portal.kernel.exception.SystemException {
031                    return getFinder().countByFeatured(groupId, categoryIds);
032            }
033    
034            public static int countByKeywords(long groupId, long[] categoryIds,
035                    java.lang.String keywords)
036                    throws com.liferay.portal.kernel.exception.SystemException {
037                    return getFinder().countByKeywords(groupId, categoryIds, keywords);
038            }
039    
040            public static int countBySale(long groupId, long[] categoryIds)
041                    throws com.liferay.portal.kernel.exception.SystemException {
042                    return getFinder().countBySale(groupId, categoryIds);
043            }
044    
045            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByFeatured(
046                    long groupId, long[] categoryIds, int numOfItems)
047                    throws com.liferay.portal.kernel.exception.SystemException {
048                    return getFinder().findByFeatured(groupId, categoryIds, numOfItems);
049            }
050    
051            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByKeywords(
052                    long groupId, long[] categoryIds, java.lang.String keywords, int start,
053                    int end) throws com.liferay.portal.kernel.exception.SystemException {
054                    return getFinder()
055                                       .findByKeywords(groupId, categoryIds, keywords, start, end);
056            }
057    
058            public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findBySale(
059                    long groupId, long[] categoryIds, int numOfItems)
060                    throws com.liferay.portal.kernel.exception.SystemException {
061                    return getFinder().findBySale(groupId, categoryIds, numOfItems);
062            }
063    
064            public static ShoppingItemFinder getFinder() {
065                    if (_finder == null) {
066                            _finder = (ShoppingItemFinder)PortalBeanLocatorUtil.locate(ShoppingItemFinder.class.getName());
067                    }
068    
069                    return _finder;
070            }
071    
072            public void setFinder(ShoppingItemFinder finder) {
073                    _finder = finder;
074            }
075    
076            private static ShoppingItemFinder _finder;
077    }