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.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="GroupFinderUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * @author Brian Wing Shun Chan
23   */
24  public class GroupFinderUtil {
25      public static int countByG_U(long groupId, long userId)
26          throws com.liferay.portal.kernel.exception.SystemException {
27          return getFinder().countByG_U(groupId, userId);
28      }
29  
30      public static int countByC_N_D(long companyId, java.lang.String name,
31          java.lang.String description,
32          java.util.LinkedHashMap<String, Object> params)
33          throws com.liferay.portal.kernel.exception.SystemException {
34          return getFinder().countByC_N_D(companyId, name, description, params);
35      }
36  
37      public static java.util.List<com.liferay.portal.model.Group> findByNoLayouts(
38          long classNameId, boolean privateLayout, int start, int end)
39          throws com.liferay.portal.kernel.exception.SystemException {
40          return getFinder()
41                     .findByNoLayouts(classNameId, privateLayout, start, end);
42      }
43  
44      public static java.util.List<com.liferay.portal.model.Group> findByNullFriendlyURL()
45          throws com.liferay.portal.kernel.exception.SystemException {
46          return getFinder().findByNullFriendlyURL();
47      }
48  
49      public static java.util.List<com.liferay.portal.model.Group> findBySystem(
50          long companyId)
51          throws com.liferay.portal.kernel.exception.SystemException {
52          return getFinder().findBySystem(companyId);
53      }
54  
55      public static com.liferay.portal.model.Group findByC_N(long companyId,
56          java.lang.String name)
57          throws com.liferay.portal.NoSuchGroupException,
58              com.liferay.portal.kernel.exception.SystemException {
59          return getFinder().findByC_N(companyId, name);
60      }
61  
62      public static java.util.List<com.liferay.portal.model.Group> findByC_N_D(
63          long companyId, java.lang.String name, java.lang.String description,
64          java.util.LinkedHashMap<String, Object> params, int start, int end,
65          com.liferay.portal.kernel.util.OrderByComparator obc)
66          throws com.liferay.portal.kernel.exception.SystemException {
67          return getFinder()
68                     .findByC_N_D(companyId, name, description, params, start,
69              end, obc);
70      }
71  
72      public static GroupFinder getFinder() {
73          if (_finder == null) {
74              _finder = (GroupFinder)PortalBeanLocatorUtil.locate(GroupFinder.class.getName());
75          }
76  
77          return _finder;
78      }
79  
80      public void setFinder(GroupFinder finder) {
81          _finder = finder;
82      }
83  
84      private static GroupFinder _finder;
85  }