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.portal.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 OrganizationFinderUtil {
024            public static int countByKeywords(long companyId,
025                    long parentOrganizationId,
026                    java.lang.String parentOrganizationIdComparator,
027                    java.lang.String keywords, java.lang.String type,
028                    java.lang.Long regionId, java.lang.Long countryId,
029                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
030                    throws com.liferay.portal.kernel.exception.SystemException {
031                    return getFinder()
032                                       .countByKeywords(companyId, parentOrganizationId,
033                            parentOrganizationIdComparator, keywords, type, regionId,
034                            countryId, params);
035            }
036    
037            public static int countByO_U(long organizationId, long userId)
038                    throws com.liferay.portal.kernel.exception.SystemException {
039                    return getFinder().countByO_U(organizationId, userId);
040            }
041    
042            public static int countByC_PO_N_T_S_C_Z_R_C(long companyId,
043                    long parentOrganizationId,
044                    java.lang.String parentOrganizationIdComparator, java.lang.String name,
045                    java.lang.String type, java.lang.String street, java.lang.String city,
046                    java.lang.String zip, java.lang.Long regionId,
047                    java.lang.Long countryId,
048                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
049                    boolean andOperator)
050                    throws com.liferay.portal.kernel.exception.SystemException {
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                    throws com.liferay.portal.kernel.exception.SystemException {
067                    return getFinder()
068                                       .countByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
069                            parentOrganizationIdComparator, names, type, streets, cities, zips,
070                            regionId, countryId, params, andOperator);
071            }
072    
073            public static java.util.List<com.liferay.portal.model.Organization> findByKeywords(
074                    long companyId, long parentOrganizationId,
075                    java.lang.String parentOrganizationIdComparator,
076                    java.lang.String keywords, java.lang.String type,
077                    java.lang.Long regionId, java.lang.Long countryId,
078                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
079                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
080                    throws com.liferay.portal.kernel.exception.SystemException {
081                    return getFinder()
082                                       .findByKeywords(companyId, parentOrganizationId,
083                            parentOrganizationIdComparator, keywords, type, regionId,
084                            countryId, params, start, end, obc);
085            }
086    
087            public static java.util.List<com.liferay.portal.model.Organization> findByC_PO_N_T_S_C_Z_R_C(
088                    long companyId, long parentOrganizationId,
089                    java.lang.String parentOrganizationIdComparator, java.lang.String name,
090                    java.lang.String type, java.lang.String street, java.lang.String city,
091                    java.lang.String zip, java.lang.Long regionId,
092                    java.lang.Long countryId,
093                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
094                    boolean andOperator, int start, int end,
095                    com.liferay.portal.kernel.util.OrderByComparator obc)
096                    throws com.liferay.portal.kernel.exception.SystemException {
097                    return getFinder()
098                                       .findByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
099                            parentOrganizationIdComparator, name, type, street, city, zip,
100                            regionId, countryId, params, andOperator, start, end, obc);
101            }
102    
103            public static java.util.List<com.liferay.portal.model.Organization> findByC_PO_N_T_S_C_Z_R_C(
104                    long companyId, long parentOrganizationId,
105                    java.lang.String parentOrganizationIdComparator,
106                    java.lang.String[] names, java.lang.String type,
107                    java.lang.String[] streets, java.lang.String[] cities,
108                    java.lang.String[] zips, java.lang.Long regionId,
109                    java.lang.Long countryId,
110                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
111                    boolean andOperator, int start, int end,
112                    com.liferay.portal.kernel.util.OrderByComparator obc)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getFinder()
115                                       .findByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
116                            parentOrganizationIdComparator, names, type, streets, cities, zips,
117                            regionId, countryId, params, andOperator, start, end, obc);
118            }
119    
120            public static OrganizationFinder getFinder() {
121                    if (_finder == null) {
122                            _finder = (OrganizationFinder)PortalBeanLocatorUtil.locate(OrganizationFinder.class.getName());
123    
124                            ReferenceRegistry.registerReference(OrganizationFinderUtil.class,
125                                    "_finder");
126                    }
127    
128                    return _finder;
129            }
130    
131            public void setFinder(OrganizationFinder finder) {
132                    _finder = finder;
133    
134                    ReferenceRegistry.registerReference(OrganizationFinderUtil.class,
135                            "_finder");
136            }
137    
138            private static OrganizationFinder _finder;
139    }