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 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                    throws com.liferay.portal.kernel.exception.SystemException {
034                    return getFinder()
035                                       .countByKeywords(companyId, parentOrganizationId,
036                            parentOrganizationIdComparator, keywords, type, regionId,
037                            countryId, params);
038            }
039    
040            public static int countByO_U(long organizationId, long userId)
041                    throws com.liferay.portal.kernel.exception.SystemException {
042                    return getFinder().countByO_U(organizationId, userId);
043            }
044    
045            public static int countByC_PO_N_T_S_C_Z_R_C(long companyId,
046                    long parentOrganizationId,
047                    java.lang.String parentOrganizationIdComparator, java.lang.String name,
048                    java.lang.String type, java.lang.String street, java.lang.String city,
049                    java.lang.String zip, java.lang.Long regionId,
050                    java.lang.Long countryId,
051                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
052                    boolean andOperator)
053                    throws com.liferay.portal.kernel.exception.SystemException {
054                    return getFinder()
055                                       .countByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
056                            parentOrganizationIdComparator, name, type, street, city, zip,
057                            regionId, countryId, params, andOperator);
058            }
059    
060            public static int countByC_PO_N_T_S_C_Z_R_C(long companyId,
061                    long parentOrganizationId,
062                    java.lang.String parentOrganizationIdComparator,
063                    java.lang.String[] names, java.lang.String type,
064                    java.lang.String[] streets, java.lang.String[] cities,
065                    java.lang.String[] zips, java.lang.Long regionId,
066                    java.lang.Long countryId,
067                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
068                    boolean andOperator)
069                    throws com.liferay.portal.kernel.exception.SystemException {
070                    return getFinder()
071                                       .countByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
072                            parentOrganizationIdComparator, names, type, streets, cities, zips,
073                            regionId, countryId, params, andOperator);
074            }
075    
076            public static java.util.List<com.liferay.portal.model.Organization> findByKeywords(
077                    long companyId, long parentOrganizationId,
078                    java.lang.String parentOrganizationIdComparator,
079                    java.lang.String keywords, java.lang.String type,
080                    java.lang.Long regionId, java.lang.Long countryId,
081                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
082                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
083                    throws com.liferay.portal.kernel.exception.SystemException {
084                    return getFinder()
085                                       .findByKeywords(companyId, parentOrganizationId,
086                            parentOrganizationIdComparator, keywords, type, regionId,
087                            countryId, params, start, end, obc);
088            }
089    
090            public static java.util.List<com.liferay.portal.model.Organization> findByNoAssets()
091                    throws com.liferay.portal.kernel.exception.SystemException {
092                    return getFinder().findByNoAssets();
093            }
094    
095            public static java.util.List<java.lang.Long> findByC_P(long companyId,
096                    long parentOrganizationId, long previousOrganizationId, int size)
097                    throws com.liferay.portal.kernel.exception.SystemException {
098                    return getFinder()
099                                       .findByC_P(companyId, parentOrganizationId,
100                            previousOrganizationId, size);
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, java.lang.String name,
106                    java.lang.String type, java.lang.String street, java.lang.String city,
107                    java.lang.String zip, java.lang.Long regionId,
108                    java.lang.Long countryId,
109                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
110                    boolean andOperator, int start, int end,
111                    com.liferay.portal.kernel.util.OrderByComparator obc)
112                    throws com.liferay.portal.kernel.exception.SystemException {
113                    return getFinder()
114                                       .findByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
115                            parentOrganizationIdComparator, name, type, street, city, zip,
116                            regionId, countryId, params, andOperator, start, end, obc);
117            }
118    
119            public static java.util.List<com.liferay.portal.model.Organization> findByC_PO_N_T_S_C_Z_R_C(
120                    long companyId, long parentOrganizationId,
121                    java.lang.String parentOrganizationIdComparator,
122                    java.lang.String[] names, java.lang.String type,
123                    java.lang.String[] streets, java.lang.String[] cities,
124                    java.lang.String[] zips, java.lang.Long regionId,
125                    java.lang.Long countryId,
126                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
127                    boolean andOperator, int start, int end,
128                    com.liferay.portal.kernel.util.OrderByComparator obc)
129                    throws com.liferay.portal.kernel.exception.SystemException {
130                    return getFinder()
131                                       .findByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
132                            parentOrganizationIdComparator, names, type, streets, cities, zips,
133                            regionId, countryId, params, andOperator, start, end, obc);
134            }
135    
136            public static OrganizationFinder getFinder() {
137                    if (_finder == null) {
138                            _finder = (OrganizationFinder)PortalBeanLocatorUtil.locate(OrganizationFinder.class.getName());
139    
140                            ReferenceRegistry.registerReference(OrganizationFinderUtil.class,
141                                    "_finder");
142                    }
143    
144                    return _finder;
145            }
146    
147            public void setFinder(OrganizationFinder finder) {
148                    _finder = finder;
149    
150                    ReferenceRegistry.registerReference(OrganizationFinderUtil.class,
151                            "_finder");
152            }
153    
154            private static OrganizationFinder _finder;
155    }