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.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> findByCompanyId(
074                    long companyId,
075                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
076                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
077                    throws com.liferay.portal.kernel.exception.SystemException {
078                    return getFinder().findByCompanyId(companyId, params, start, end, obc);
079            }
080    
081            public static java.util.List<com.liferay.portal.model.Organization> findByKeywords(
082                    long companyId, long parentOrganizationId,
083                    java.lang.String parentOrganizationIdComparator,
084                    java.lang.String keywords, java.lang.String type,
085                    java.lang.Long regionId, java.lang.Long countryId,
086                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
087                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
088                    throws com.liferay.portal.kernel.exception.SystemException {
089                    return getFinder()
090                                       .findByKeywords(companyId, parentOrganizationId,
091                            parentOrganizationIdComparator, keywords, type, regionId,
092                            countryId, params, start, end, obc);
093            }
094    
095            public static java.util.List<com.liferay.portal.model.Organization> findByC_PO_N_T_S_C_Z_R_C(
096                    long companyId, long parentOrganizationId,
097                    java.lang.String parentOrganizationIdComparator, java.lang.String name,
098                    java.lang.String type, java.lang.String street, java.lang.String city,
099                    java.lang.String zip, java.lang.Long regionId,
100                    java.lang.Long countryId,
101                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
102                    boolean andOperator, int start, int end,
103                    com.liferay.portal.kernel.util.OrderByComparator obc)
104                    throws com.liferay.portal.kernel.exception.SystemException {
105                    return getFinder()
106                                       .findByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
107                            parentOrganizationIdComparator, name, type, street, city, zip,
108                            regionId, countryId, params, andOperator, start, end, obc);
109            }
110    
111            public static java.util.List<com.liferay.portal.model.Organization> findByC_PO_N_T_S_C_Z_R_C(
112                    long companyId, long parentOrganizationId,
113                    java.lang.String parentOrganizationIdComparator,
114                    java.lang.String[] names, java.lang.String type,
115                    java.lang.String[] streets, java.lang.String[] cities,
116                    java.lang.String[] zips, java.lang.Long regionId,
117                    java.lang.Long countryId,
118                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
119                    boolean andOperator, int start, int end,
120                    com.liferay.portal.kernel.util.OrderByComparator obc)
121                    throws com.liferay.portal.kernel.exception.SystemException {
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    }