001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 DDMStructureFinderUtil {
024            public static int countByKeywords(long companyId, long[] groupIds,
025                    long[] classNameIds, java.lang.String keywords)
026                    throws com.liferay.portal.kernel.exception.SystemException {
027                    return getFinder()
028                                       .countByKeywords(companyId, groupIds, classNameIds, keywords);
029            }
030    
031            public static int countByC_G_C_N_D_S_T(long companyId, long[] groupIds,
032                    long[] classNameIds, java.lang.String name,
033                    java.lang.String description, java.lang.String storageType, int type,
034                    boolean andOperator)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getFinder()
037                                       .countByC_G_C_N_D_S_T(companyId, groupIds, classNameIds,
038                            name, description, storageType, type, andOperator);
039            }
040    
041            public static int countByC_G_C_N_D_S_T(long companyId, long[] groupIds,
042                    long[] classNameIds, java.lang.String[] names,
043                    java.lang.String[] descriptions, java.lang.String[] storageTypes,
044                    int type, boolean andOperator)
045                    throws com.liferay.portal.kernel.exception.SystemException {
046                    return getFinder()
047                                       .countByC_G_C_N_D_S_T(companyId, groupIds, classNameIds,
048                            names, descriptions, storageTypes, type, andOperator);
049            }
050    
051            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> findByKeywords(
052                    long companyId, long[] groupIds, long[] classNameIds,
053                    java.lang.String keywords, int start, int end,
054                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
055                    throws com.liferay.portal.kernel.exception.SystemException {
056                    return getFinder()
057                                       .findByKeywords(companyId, groupIds, classNameIds, keywords,
058                            start, end, orderByComparator);
059            }
060    
061            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> findByC_G_C_N_D_S_T(
062                    long companyId, long[] groupIds, long[] classNameIds,
063                    java.lang.String name, java.lang.String description,
064                    java.lang.String storageType, int type, boolean andOperator, int start,
065                    int end,
066                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
067                    throws com.liferay.portal.kernel.exception.SystemException {
068                    return getFinder()
069                                       .findByC_G_C_N_D_S_T(companyId, groupIds, classNameIds,
070                            name, description, storageType, type, andOperator, start, end,
071                            orderByComparator);
072            }
073    
074            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMStructure> findByC_G_C_N_D_S_T(
075                    long companyId, long[] groupIds, long[] classNameIds,
076                    java.lang.String[] names, java.lang.String[] descriptions,
077                    java.lang.String[] storageTypes, int type, boolean andOperator,
078                    int start, int end,
079                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
080                    throws com.liferay.portal.kernel.exception.SystemException {
081                    return getFinder()
082                                       .findByC_G_C_N_D_S_T(companyId, groupIds, classNameIds,
083                            names, descriptions, storageTypes, type, andOperator, start, end,
084                            orderByComparator);
085            }
086    
087            public static DDMStructureFinder getFinder() {
088                    if (_finder == null) {
089                            _finder = (DDMStructureFinder)PortalBeanLocatorUtil.locate(DDMStructureFinder.class.getName());
090    
091                            ReferenceRegistry.registerReference(DDMStructureFinderUtil.class,
092                                    "_finder");
093                    }
094    
095                    return _finder;
096            }
097    
098            public void setFinder(DDMStructureFinder finder) {
099                    _finder = finder;
100    
101                    ReferenceRegistry.registerReference(DDMStructureFinderUtil.class,
102                            "_finder");
103            }
104    
105            private static DDMStructureFinder _finder;
106    }