001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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    }