1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.service.persistence;
24  
25  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="OrganizationFinderUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   */
32  public class OrganizationFinderUtil {
33      public static int countByKeywords(long companyId,
34          long parentOrganizationId,
35          java.lang.String parentOrganizationIdComparator,
36          java.lang.String keywords, java.lang.String type,
37          java.lang.Long regionId, java.lang.Long countryId,
38          java.util.LinkedHashMap<String, Object> params)
39          throws com.liferay.portal.SystemException {
40          return getFinder()
41                     .countByKeywords(companyId, parentOrganizationId,
42              parentOrganizationIdComparator, keywords, type, regionId,
43              countryId, params);
44      }
45  
46      public static int countByO_U(long organizationId, long userId)
47          throws com.liferay.portal.SystemException {
48          return getFinder().countByO_U(organizationId, userId);
49      }
50  
51      public static int countByC_PO_N_T_S_C_Z_R_C(long companyId,
52          long parentOrganizationId,
53          java.lang.String parentOrganizationIdComparator, java.lang.String name,
54          java.lang.String type, java.lang.String street, java.lang.String city,
55          java.lang.String zip, java.lang.Long regionId,
56          java.lang.Long countryId,
57          java.util.LinkedHashMap<String, Object> params, boolean andOperator)
58          throws com.liferay.portal.SystemException {
59          return getFinder()
60                     .countByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
61              parentOrganizationIdComparator, name, type, street, city, zip,
62              regionId, countryId, params, andOperator);
63      }
64  
65      public static int countByC_PO_N_T_S_C_Z_R_C(long companyId,
66          long parentOrganizationId,
67          java.lang.String parentOrganizationIdComparator,
68          java.lang.String[] names, java.lang.String type,
69          java.lang.String[] streets, java.lang.String[] cities,
70          java.lang.String[] zips, java.lang.Long regionId,
71          java.lang.Long countryId,
72          java.util.LinkedHashMap<String, Object> params, boolean andOperator)
73          throws com.liferay.portal.SystemException {
74          return getFinder()
75                     .countByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
76              parentOrganizationIdComparator, names, type, streets, cities, zips,
77              regionId, countryId, params, andOperator);
78      }
79  
80      public static java.util.List<com.liferay.portal.model.Organization> findByKeywords(
81          long companyId, long parentOrganizationId,
82          java.lang.String parentOrganizationIdComparator,
83          java.lang.String keywords, java.lang.String type,
84          java.lang.Long regionId, java.lang.Long countryId,
85          java.util.LinkedHashMap<String, Object> params, int start, int end,
86          com.liferay.portal.kernel.util.OrderByComparator obc)
87          throws com.liferay.portal.SystemException {
88          return getFinder()
89                     .findByKeywords(companyId, parentOrganizationId,
90              parentOrganizationIdComparator, keywords, type, regionId,
91              countryId, params, start, end, obc);
92      }
93  
94      public static java.util.List<com.liferay.portal.model.Organization> findByC_PO_N_T_S_C_Z_R_C(
95          long companyId, long parentOrganizationId,
96          java.lang.String parentOrganizationIdComparator, java.lang.String name,
97          java.lang.String type, java.lang.String street, java.lang.String city,
98          java.lang.String zip, java.lang.Long regionId,
99          java.lang.Long countryId,
100         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
101         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException {
103         return getFinder()
104                    .findByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
105             parentOrganizationIdComparator, name, type, street, city, zip,
106             regionId, countryId, params, andOperator, start, end, obc);
107     }
108 
109     public static java.util.List<com.liferay.portal.model.Organization> findByC_PO_N_T_S_C_Z_R_C(
110         long companyId, long parentOrganizationId,
111         java.lang.String parentOrganizationIdComparator,
112         java.lang.String[] names, java.lang.String type,
113         java.lang.String[] streets, java.lang.String[] cities,
114         java.lang.String[] zips, java.lang.Long regionId,
115         java.lang.Long countryId,
116         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
117         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
118         throws com.liferay.portal.SystemException {
119         return getFinder()
120                    .findByC_PO_N_T_S_C_Z_R_C(companyId, parentOrganizationId,
121             parentOrganizationIdComparator, names, type, streets, cities, zips,
122             regionId, countryId, params, andOperator, start, end, obc);
123     }
124 
125     public static OrganizationFinder getFinder() {
126         if (_finder == null) {
127             _finder = (OrganizationFinder)PortalBeanLocatorUtil.locate(OrganizationFinder.class.getName());
128         }
129 
130         return _finder;
131     }
132 
133     public void setFinder(OrganizationFinder finder) {
134         _finder = finder;
135     }
136 
137     private static OrganizationFinder _finder;
138 }