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;
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   * {@link OrganizationLocalService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       OrganizationLocalService
44   * @generated
45   */
46  public class OrganizationLocalServiceUtil {
47      public static com.liferay.portal.model.Organization addOrganization(
48          com.liferay.portal.model.Organization organization)
49          throws com.liferay.portal.SystemException {
50          return getService().addOrganization(organization);
51      }
52  
53      public static com.liferay.portal.model.Organization createOrganization(
54          long organizationId) {
55          return getService().createOrganization(organizationId);
56      }
57  
58      public static void deleteOrganization(long organizationId)
59          throws com.liferay.portal.PortalException,
60              com.liferay.portal.SystemException {
61          getService().deleteOrganization(organizationId);
62      }
63  
64      public static void deleteOrganization(
65          com.liferay.portal.model.Organization organization)
66          throws com.liferay.portal.SystemException {
67          getService().deleteOrganization(organization);
68      }
69  
70      public static java.util.List<Object> dynamicQuery(
71          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
72          throws com.liferay.portal.SystemException {
73          return getService().dynamicQuery(dynamicQuery);
74      }
75  
76      public static java.util.List<Object> dynamicQuery(
77          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
78          int end) throws com.liferay.portal.SystemException {
79          return getService().dynamicQuery(dynamicQuery, start, end);
80      }
81  
82      public static com.liferay.portal.model.Organization getOrganization(
83          long organizationId)
84          throws com.liferay.portal.PortalException,
85              com.liferay.portal.SystemException {
86          return getService().getOrganization(organizationId);
87      }
88  
89      public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
90          int start, int end) throws com.liferay.portal.SystemException {
91          return getService().getOrganizations(start, end);
92      }
93  
94      public static int getOrganizationsCount()
95          throws com.liferay.portal.SystemException {
96          return getService().getOrganizationsCount();
97      }
98  
99      public static com.liferay.portal.model.Organization updateOrganization(
100         com.liferay.portal.model.Organization organization)
101         throws com.liferay.portal.SystemException {
102         return getService().updateOrganization(organization);
103     }
104 
105     public static com.liferay.portal.model.Organization updateOrganization(
106         com.liferay.portal.model.Organization organization, boolean merge)
107         throws com.liferay.portal.SystemException {
108         return getService().updateOrganization(organization, merge);
109     }
110 
111     public static void addGroupOrganizations(long groupId,
112         long[] organizationIds) throws com.liferay.portal.SystemException {
113         getService().addGroupOrganizations(groupId, organizationIds);
114     }
115 
116     public static com.liferay.portal.model.Organization addOrganization(
117         long userId, long parentOrganizationId, java.lang.String name,
118         int type, boolean recursable, long regionId, long countryId,
119         int statusId, java.lang.String comments)
120         throws com.liferay.portal.PortalException,
121             com.liferay.portal.SystemException {
122         return getService()
123                    .addOrganization(userId, parentOrganizationId, name, type,
124             recursable, regionId, countryId, statusId, comments);
125     }
126 
127     public static void addOrganizationResources(long userId,
128         com.liferay.portal.model.Organization organization)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException {
131         getService().addOrganizationResources(userId, organization);
132     }
133 
134     public static void addPasswordPolicyOrganizations(long passwordPolicyId,
135         long[] organizationIds) throws com.liferay.portal.SystemException {
136         getService()
137             .addPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
138     }
139 
140     public static java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
141         long groupId) throws com.liferay.portal.SystemException {
142         return getService().getGroupOrganizations(groupId);
143     }
144 
145     public static com.liferay.portal.model.Organization getOrganization(
146         long companyId, java.lang.String name)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException {
149         return getService().getOrganization(companyId, name);
150     }
151 
152     public static long getOrganizationId(long companyId, java.lang.String name)
153         throws com.liferay.portal.SystemException {
154         return getService().getOrganizationId(companyId, name);
155     }
156 
157     public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
158         long[] organizationIds)
159         throws com.liferay.portal.PortalException,
160             com.liferay.portal.SystemException {
161         return getService().getOrganizations(organizationIds);
162     }
163 
164     public static java.util.List<com.liferay.portal.model.Organization> getParentOrganizations(
165         long organizationId)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException {
168         return getService().getParentOrganizations(organizationId);
169     }
170 
171     public static java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
172         java.util.List<com.liferay.portal.model.Organization> organizations)
173         throws com.liferay.portal.SystemException {
174         return getService().getSuborganizations(organizations);
175     }
176 
177     public static java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
178         java.util.List<com.liferay.portal.model.Organization> allOrganizations,
179         java.util.List<com.liferay.portal.model.Organization> availableOrganizations) {
180         return getService()
181                    .getSubsetOrganizations(allOrganizations,
182             availableOrganizations);
183     }
184 
185     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
186         long userId)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException {
189         return getService().getUserOrganizations(userId);
190     }
191 
192     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
193         long userId, boolean inheritUserGroups)
194         throws com.liferay.portal.PortalException,
195             com.liferay.portal.SystemException {
196         return getService().getUserOrganizations(userId, inheritUserGroups);
197     }
198 
199     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
200         long userId, int start, int end)
201         throws com.liferay.portal.PortalException,
202             com.liferay.portal.SystemException {
203         return getService().getUserOrganizations(userId, start, end);
204     }
205 
206     public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
207         long userId, boolean inheritUserGroups, int start, int end)
208         throws com.liferay.portal.PortalException,
209             com.liferay.portal.SystemException {
210         return getService()
211                    .getUserOrganizations(userId, inheritUserGroups, start, end);
212     }
213 
214     public static int getUserOrganizationsCount(long userId)
215         throws com.liferay.portal.SystemException {
216         return getService().getUserOrganizationsCount(userId);
217     }
218 
219     public static boolean hasGroupOrganization(long groupId, long organizationId)
220         throws com.liferay.portal.SystemException {
221         return getService().hasGroupOrganization(groupId, organizationId);
222     }
223 
224     public static boolean hasUserOrganization(long userId, long organizationId)
225         throws com.liferay.portal.SystemException {
226         return getService().hasUserOrganization(userId, organizationId);
227     }
228 
229     public static boolean hasUserOrganization(long userId, long organizationId,
230         boolean inheritUserGroups)
231         throws com.liferay.portal.PortalException,
232             com.liferay.portal.SystemException {
233         return getService()
234                    .hasUserOrganization(userId, organizationId,
235             inheritUserGroups);
236     }
237 
238     public static boolean hasPasswordPolicyOrganization(long passwordPolicyId,
239         long organizationId) throws com.liferay.portal.SystemException {
240         return getService()
241                    .hasPasswordPolicyOrganization(passwordPolicyId,
242             organizationId);
243     }
244 
245     public static void rebuildTree(long companyId, boolean force)
246         throws com.liferay.portal.SystemException {
247         getService().rebuildTree(companyId, force);
248     }
249 
250     public static java.util.List<com.liferay.portal.model.Organization> search(
251         long companyId, long parentOrganizationId, java.lang.String keywords,
252         int type, java.lang.Long regionId, java.lang.Long countryId,
253         java.util.LinkedHashMap<String, Object> params, int start, int end)
254         throws com.liferay.portal.SystemException {
255         return getService()
256                    .search(companyId, parentOrganizationId, keywords, type,
257             regionId, countryId, params, start, end);
258     }
259 
260     public static java.util.List<com.liferay.portal.model.Organization> search(
261         long companyId, long parentOrganizationId, java.lang.String keywords,
262         int type, java.lang.Long regionId, java.lang.Long countryId,
263         java.util.LinkedHashMap<String, Object> params, int start, int end,
264         com.liferay.portal.kernel.util.OrderByComparator obc)
265         throws com.liferay.portal.SystemException {
266         return getService()
267                    .search(companyId, parentOrganizationId, keywords, type,
268             regionId, countryId, params, start, end, obc);
269     }
270 
271     public static java.util.List<com.liferay.portal.model.Organization> search(
272         long companyId, long parentOrganizationId, java.lang.String name,
273         int type, java.lang.String street, java.lang.String city,
274         java.lang.String zip, java.lang.Long regionId,
275         java.lang.Long countryId,
276         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
277         int start, int end) throws com.liferay.portal.SystemException {
278         return getService()
279                    .search(companyId, parentOrganizationId, name, type, street,
280             city, zip, regionId, countryId, params, andOperator, start, end);
281     }
282 
283     public static java.util.List<com.liferay.portal.model.Organization> search(
284         long companyId, long parentOrganizationId, java.lang.String name,
285         int type, java.lang.String street, java.lang.String city,
286         java.lang.String zip, java.lang.Long regionId,
287         java.lang.Long countryId,
288         java.util.LinkedHashMap<String, Object> params, boolean andOperator,
289         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
290         throws com.liferay.portal.SystemException {
291         return getService()
292                    .search(companyId, parentOrganizationId, name, type, street,
293             city, zip, regionId, countryId, params, andOperator, start, end, obc);
294     }
295 
296     public static int searchCount(long companyId, long parentOrganizationId,
297         java.lang.String keywords, int type, java.lang.Long regionId,
298         java.lang.Long countryId, java.util.LinkedHashMap<String, Object> params)
299         throws com.liferay.portal.SystemException {
300         return getService()
301                    .searchCount(companyId, parentOrganizationId, keywords,
302             type, regionId, countryId, params);
303     }
304 
305     public static int searchCount(long companyId, long parentOrganizationId,
306         java.lang.String name, int type, java.lang.String street,
307         java.lang.String city, java.lang.String zip, java.lang.Long regionId,
308         java.lang.Long countryId,
309         java.util.LinkedHashMap<String, Object> params, boolean andOperator)
310         throws com.liferay.portal.SystemException {
311         return getService()
312                    .searchCount(companyId, parentOrganizationId, name, type,
313             street, city, zip, regionId, countryId, params, andOperator);
314     }
315 
316     public static void setGroupOrganizations(long groupId,
317         long[] organizationIds) throws com.liferay.portal.SystemException {
318         getService().setGroupOrganizations(groupId, organizationIds);
319     }
320 
321     public static void unsetGroupOrganizations(long groupId,
322         long[] organizationIds) throws com.liferay.portal.SystemException {
323         getService().unsetGroupOrganizations(groupId, organizationIds);
324     }
325 
326     public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
327         long[] organizationIds) throws com.liferay.portal.SystemException {
328         getService()
329             .unsetPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
330     }
331 
332     public static com.liferay.portal.model.Organization updateOrganization(
333         long companyId, long organizationId, long parentOrganizationId,
334         java.lang.String name, int type, boolean recursable, long regionId,
335         long countryId, int statusId, java.lang.String comments)
336         throws com.liferay.portal.PortalException,
337             com.liferay.portal.SystemException {
338         return getService()
339                    .updateOrganization(companyId, organizationId,
340             parentOrganizationId, name, type, recursable, regionId, countryId,
341             statusId, comments);
342     }
343 
344     public static OrganizationLocalService getService() {
345         if (_service == null) {
346             throw new RuntimeException("OrganizationLocalService is not set");
347         }
348 
349         return _service;
350     }
351 
352     public void setService(OrganizationLocalService service) {
353         _service = service;
354     }
355 
356     private static OrganizationLocalService _service;
357 }