1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="UserGroupLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link UserGroupLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       UserGroupLocalService
37   * @generated
38   */
39  public class UserGroupLocalServiceUtil {
40      public static com.liferay.portal.model.UserGroup addUserGroup(
41          com.liferay.portal.model.UserGroup userGroup)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addUserGroup(userGroup);
44      }
45  
46      public static com.liferay.portal.model.UserGroup createUserGroup(
47          long userGroupId) {
48          return getService().createUserGroup(userGroupId);
49      }
50  
51      public static void deleteUserGroup(long userGroupId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteUserGroup(userGroupId);
55      }
56  
57      public static void deleteUserGroup(
58          com.liferay.portal.model.UserGroup userGroup)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteUserGroup(userGroup);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end,
78          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
79          throws com.liferay.portal.kernel.exception.SystemException {
80          return getService()
81                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
82      }
83  
84      public static int dynamicQueryCount(
85          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
86          throws com.liferay.portal.kernel.exception.SystemException {
87          return getService().dynamicQueryCount(dynamicQuery);
88      }
89  
90      public static com.liferay.portal.model.UserGroup getUserGroup(
91          long userGroupId)
92          throws com.liferay.portal.kernel.exception.PortalException,
93              com.liferay.portal.kernel.exception.SystemException {
94          return getService().getUserGroup(userGroupId);
95      }
96  
97      public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
98          int start, int end)
99          throws com.liferay.portal.kernel.exception.SystemException {
100         return getService().getUserGroups(start, end);
101     }
102 
103     public static int getUserGroupsCount()
104         throws com.liferay.portal.kernel.exception.SystemException {
105         return getService().getUserGroupsCount();
106     }
107 
108     public static com.liferay.portal.model.UserGroup updateUserGroup(
109         com.liferay.portal.model.UserGroup userGroup)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getService().updateUserGroup(userGroup);
112     }
113 
114     public static com.liferay.portal.model.UserGroup updateUserGroup(
115         com.liferay.portal.model.UserGroup userGroup, boolean merge)
116         throws com.liferay.portal.kernel.exception.SystemException {
117         return getService().updateUserGroup(userGroup, merge);
118     }
119 
120     public static void addGroupUserGroups(long groupId, long[] userGroupIds)
121         throws com.liferay.portal.kernel.exception.SystemException {
122         getService().addGroupUserGroups(groupId, userGroupIds);
123     }
124 
125     public static com.liferay.portal.model.UserGroup addUserGroup(long userId,
126         long companyId, java.lang.String name, java.lang.String description)
127         throws com.liferay.portal.kernel.exception.PortalException,
128             com.liferay.portal.kernel.exception.SystemException {
129         return getService().addUserGroup(userId, companyId, name, description);
130     }
131 
132     public static void clearUserUserGroups(long userId)
133         throws com.liferay.portal.kernel.exception.SystemException {
134         getService().clearUserUserGroups(userId);
135     }
136 
137     public static void copyUserGroupLayouts(long userGroupId, long[] userIds)
138         throws com.liferay.portal.kernel.exception.PortalException,
139             com.liferay.portal.kernel.exception.SystemException {
140         getService().copyUserGroupLayouts(userGroupId, userIds);
141     }
142 
143     public static void copyUserGroupLayouts(long[] userGroupIds, long userId)
144         throws com.liferay.portal.kernel.exception.PortalException,
145             com.liferay.portal.kernel.exception.SystemException {
146         getService().copyUserGroupLayouts(userGroupIds, userId);
147     }
148 
149     public static void copyUserGroupLayouts(long userGroupId, long userId)
150         throws com.liferay.portal.kernel.exception.PortalException,
151             com.liferay.portal.kernel.exception.SystemException {
152         getService().copyUserGroupLayouts(userGroupId, userId);
153     }
154 
155     public static com.liferay.portal.model.UserGroup getUserGroup(
156         long companyId, java.lang.String name)
157         throws com.liferay.portal.kernel.exception.PortalException,
158             com.liferay.portal.kernel.exception.SystemException {
159         return getService().getUserGroup(companyId, name);
160     }
161 
162     public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
163         long companyId)
164         throws com.liferay.portal.kernel.exception.SystemException {
165         return getService().getUserGroups(companyId);
166     }
167 
168     public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
169         long[] userGroupIds)
170         throws com.liferay.portal.kernel.exception.PortalException,
171             com.liferay.portal.kernel.exception.SystemException {
172         return getService().getUserGroups(userGroupIds);
173     }
174 
175     public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
176         long userId) throws com.liferay.portal.kernel.exception.SystemException {
177         return getService().getUserUserGroups(userId);
178     }
179 
180     public static boolean hasGroupUserGroup(long groupId, long userGroupId)
181         throws com.liferay.portal.kernel.exception.SystemException {
182         return getService().hasGroupUserGroup(groupId, userGroupId);
183     }
184 
185     public static java.util.List<com.liferay.portal.model.UserGroup> search(
186         long companyId, java.lang.String name, java.lang.String description,
187         java.util.LinkedHashMap<String, Object> params, int start, int end,
188         com.liferay.portal.kernel.util.OrderByComparator obc)
189         throws com.liferay.portal.kernel.exception.SystemException {
190         return getService()
191                    .search(companyId, name, description, params, start, end, obc);
192     }
193 
194     public static int searchCount(long companyId, java.lang.String name,
195         java.lang.String description,
196         java.util.LinkedHashMap<String, Object> params)
197         throws com.liferay.portal.kernel.exception.SystemException {
198         return getService().searchCount(companyId, name, description, params);
199     }
200 
201     public static void setUserUserGroups(long userId, long[] userGroupIds)
202         throws com.liferay.portal.kernel.exception.PortalException,
203             com.liferay.portal.kernel.exception.SystemException {
204         getService().setUserUserGroups(userId, userGroupIds);
205     }
206 
207     public static void unsetGroupUserGroups(long groupId, long[] userGroupIds)
208         throws com.liferay.portal.kernel.exception.SystemException {
209         getService().unsetGroupUserGroups(groupId, userGroupIds);
210     }
211 
212     public static com.liferay.portal.model.UserGroup updateUserGroup(
213         long companyId, long userGroupId, java.lang.String name,
214         java.lang.String description)
215         throws com.liferay.portal.kernel.exception.PortalException,
216             com.liferay.portal.kernel.exception.SystemException {
217         return getService()
218                    .updateUserGroup(companyId, userGroupId, name, description);
219     }
220 
221     public static UserGroupLocalService getService() {
222         if (_service == null) {
223             _service = (UserGroupLocalService)PortalBeanLocatorUtil.locate(UserGroupLocalService.class.getName());
224         }
225 
226         return _service;
227     }
228 
229     public void setService(UserGroupLocalService service) {
230         _service = service;
231     }
232 
233     private static UserGroupLocalService _service;
234 }