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,
26          java.util.List<java.lang.Long> categoryIds)
27          throws com.liferay.portal.kernel.exception.SystemException {
28          return getFinder().countByG_C(groupId, categoryIds);
29      }
30  
31      public static int countByFeatured(long groupId, long[] categoryIds)
32          throws com.liferay.portal.kernel.exception.SystemException {
33          return getFinder().countByFeatured(groupId, categoryIds);
34      }
35  
36      public static int countByKeywords(long groupId, long[] categoryIds,
37          java.lang.String keywords)
38          throws com.liferay.portal.kernel.exception.SystemException {
39          return getFinder().countByKeywords(groupId, categoryIds, keywords);
40      }
41  
42      public static int countBySale(long groupId, long[] categoryIds)
43          throws com.liferay.portal.kernel.exception.SystemException {
44          return getFinder().countBySale(groupId, categoryIds);
45      }
46  
47      public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByFeatured(
48          long groupId, long[] categoryIds, int numOfItems)
49          throws com.liferay.portal.kernel.exception.SystemException {
50          return getFinder().findByFeatured(groupId, categoryIds, numOfItems);
51      }
52  
53      public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findByKeywords(
54          long groupId, long[] categoryIds, java.lang.String keywords, int start,
55          int end) throws com.liferay.portal.kernel.exception.SystemException {
56          return getFinder()
57                     .findByKeywords(groupId, categoryIds, keywords, start, end);
58      }
59  
60      public static java.util.List<com.liferay.portlet.shopping.model.ShoppingItem> findBySale(
61          long groupId, long[] categoryIds, int numOfItems)
62          throws com.liferay.portal.kernel.exception.SystemException {
63          return getFinder().findBySale(groupId, categoryIds, numOfItems);
64      }
65  
66      public static ShoppingItemFinder getFinder() {
67          if (_finder == null) {
68              _finder = (ShoppingItemFinder)PortalBeanLocatorUtil.locate(ShoppingItemFinder.class.getName());
69          }
70  
71          return _finder;
72      }
73  
74      public void setFinder(ShoppingItemFinder finder) {
75          _finder = finder;
76      }
77  
78      private static ShoppingItemFinder _finder;
79  }