1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.ReferenceRegistry;
19  
20  /**
21   * <a href="GroupFinderUtil.java.html"><b><i>View Source</i></b></a>
22   *
23   * @author Brian Wing Shun Chan
24   */
25  public class GroupFinderUtil {
26      public static int countByG_U(long groupId, long userId)
27          throws com.liferay.portal.SystemException {
28          return getFinder().countByG_U(groupId, userId);
29      }
30  
31      public static int countByC_N_D(long companyId, java.lang.String name,
32          java.lang.String description,
33          java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
34          throws com.liferay.portal.SystemException {
35          return getFinder().countByC_N_D(companyId, name, description, params);
36      }
37  
38      public static java.util.List<com.liferay.portal.model.Group> findByNoLayouts(
39          long classNameId, boolean privateLayout, int start, int end)
40          throws com.liferay.portal.SystemException {
41          return getFinder()
42                     .findByNoLayouts(classNameId, privateLayout, start, end);
43      }
44  
45      public static java.util.List<com.liferay.portal.model.Group> findByNullFriendlyURL()
46          throws com.liferay.portal.SystemException {
47          return getFinder().findByNullFriendlyURL();
48      }
49  
50      public static java.util.List<com.liferay.portal.model.Group> findBySystem(
51          long companyId) throws com.liferay.portal.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.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<java.lang.String, java.lang.Object> params,
65          int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
66          throws com.liferay.portal.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              ReferenceRegistry.registerReference(GroupFinderUtil.class, "_finder");
77          }
78  
79          return _finder;
80      }
81  
82      public void setFinder(GroupFinder finder) {
83          _finder = finder;
84  
85          ReferenceRegistry.registerReference(GroupFinderUtil.class, "_finder");
86      }
87  
88      private static GroupFinder _finder;
89  }