1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   * 
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.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.PortalException,
53              com.liferay.portal.SystemException {
54          getService().deleteUserGroup(userGroupId);
55      }
56  
57      public static void deleteUserGroup(
58          com.liferay.portal.model.UserGroup userGroup)
59          throws com.liferay.portal.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.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.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static com.liferay.portal.model.UserGroup getUserGroup(
76          long userGroupId)
77          throws com.liferay.portal.PortalException,
78              com.liferay.portal.SystemException {
79          return getService().getUserGroup(userGroupId);
80      }
81  
82      public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
83          int start, int end) throws com.liferay.portal.SystemException {
84          return getService().getUserGroups(start, end);
85      }
86  
87      public static int getUserGroupsCount()
88          throws com.liferay.portal.SystemException {
89          return getService().getUserGroupsCount();
90      }
91  
92      public static com.liferay.portal.model.UserGroup updateUserGroup(
93          com.liferay.portal.model.UserGroup userGroup)
94          throws com.liferay.portal.SystemException {
95          return getService().updateUserGroup(userGroup);
96      }
97  
98      public static com.liferay.portal.model.UserGroup updateUserGroup(
99          com.liferay.portal.model.UserGroup userGroup, boolean merge)
100         throws com.liferay.portal.SystemException {
101         return getService().updateUserGroup(userGroup, merge);
102     }
103 
104     public static void addGroupUserGroups(long groupId, long[] userGroupIds)
105         throws com.liferay.portal.SystemException {
106         getService().addGroupUserGroups(groupId, userGroupIds);
107     }
108 
109     public static com.liferay.portal.model.UserGroup addUserGroup(long userId,
110         long companyId, java.lang.String name, java.lang.String description)
111         throws com.liferay.portal.PortalException,
112             com.liferay.portal.SystemException {
113         return getService().addUserGroup(userId, companyId, name, description);
114     }
115 
116     public static void clearUserUserGroups(long userId)
117         throws com.liferay.portal.SystemException {
118         getService().clearUserUserGroups(userId);
119     }
120 
121     public static void copyUserGroupLayouts(long userGroupId, long[] userIds)
122         throws com.liferay.portal.PortalException,
123             com.liferay.portal.SystemException {
124         getService().copyUserGroupLayouts(userGroupId, userIds);
125     }
126 
127     public static void copyUserGroupLayouts(long[] userGroupIds, long userId)
128         throws com.liferay.portal.PortalException,
129             com.liferay.portal.SystemException {
130         getService().copyUserGroupLayouts(userGroupIds, userId);
131     }
132 
133     public static void copyUserGroupLayouts(long userGroupId, long userId)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException {
136         getService().copyUserGroupLayouts(userGroupId, userId);
137     }
138 
139     public static com.liferay.portal.model.UserGroup getUserGroup(
140         long companyId, java.lang.String name)
141         throws com.liferay.portal.PortalException,
142             com.liferay.portal.SystemException {
143         return getService().getUserGroup(companyId, name);
144     }
145 
146     public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
147         long companyId) throws com.liferay.portal.SystemException {
148         return getService().getUserGroups(companyId);
149     }
150 
151     public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
152         long userId) throws com.liferay.portal.SystemException {
153         return getService().getUserUserGroups(userId);
154     }
155 
156     public static boolean hasGroupUserGroup(long groupId, long userGroupId)
157         throws com.liferay.portal.SystemException {
158         return getService().hasGroupUserGroup(groupId, userGroupId);
159     }
160 
161     public static java.util.List<com.liferay.portal.model.UserGroup> search(
162         long companyId, java.lang.String name, java.lang.String description,
163         java.util.LinkedHashMap<String, Object> params, int start, int end,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException {
166         return getService()
167                    .search(companyId, name, description, params, start, end, obc);
168     }
169 
170     public static int searchCount(long companyId, java.lang.String name,
171         java.lang.String description,
172         java.util.LinkedHashMap<String, Object> params)
173         throws com.liferay.portal.SystemException {
174         return getService().searchCount(companyId, name, description, params);
175     }
176 
177     public static void setUserUserGroups(long userId, long[] userGroupIds)
178         throws com.liferay.portal.PortalException,
179             com.liferay.portal.SystemException {
180         getService().setUserUserGroups(userId, userGroupIds);
181     }
182 
183     public static void unsetGroupUserGroups(long groupId, long[] userGroupIds)
184         throws com.liferay.portal.SystemException {
185         getService().unsetGroupUserGroups(groupId, userGroupIds);
186     }
187 
188     public static com.liferay.portal.model.UserGroup updateUserGroup(
189         long companyId, long userGroupId, java.lang.String name,
190         java.lang.String description)
191         throws com.liferay.portal.PortalException,
192             com.liferay.portal.SystemException {
193         return getService()
194                    .updateUserGroup(companyId, userGroupId, name, description);
195     }
196 
197     public static UserGroupLocalService getService() {
198         if (_service == null) {
199             _service = (UserGroupLocalService)PortalBeanLocatorUtil.locate(UserGroupLocalService.class.getName());
200         }
201 
202         return _service;
203     }
204 
205     public void setService(UserGroupLocalService service) {
206         _service = service;
207     }
208 
209     private static UserGroupLocalService _service;
210 }