1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.shopping.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="ShoppingItemFinderUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * @author Brian Wing Shun Chan
23   */
24  public class ShoppingItemFinderUtil {
25      public static int countByG_C(long groupId, java.util.List<Long> categoryIds)
26          throws com.liferay.portal.kernel.exception.SystemException {
27          return getFinder().countByG_C(groupId, categoryIds);
28      }
29  
30      public static int countByFeatured(long groupId, long[] categoryIds)
31          throws com.liferay.portal.kernel.exception.SystemException {
32          return getFinder().countByFeatured(groupId, categoryIds);
33      }
34  
35      public static int countByKeywords(long groupId, long[] categoryIds,
36          java.lang.String keywords)
37          throws com.liferay.portal.kernel.exception.SystemException {
38          return getFinder().countByKeywords(groupId, categoryIds, keywords);
39      }
40  
41      public static int countBySale(long groupId, long[] categoryIds)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getFinder().countBySale(groupId, categoryIds);
44      }
45  
46      public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByFeatured(
47          long groupId, long[] categoryIds, int numOfItems)
48          throws com.liferay.portal.kernel.exception.SystemException {
49          return getFinder().findByFeatured(groupId, categoryIds, numOfItems);
50      }
51  
52      public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByKeywords(
53          long groupId, long[] categoryIds, java.lang.String keywords, int start,
54          int end) throws com.liferay.portal.kernel.exception.SystemException {
55          return getFinder()
56                     .findByKeywords(groupId, categoryIds, keywords, start, end);
57      }
58  
59      public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findBySale(
60          long groupId, long[] categoryIds, int numOfItems)
61          throws com.liferay.portal.kernel.exception.SystemException {
62          return getFinder().findBySale(groupId, categoryIds, numOfItems);
63      }
64  
65      public static ShoppingItemFinder getFinder() {
66          if (_finder == null) {
67              _finder = (ShoppingItemFinder)PortalBeanLocatorUtil.locate(ShoppingItemFinder.class.getName());
68          }
69  
70          return _finder;
71      }
72  
73      public void setFinder(ShoppingItemFinder finder) {
74          _finder = finder;
75      }
76  
77      private static ShoppingItemFinder _finder;
78  }