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