1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.journal.service.persistence;
24  
25  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="JournalTemplateFinderUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   */
32  public class JournalTemplateFinderUtil {
33      public static int countByKeywords(long companyId, long groupId,
34          java.lang.String keywords, java.lang.String structureId,
35          java.lang.String structureIdComparator)
36          throws com.liferay.portal.SystemException {
37          return getFinder()
38                     .countByKeywords(companyId, groupId, keywords, structureId,
39              structureIdComparator);
40      }
41  
42      public static int countByC_G_T_S_N_D(long companyId, long groupId,
43          java.lang.String templateId, java.lang.String structureId,
44          java.lang.String structureIdComparator, java.lang.String name,
45          java.lang.String description, boolean andOperator)
46          throws com.liferay.portal.SystemException {
47          return getFinder()
48                     .countByC_G_T_S_N_D(companyId, groupId, templateId,
49              structureId, structureIdComparator, name, description, andOperator);
50      }
51  
52      public static int countByC_G_T_S_N_D(long companyId, long groupId,
53          java.lang.String[] templateIds, java.lang.String structureId,
54          java.lang.String structureIdComparator, java.lang.String[] names,
55          java.lang.String[] descriptions, boolean andOperator)
56          throws com.liferay.portal.SystemException {
57          return getFinder()
58                     .countByC_G_T_S_N_D(companyId, groupId, templateIds,
59              structureId, structureIdComparator, names, descriptions, andOperator);
60      }
61  
62      public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByKeywords(
63          long companyId, long groupId, java.lang.String keywords,
64          java.lang.String structureId, java.lang.String structureIdComparator,
65          int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
66          throws com.liferay.portal.SystemException {
67          return getFinder()
68                     .findByKeywords(companyId, groupId, keywords, structureId,
69              structureIdComparator, start, end, obc);
70      }
71  
72      public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByC_G_T_S_N_D(
73          long companyId, long groupId, java.lang.String templateId,
74          java.lang.String structureId, java.lang.String structureIdComparator,
75          java.lang.String name, java.lang.String description,
76          boolean andOperator, int start, int end,
77          com.liferay.portal.kernel.util.OrderByComparator obc)
78          throws com.liferay.portal.SystemException {
79          return getFinder()
80                     .findByC_G_T_S_N_D(companyId, groupId, templateId,
81              structureId, structureIdComparator, name, description, andOperator,
82              start, end, obc);
83      }
84  
85      public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> findByC_G_T_S_N_D(
86          long companyId, long groupId, java.lang.String[] templateIds,
87          java.lang.String structureId, java.lang.String structureIdComparator,
88          java.lang.String[] names, java.lang.String[] descriptions,
89          boolean andOperator, int start, int end,
90          com.liferay.portal.kernel.util.OrderByComparator obc)
91          throws com.liferay.portal.SystemException {
92          return getFinder()
93                     .findByC_G_T_S_N_D(companyId, groupId, templateIds,
94              structureId, structureIdComparator, names, descriptions,
95              andOperator, start, end, obc);
96      }
97  
98      public static JournalTemplateFinder getFinder() {
99          if (_finder == null) {
100             _finder = (JournalTemplateFinder)PortalBeanLocatorUtil.locate(JournalTemplateFinder.class.getName());
101         }
102 
103         return _finder;
104     }
105 
106     public void setFinder(JournalTemplateFinder finder) {
107         _finder = finder;
108     }
109 
110     private static JournalTemplateFinder _finder;
111 }