001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.dynamicdatamapping.service.persistence;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * @author Brian Wing Shun Chan
022     */
023    public class DDMTemplateFinderUtil {
024            public static int countByKeywords(long companyId, long groupId,
025                    long structureId, java.lang.String keywords, java.lang.String type,
026                    java.lang.String mode)
027                    throws com.liferay.portal.kernel.exception.SystemException {
028                    return getFinder()
029                                       .countByKeywords(companyId, groupId, structureId, keywords,
030                            type, mode);
031            }
032    
033            public static int countByC_G_S_N_D_T_M_L(long companyId, long groupId,
034                    long structureId, java.lang.String name, java.lang.String description,
035                    java.lang.String type, java.lang.String mode,
036                    java.lang.String language, boolean andOperator)
037                    throws com.liferay.portal.kernel.exception.SystemException {
038                    return getFinder()
039                                       .countByC_G_S_N_D_T_M_L(companyId, groupId, structureId,
040                            name, description, type, mode, language, andOperator);
041            }
042    
043            public static int countByC_G_S_N_D_T_M_L(long companyId, long groupId,
044                    long structureId, java.lang.String[] names,
045                    java.lang.String[] descriptions, java.lang.String[] types,
046                    java.lang.String[] modes, java.lang.String[] languages,
047                    boolean andOperator)
048                    throws com.liferay.portal.kernel.exception.SystemException {
049                    return getFinder()
050                                       .countByC_G_S_N_D_T_M_L(companyId, groupId, structureId,
051                            names, descriptions, types, modes, languages, andOperator);
052            }
053    
054            public static int filterCountByKeywords(long companyId, long groupId,
055                    long structureId, java.lang.String keywords, java.lang.String type,
056                    java.lang.String mode)
057                    throws com.liferay.portal.kernel.exception.SystemException {
058                    return getFinder()
059                                       .filterCountByKeywords(companyId, groupId, structureId,
060                            keywords, type, mode);
061            }
062    
063            public static int filterCountByC_G_S_N_D_T_M_L(long companyId,
064                    long groupId, long structureId, java.lang.String name,
065                    java.lang.String description, java.lang.String type,
066                    java.lang.String mode, java.lang.String language, boolean andOperator)
067                    throws com.liferay.portal.kernel.exception.SystemException {
068                    return getFinder()
069                                       .filterCountByC_G_S_N_D_T_M_L(companyId, groupId,
070                            structureId, name, description, type, mode, language, andOperator);
071            }
072    
073            public static int filterCountByC_G_S_N_D_T_M_L(long companyId,
074                    long groupId, long structureId, java.lang.String[] names,
075                    java.lang.String[] descriptions, java.lang.String[] types,
076                    java.lang.String[] modes, java.lang.String[] languages,
077                    boolean andOperator)
078                    throws com.liferay.portal.kernel.exception.SystemException {
079                    return getFinder()
080                                       .filterCountByC_G_S_N_D_T_M_L(companyId, groupId,
081                            structureId, names, descriptions, types, modes, languages,
082                            andOperator);
083            }
084    
085            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByKeywords(
086                    long companyId, long groupId, long structureId,
087                    java.lang.String keywords, java.lang.String type,
088                    java.lang.String mode, int start, int end,
089                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
090                    throws com.liferay.portal.kernel.exception.SystemException {
091                    return getFinder()
092                                       .filterFindByKeywords(companyId, groupId, structureId,
093                            keywords, type, mode, start, end, orderByComparator);
094            }
095    
096            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByC_G_S_N_D_T_M_L(
097                    long companyId, long groupId, long structureId, java.lang.String name,
098                    java.lang.String description, java.lang.String type,
099                    java.lang.String mode, java.lang.String language, boolean andOperator,
100                    int start, int end,
101                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
102                    throws com.liferay.portal.kernel.exception.SystemException {
103                    return getFinder()
104                                       .filterFindByC_G_S_N_D_T_M_L(companyId, groupId,
105                            structureId, name, description, type, mode, language, andOperator,
106                            start, end, orderByComparator);
107            }
108    
109            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> filterFindByC_G_S_N_D_T_M_L(
110                    long companyId, long groupId, long structureId,
111                    java.lang.String[] names, java.lang.String[] descriptions,
112                    java.lang.String[] types, java.lang.String[] modes,
113                    java.lang.String[] languages, boolean andOperator, int start, int end,
114                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
115                    throws com.liferay.portal.kernel.exception.SystemException {
116                    return getFinder()
117                                       .filterFindByC_G_S_N_D_T_M_L(companyId, groupId,
118                            structureId, names, descriptions, types, modes, languages,
119                            andOperator, start, end, orderByComparator);
120            }
121    
122            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByKeywords(
123                    long companyId, long groupId, long structureId,
124                    java.lang.String keywords, java.lang.String type,
125                    java.lang.String mode, int start, int end,
126                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
127                    throws com.liferay.portal.kernel.exception.SystemException {
128                    return getFinder()
129                                       .findByKeywords(companyId, groupId, structureId, keywords,
130                            type, mode, start, end, orderByComparator);
131            }
132    
133            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByC_G_S_N_D_T_M_L(
134                    long companyId, long groupId, long structureId, java.lang.String name,
135                    java.lang.String description, java.lang.String type,
136                    java.lang.String mode, java.lang.String language, boolean andOperator,
137                    int start, int end,
138                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
139                    throws com.liferay.portal.kernel.exception.SystemException {
140                    return getFinder()
141                                       .findByC_G_S_N_D_T_M_L(companyId, groupId, structureId,
142                            name, description, type, mode, language, andOperator, start, end,
143                            orderByComparator);
144            }
145    
146            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> findByC_G_S_N_D_T_M_L(
147                    long companyId, long groupId, long structureId,
148                    java.lang.String[] names, java.lang.String[] descriptions,
149                    java.lang.String[] types, java.lang.String[] modes,
150                    java.lang.String[] languages, boolean andOperator, int start, int end,
151                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
152                    throws com.liferay.portal.kernel.exception.SystemException {
153                    return getFinder()
154                                       .findByC_G_S_N_D_T_M_L(companyId, groupId, structureId,
155                            names, descriptions, types, modes, languages, andOperator, start,
156                            end, orderByComparator);
157            }
158    
159            public static DDMTemplateFinder getFinder() {
160                    if (_finder == null) {
161                            _finder = (DDMTemplateFinder)PortalBeanLocatorUtil.locate(DDMTemplateFinder.class.getName());
162    
163                            ReferenceRegistry.registerReference(DDMTemplateFinderUtil.class,
164                                    "_finder");
165                    }
166    
167                    return _finder;
168            }
169    
170            public void setFinder(DDMTemplateFinder finder) {
171                    _finder = finder;
172    
173                    ReferenceRegistry.registerReference(DDMTemplateFinderUtil.class,
174                            "_finder");
175            }
176    
177            private static DDMTemplateFinder _finder;
178    }