001    /**
002     * Copyright (c) 2000-present 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.portal.service.persistence;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * @author Brian Wing Shun Chan
024     */
025    @ProviderType
026    public class OrganizationFinderUtil {
027            public static int countByKeywords(long companyId,
028                    long parentOrganizationId,
029                    java.lang.String parentOrganizationIdComparator,
030                    java.lang.String keywords, java.lang.String type,
031                    java.lang.Long regionId, java.lang.Long countryId,
032                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params) {
033                    return getFinder()
034                                       .countByKeywords(companyId, parentOrganizationId,
035                            parentOrganizationIdComparator, keywords, type, regionId,
036                            countryId, params);
037            }
038    
039            public static int countByO_U(long organizationId, long userId) {
040                    return getFinder().countByO_U(organizationId, userId);
041            }
042    
043            public static int countByC_PO_N_T_S_C_Z_R_C(long companyId,
044                    long parentOrganizationId,
045                    java.lang.String parentOrganizationIdComparator, java.lang.String name,
046                    java.lang.String type, java.lang.String street, java.lang.String city,
047                    java.lang.String zip, java.lang.Long regionId,
048                    java.lang.Long countryId,
049                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
050                    boolean andOperator) {
051                    return getFinder()
052                                       .countByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
053                            parentOrganizationIdComparator, name, type, street, city, zip,
054                            regionId, countryId, params, andOperator);
055            }
056    
057            public static int countByC_PO_N_T_S_C_Z_R_C(long companyId,
058                    long parentOrganizationId,
059                    java.lang.String parentOrganizationIdComparator,
060                    java.lang.String[] names, java.lang.String type,
061                    java.lang.String[] streets, java.lang.String[] cities,
062                    java.lang.String[] zips, java.lang.Long regionId,
063                    java.lang.Long countryId,
064                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
065                    boolean andOperator) {
066                    return getFinder()
067                                       .countByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
068                            parentOrganizationIdComparator, names, type, streets, cities, zips,
069                            regionId, countryId, params, andOperator);
070            }
071    
072            public static java.util.List<com.liferay.portal.model.Organization> findByKeywords(
073                    long companyId, long parentOrganizationId,
074                    java.lang.String parentOrganizationIdComparator,
075                    java.lang.String keywords, java.lang.String type,
076                    java.lang.Long regionId, java.lang.Long countryId,
077                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
078                    int start, int end,
079                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc) {
080                    return getFinder()
081                                       .findByKeywords(companyId, parentOrganizationId,
082                            parentOrganizationIdComparator, keywords, type, regionId,
083                            countryId, params, start, end, obc);
084            }
085    
086            public static java.util.List<com.liferay.portal.model.Organization> findByNoAssets() {
087                    return getFinder().findByNoAssets();
088            }
089    
090            public static java.util.List<java.lang.Long> findByC_P(long companyId,
091                    long parentOrganizationId, long previousOrganizationId, int size) {
092                    return getFinder()
093                                       .findByC_P(companyId, parentOrganizationId,
094                            previousOrganizationId, size);
095            }
096    
097            public static java.util.List<com.liferay.portal.model.Organization> findByC_PO_N_T_S_C_Z_R_C(
098                    long companyId, long parentOrganizationId,
099                    java.lang.String parentOrganizationIdComparator, java.lang.String name,
100                    java.lang.String type, java.lang.String street, java.lang.String city,
101                    java.lang.String zip, java.lang.Long regionId,
102                    java.lang.Long countryId,
103                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
104                    boolean andOperator, int start, int end,
105                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc) {
106                    return getFinder()
107                                       .findByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
108                            parentOrganizationIdComparator, name, type, street, city, zip,
109                            regionId, countryId, params, andOperator, start, end, obc);
110            }
111    
112            public static java.util.List<com.liferay.portal.model.Organization> findByC_PO_N_T_S_C_Z_R_C(
113                    long companyId, long parentOrganizationId,
114                    java.lang.String parentOrganizationIdComparator,
115                    java.lang.String[] names, java.lang.String type,
116                    java.lang.String[] streets, java.lang.String[] cities,
117                    java.lang.String[] zips, java.lang.Long regionId,
118                    java.lang.Long countryId,
119                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
120                    boolean andOperator, int start, int end,
121                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.Organization> obc) {
122                    return getFinder()
123                                       .findByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
124                            parentOrganizationIdComparator, names, type, streets, cities, zips,
125                            regionId, countryId, params, andOperator, start, end, obc);
126            }
127    
128            public static OrganizationFinder getFinder() {
129                    if (_finder == null) {
130                            _finder = (OrganizationFinder)PortalBeanLocatorUtil.locate(OrganizationFinder.class.getName());
131    
132                            ReferenceRegistry.registerReference(OrganizationFinderUtil.class,
133                                    "_finder");
134                    }
135    
136                    return _finder;
137            }
138    
139            public void setFinder(OrganizationFinder finder) {
140                    _finder = finder;
141    
142                    ReferenceRegistry.registerReference(OrganizationFinderUtil.class,
143                            "_finder");
144            }
145    
146            private static OrganizationFinder _finder;
147    }