1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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;
24  
25  
26  /**
27   * <a href="OrganizationLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portal.service.OrganizationLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portal.service.OrganizationLocalService
45   *
46   */
47  public class OrganizationLocalServiceUtil {
48      public static com.liferay.portal.model.Organization addOrganization(
49          com.liferay.portal.model.Organization organization)
50          throws com.liferay.portal.SystemException {
51          return getService().addOrganization(organization);
52      }
53  
54      public static com.liferay.portal.model.Organization createOrganization(
55          long organizationId) {
56          return getService().createOrganization(organizationId);
57      }
58  
59      public static void deleteOrganization(long organizationId)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException {
62          getService().deleteOrganization(organizationId);
63      }
64  
65      public static void deleteOrganization(
66          com.liferay.portal.model.Organization organization)
67          throws com.liferay.portal.SystemException {
68          getService().deleteOrganization(organization);
69      }
70  
71      public static java.util.List<Object> dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
73          throws com.liferay.portal.SystemException {
74          return getService().dynamicQuery(dynamicQuery);
75      }
76  
77      public static java.util.List<Object> dynamicQuery(
78          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79          int end) throws com.liferay.portal.SystemException {
80          return getService().dynamicQuery(dynamicQuery, start, end);
81      }
82  
83      public static com.liferay.portal.model.Organization getOrganization(
84          long organizationId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService().getOrganization(organizationId);
88      }
89  
90      public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
91          int start, int end) throws com.liferay.portal.SystemException {
92          return getService().getOrganizations(start, end);
93      }
94  
95      public static int getOrganizationsCount()
96          throws com.liferay.portal.SystemException {
97          return getService().getOrganizationsCount();
98      }
99  
100     public static com.liferay.portal.model.Organization updateOrganization(
101         com.liferay.portal.model.Organization organization)
102         throws com.liferay.portal.SystemException {
103         return getService().updateOrganization(organization);
104     }
105 
106     public static void addGroupOrganizations(long groupId,
107         long[] organizationIds) throws com.liferay.portal.SystemException {
108         getService().addGroupOrganizations(groupId, organizationIds);
109     }
110 
111     public static com.liferay.portal.model.Organization addOrganization(
112         long userId, long parentOrganizationId, java.lang.String name,
113         java.lang.String type, boolean recursable, long regionId,
114         long countryId, int statusId, java.lang.String comments,
115         com.liferay.portal.service.ServiceContext serviceContext)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException {
118         return getService()
119                    .addOrganization(userId, parentOrganizationId, name, type,
120             recursable, regionId, countryId, statusId, comments, serviceContext);
121     }
122 
123     public static void addOrganizationResources(long userId,
124         com.liferay.portal.model.Organization organization)
125         throws com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException {
127         getService().addOrganizationResources(userId, organization);
128     }
129 
130     public static void addPasswordPolicyOrganizations(long passwordPolicyId,
131         long[] organizationIds) throws com.liferay.portal.SystemException {
132         getService()
133             .addPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
134     }
135 
136     public static java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
137         long groupId) throws com.liferay.portal.SystemException {
138         return getService().getGroupOrganizations(groupId);
139     }
140 
141     public static java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
142         long userId) throws com.liferay.portal.SystemException {
143         return getService().getManageableOrganizations(userId);
144     }
145 
146     public static com.liferay.portal.model.Organization getOrganization(
147         long companyId, java.lang.String name)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException {
150         return getService().getOrganization(companyId, name);
151     }
152 
153     public static long getOrganizationId(long companyId, java.lang.String name)
154         throws com.liferay.portal.SystemException {
155         return getService().getOrganizationId(companyId, name);
156     }
157 
158     public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
159         long[] organizationIds)
160         throws com.liferay.portal.PortalException,
161             com.liferay.portal.SystemException {
162         return getService().getOrganizations(organizationIds);
163     }
164 
165     public static java.util.List<com.liferay.portal.model.Organization> getParentOrganizations(
166         long organizationId)
167         throws com.liferay.portal.PortalException,
168             com.liferay.portal.SystemException {
169         return getService().getParentOrganizations(organizationId);
170     }
171 
172     public static java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
173         java.util.List<com.liferay.portal.model.Organization> organizations)
174         throws com.liferay.portal.SystemException {
175         return getService().getSuborganizations(organizations);
176     }
177 
178     public static java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
179         java.util.List<com.liferay.portal.model.Organization> allOrganizations,
180         java.util.List<com.liferay.portal.model.Organization> availableOrganizations) {
181         return getService()
182                    .getSubsetOrganizations(allOrganizations,
183             availableOrganizations);
184     }
185 
186     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
187         long userId) throws com.liferay.portal.SystemException {
188         return getService().getUserOrganizations(userId);
189     }
190 
191     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
192         long userId, int start, int end)
193         throws com.liferay.portal.SystemException {
194         return getService().getUserOrganizations(userId, start, end);
195     }
196 
197     public static int getUserOrganizationsCount(long userId)
198         throws com.liferay.portal.SystemException {
199         return getService().getUserOrganizationsCount(userId);
200     }
201 
202     public static boolean hasGroupOrganization(long groupId, long organizationId)
203         throws com.liferay.portal.SystemException {
204         return getService().hasGroupOrganization(groupId, organizationId);
205     }
206 
207     public static boolean hasUserOrganization(long userId, long organizationId)
208         throws com.liferay.portal.SystemException {
209         return getService().hasUserOrganization(userId, organizationId);
210     }
211 
212     public static boolean hasPasswordPolicyOrganization(long passwordPolicyId,
213         long organizationId) throws com.liferay.portal.SystemException {
214         return getService()
215                    .hasPasswordPolicyOrganization(passwordPolicyId,
216             organizationId);
217     }
218 
219     public static java.util.List<com.liferay.portal.model.Organization> search(
220         long companyId, long parentOrganizationId, java.lang.String keywords,
221         java.lang.String type, java.lang.Long regionId,
222         java.lang.Long countryId,
223         java.util.LinkedHashMap<String, Object> params, int start, int end)
224         throws com.liferay.portal.SystemException {
225         return getService()
226                    .search(companyId, parentOrganizationId, keywords, type,
227             regionId, countryId, params, start, end);
228     }
229 
230     public static java.util.List<com.liferay.portal.model.Organization> search(
231         long companyId, long parentOrganizationId, java.lang.String keywords,
232         java.lang.String type, java.lang.Long regionId,
233         java.lang.Long countryId,
234         java.util.LinkedHashMap<String, Object> params, int start, int end,
235         com.liferay.portal.kernel.util.OrderByComparator obc)
236         throws com.liferay.portal.SystemException {
237         return getService()
238                    .search(companyId, parentOrganizationId, keywords, type,
239             regionId, countryId, params, start, end, obc);
240     }
241 
242     public static java.util.List<com.liferay.portal.model.Organization> search(
243         long companyId, long parentOrganizationId, java.lang.String name,
244         java.lang.String type, java.lang.String street, java.lang.String city,
245         java.lang.String zip, java.lang.Long regionId,
246         java.lang.Long countryId,
247         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
248         int start, int end) throws com.liferay.portal.SystemException {
249         return getService()
250                    .search(companyId, parentOrganizationId, name, type, street,
251             city, zip, regionId, countryId, params, andOperator, start, end);
252     }
253 
254     public static java.util.List<com.liferay.portal.model.Organization> search(
255         long companyId, long parentOrganizationId, java.lang.String name,
256         java.lang.String type, java.lang.String street, java.lang.String city,
257         java.lang.String zip, java.lang.Long regionId,
258         java.lang.Long countryId,
259         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
260         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
261         throws com.liferay.portal.SystemException {
262         return getService()
263                    .search(companyId, parentOrganizationId, name, type, street,
264             city, zip, regionId, countryId, params, andOperator, start, end, obc);
265     }
266 
267     public static int searchCount(long companyId, long parentOrganizationId,
268         java.lang.String keywords, java.lang.String type,
269         java.lang.Long regionId, java.lang.Long countryId,
270         java.util.LinkedHashMap<String, Object> params)
271         throws com.liferay.portal.SystemException {
272         return getService()
273                    .searchCount(companyId, parentOrganizationId, keywords,
274             type, regionId, countryId, params);
275     }
276 
277     public static int searchCount(long companyId, long parentOrganizationId,
278         java.lang.String name, java.lang.String type, java.lang.String street,
279         java.lang.String city, java.lang.String zip, java.lang.Long regionId,
280         java.lang.Long countryId,
281         java.util.LinkedHashMap<String, Object> params, boolean andOperator)
282         throws com.liferay.portal.SystemException {
283         return getService()
284                    .searchCount(companyId, parentOrganizationId, name, type,
285             street, city, zip, regionId, countryId, params, andOperator);
286     }
287 
288     public static void setGroupOrganizations(long groupId,
289         long[] organizationIds) throws com.liferay.portal.SystemException {
290         getService().setGroupOrganizations(groupId, organizationIds);
291     }
292 
293     public static void unsetGroupOrganizations(long groupId,
294         long[] organizationIds) throws com.liferay.portal.SystemException {
295         getService().unsetGroupOrganizations(groupId, organizationIds);
296     }
297 
298     public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
299         long[] organizationIds) throws com.liferay.portal.SystemException {
300         getService()
301             .unsetPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
302     }
303 
304     public static com.liferay.portal.model.Organization updateOrganization(
305         long companyId, long organizationId, long parentOrganizationId,
306         java.lang.String name, java.lang.String type, boolean recursable,
307         long regionId, long countryId, int statusId, java.lang.String comments,
308         com.liferay.portal.service.ServiceContext serviceContext)
309         throws com.liferay.portal.PortalException,
310             com.liferay.portal.SystemException {
311         return getService()
312                    .updateOrganization(companyId, organizationId,
313             parentOrganizationId, name, type, recursable, regionId, countryId,
314             statusId, comments, serviceContext);
315     }
316 
317     public static OrganizationLocalService getService() {
318         if (_service == null) {
319             throw new RuntimeException("OrganizationLocalService is not set");
320         }
321 
322         return _service;
323     }
324 
325     public void setService(OrganizationLocalService service) {
326         _service = service;
327     }
328 
329     private static OrganizationLocalService _service;
330 }