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> 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> findByNoAssets()
088                    throws com.liferay.portal.kernel.exception.SystemException {
089                    return getFinder().findByNoAssets();
090            }
091    
092            public static java.util.List<com.liferay.portal.model.Organization> findByCompanyId(
093                    long companyId,
094                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
095                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
096                    throws com.liferay.portal.kernel.exception.SystemException {
097                    return getFinder().findByCompanyId(companyId, params, start, end, obc);
098            }
099    
100            public static java.util.List<com.liferay.portal.model.Organization> findByC_PO_N_T_S_C_Z_R_C(
101                    long companyId, long parentOrganizationId,
102                    java.lang.String parentOrganizationIdComparator, java.lang.String name,
103                    java.lang.String type, java.lang.String street, java.lang.String city,
104                    java.lang.String zip, java.lang.Long regionId,
105                    java.lang.Long countryId,
106                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
107                    boolean andOperator, int start, int end,
108                    com.liferay.portal.kernel.util.OrderByComparator obc)
109                    throws com.liferay.portal.kernel.exception.SystemException {
110                    return getFinder()
111                                       .findByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
112                            parentOrganizationIdComparator, name, type, street, city, zip,
113                            regionId, countryId, params, andOperator, start, end, obc);
114            }
115    
116            public static java.util.List<com.liferay.portal.model.Organization> findByC_PO_N_T_S_C_Z_R_C(
117                    long companyId, long parentOrganizationId,
118                    java.lang.String parentOrganizationIdComparator,
119                    java.lang.String[] names, java.lang.String type,
120                    java.lang.String[] streets, java.lang.String[] cities,
121                    java.lang.String[] zips, java.lang.Long regionId,
122                    java.lang.Long countryId,
123                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
124                    boolean andOperator, int start, int end,
125                    com.liferay.portal.kernel.util.OrderByComparator obc)
126                    throws com.liferay.portal.kernel.exception.SystemException {
127                    return getFinder()
128                                       .findByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
129                            parentOrganizationIdComparator, names, type, streets, cities, zips,
130                            regionId, countryId, params, andOperator, start, end, obc);
131            }
132    
133            public static OrganizationFinder getFinder() {
134                    if (_finder == null) {
135                            _finder = (OrganizationFinder)PortalBeanLocatorUtil.locate(OrganizationFinder.class.getName());
136    
137                            ReferenceRegistry.registerReference(OrganizationFinderUtil.class,
138                                    "_finder");
139                    }
140    
141                    return _finder;
142            }
143    
144            public void setFinder(OrganizationFinder finder) {
145                    _finder = finder;
146    
147                    ReferenceRegistry.registerReference(OrganizationFinderUtil.class,
148                            "_finder");
149            }
150    
151            private static OrganizationFinder _finder;
152    }