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 com.liferay.portal.model.UserGroup getUserGroup(
76          long userGroupId)
77          throws com.liferay.portal.kernel.exception.PortalException,
78              com.liferay.portal.kernel.exception.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)
84          throws com.liferay.portal.kernel.exception.SystemException {
85          return getService().getUserGroups(start, end);
86      }
87  
88      public static int getUserGroupsCount()
89          throws com.liferay.portal.kernel.exception.SystemException {
90          return getService().getUserGroupsCount();
91      }
92  
93      public static com.liferay.portal.model.UserGroup updateUserGroup(
94          com.liferay.portal.model.UserGroup userGroup)
95          throws com.liferay.portal.kernel.exception.SystemException {
96          return getService().updateUserGroup(userGroup);
97      }
98  
99      public static com.liferay.portal.model.UserGroup updateUserGroup(
100         com.liferay.portal.model.UserGroup userGroup, boolean merge)
101         throws com.liferay.portal.kernel.exception.SystemException {
102         return getService().updateUserGroup(userGroup, merge);
103     }
104 
105     public static void addGroupUserGroups(long groupId, long[] userGroupIds)
106         throws com.liferay.portal.kernel.exception.SystemException {
107         getService().addGroupUserGroups(groupId, userGroupIds);
108     }
109 
110     public static com.liferay.portal.model.UserGroup addUserGroup(long userId,
111         long companyId, java.lang.String name, java.lang.String description)
112         throws com.liferay.portal.kernel.exception.PortalException,
113             com.liferay.portal.kernel.exception.SystemException {
114         return getService().addUserGroup(userId, companyId, name, description);
115     }
116 
117     public static void clearUserUserGroups(long userId)
118         throws com.liferay.portal.kernel.exception.SystemException {
119         getService().clearUserUserGroups(userId);
120     }
121 
122     public static void copyUserGroupLayouts(long userGroupId, long[] userIds)
123         throws com.liferay.portal.kernel.exception.PortalException,
124             com.liferay.portal.kernel.exception.SystemException {
125         getService().copyUserGroupLayouts(userGroupId, userIds);
126     }
127 
128     public static void copyUserGroupLayouts(long[] userGroupIds, long userId)
129         throws com.liferay.portal.kernel.exception.PortalException,
130             com.liferay.portal.kernel.exception.SystemException {
131         getService().copyUserGroupLayouts(userGroupIds, userId);
132     }
133 
134     public static void copyUserGroupLayouts(long userGroupId, long userId)
135         throws com.liferay.portal.kernel.exception.PortalException,
136             com.liferay.portal.kernel.exception.SystemException {
137         getService().copyUserGroupLayouts(userGroupId, userId);
138     }
139 
140     public static com.liferay.portal.model.UserGroup getUserGroup(
141         long companyId, java.lang.String name)
142         throws com.liferay.portal.kernel.exception.PortalException,
143             com.liferay.portal.kernel.exception.SystemException {
144         return getService().getUserGroup(companyId, name);
145     }
146 
147     public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
148         long companyId)
149         throws com.liferay.portal.kernel.exception.SystemException {
150         return getService().getUserGroups(companyId);
151     }
152 
153     public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups(
154         long[] userGroupIds)
155         throws com.liferay.portal.kernel.exception.PortalException,
156             com.liferay.portal.kernel.exception.SystemException {
157         return getService().getUserGroups(userGroupIds);
158     }
159 
160     public static java.util.List<com.liferay.portal.model.UserGroup> getUserUserGroups(
161         long userId) throws com.liferay.portal.kernel.exception.SystemException {
162         return getService().getUserUserGroups(userId);
163     }
164 
165     public static boolean hasGroupUserGroup(long groupId, long userGroupId)
166         throws com.liferay.portal.kernel.exception.SystemException {
167         return getService().hasGroupUserGroup(groupId, userGroupId);
168     }
169 
170     public static java.util.List<com.liferay.portal.model.UserGroup> search(
171         long companyId, java.lang.String name, java.lang.String description,
172         java.util.LinkedHashMap<String, Object> params, int start, int end,
173         com.liferay.portal.kernel.util.OrderByComparator obc)
174         throws com.liferay.portal.kernel.exception.SystemException {
175         return getService()
176                    .search(companyId, name, description, params, start, end, obc);
177     }
178 
179     public static int searchCount(long companyId, java.lang.String name,
180         java.lang.String description,
181         java.util.LinkedHashMap<String, Object> params)
182         throws com.liferay.portal.kernel.exception.SystemException {
183         return getService().searchCount(companyId, name, description, params);
184     }
185 
186     public static void setUserUserGroups(long userId, long[] userGroupIds)
187         throws com.liferay.portal.kernel.exception.PortalException,
188             com.liferay.portal.kernel.exception.SystemException {
189         getService().setUserUserGroups(userId, userGroupIds);
190     }
191 
192     public static void unsetGroupUserGroups(long groupId, long[] userGroupIds)
193         throws com.liferay.portal.kernel.exception.SystemException {
194         getService().unsetGroupUserGroups(groupId, userGroupIds);
195     }
196 
197     public static com.liferay.portal.model.UserGroup updateUserGroup(
198         long companyId, long userGroupId, java.lang.String name,
199         java.lang.String description)
200         throws com.liferay.portal.kernel.exception.PortalException,
201             com.liferay.portal.kernel.exception.SystemException {
202         return getService()
203                    .updateUserGroup(companyId, userGroupId, name, description);
204     }
205 
206     public static UserGroupLocalService getService() {
207         if (_service == null) {
208             _service = (UserGroupLocalService)PortalBeanLocatorUtil.locate(UserGroupLocalService.class.getName());
209         }
210 
211         return _service;
212     }
213 
214     public void setService(UserGroupLocalService service) {
215         _service = service;
216     }
217 
218     private static UserGroupLocalService _service;
219 }