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.portlet.journal.service.persistence;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.ReferenceRegistry;
19  
20  /**
21   * <a href="JournalStructureFinderUtil.java.html"><b><i>View Source</i></b></a>
22   *
23   * @author Brian Wing Shun Chan
24   */
25  public class JournalStructureFinderUtil {
26      public static int countByKeywords(long companyId, long groupId,
27          java.lang.String keywords) throws com.liferay.portal.SystemException {
28          return getFinder().countByKeywords(companyId, groupId, keywords);
29      }
30  
31      public static int countByC_G_S_N_D(long companyId, long groupId,
32          java.lang.String structureId, java.lang.String name,
33          java.lang.String description, boolean andOperator)
34          throws com.liferay.portal.SystemException {
35          return getFinder()
36                     .countByC_G_S_N_D(companyId, groupId, structureId, name,
37              description, andOperator);
38      }
39  
40      public static int countByC_G_S_N_D(long companyId, long groupId,
41          java.lang.String[] structureIds, java.lang.String[] names,
42          java.lang.String[] descriptions, boolean andOperator)
43          throws com.liferay.portal.SystemException {
44          return getFinder()
45                     .countByC_G_S_N_D(companyId, groupId, structureIds, names,
46              descriptions, andOperator);
47      }
48  
49      public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findByKeywords(
50          long companyId, long groupId, java.lang.String keywords, int start,
51          int end, com.liferay.portal.kernel.util.OrderByComparator obc)
52          throws com.liferay.portal.SystemException {
53          return getFinder()
54                     .findByKeywords(companyId, groupId, keywords, start, end, obc);
55      }
56  
57      public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findByC_G_S_N_D(
58          long companyId, long groupId, java.lang.String structureId,
59          java.lang.String name, java.lang.String description,
60          boolean andOperator, int start, int end,
61          com.liferay.portal.kernel.util.OrderByComparator obc)
62          throws com.liferay.portal.SystemException {
63          return getFinder()
64                     .findByC_G_S_N_D(companyId, groupId, structureId, name,
65              description, andOperator, start, end, obc);
66      }
67  
68      public static java.util.List<com.liferay.portlet.journal.model.JournalStructure> findByC_G_S_N_D(
69          long companyId, long groupId, java.lang.String[] structureIds,
70          java.lang.String[] names, java.lang.String[] descriptions,
71          boolean andOperator, int start, int end,
72          com.liferay.portal.kernel.util.OrderByComparator obc)
73          throws com.liferay.portal.SystemException {
74          return getFinder()
75                     .findByC_G_S_N_D(companyId, groupId, structureIds, names,
76              descriptions, andOperator, start, end, obc);
77      }
78  
79      public static JournalStructureFinder getFinder() {
80          if (_finder == null) {
81              _finder = (JournalStructureFinder)PortalBeanLocatorUtil.locate(JournalStructureFinder.class.getName());
82  
83              ReferenceRegistry.registerReference(JournalStructureFinderUtil.class,
84                  "_finder");
85          }
86  
87          return _finder;
88      }
89  
90      public void setFinder(JournalStructureFinder finder) {
91          _finder = finder;
92  
93          ReferenceRegistry.registerReference(JournalStructureFinderUtil.class,
94              "_finder");
95      }
96  
97      private static JournalStructureFinder _finder;
98  }