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  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="UserGroupRoleLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link UserGroupRoleLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       UserGroupRoleLocalService
39   * @generated
40   */
41  public class UserGroupRoleLocalServiceUtil {
42      public static com.liferay.portal.model.UserGroupRole addUserGroupRole(
43          com.liferay.portal.model.UserGroupRole userGroupRole)
44          throws com.liferay.portal.SystemException {
45          return getService().addUserGroupRole(userGroupRole);
46      }
47  
48      public static com.liferay.portal.model.UserGroupRole createUserGroupRole(
49          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) {
50          return getService().createUserGroupRole(userGroupRolePK);
51      }
52  
53      public static void deleteUserGroupRole(
54          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
55          throws com.liferay.portal.PortalException,
56              com.liferay.portal.SystemException {
57          getService().deleteUserGroupRole(userGroupRolePK);
58      }
59  
60      public static void deleteUserGroupRole(
61          com.liferay.portal.model.UserGroupRole userGroupRole)
62          throws com.liferay.portal.SystemException {
63          getService().deleteUserGroupRole(userGroupRole);
64      }
65  
66      @SuppressWarnings("rawtypes")
67      public static java.util.List dynamicQuery(
68          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
69          throws com.liferay.portal.SystemException {
70          return getService().dynamicQuery(dynamicQuery);
71      }
72  
73      @SuppressWarnings("rawtypes")
74      public static java.util.List dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException {
77          return getService().dynamicQuery(dynamicQuery, start, end);
78      }
79  
80      @SuppressWarnings("rawtypes")
81      public static java.util.List dynamicQuery(
82          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
83          int end,
84          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
85          throws com.liferay.portal.SystemException {
86          return getService()
87                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
88      }
89  
90      public static int dynamicQueryCount(
91          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
92          throws com.liferay.portal.SystemException {
93          return getService().dynamicQueryCount(dynamicQuery);
94      }
95  
96      public static com.liferay.portal.model.UserGroupRole getUserGroupRole(
97          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException {
100         return getService().getUserGroupRole(userGroupRolePK);
101     }
102 
103     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles(
104         int start, int end) throws com.liferay.portal.SystemException {
105         return getService().getUserGroupRoles(start, end);
106     }
107 
108     public static int getUserGroupRolesCount()
109         throws com.liferay.portal.SystemException {
110         return getService().getUserGroupRolesCount();
111     }
112 
113     public static com.liferay.portal.model.UserGroupRole updateUserGroupRole(
114         com.liferay.portal.model.UserGroupRole userGroupRole)
115         throws com.liferay.portal.SystemException {
116         return getService().updateUserGroupRole(userGroupRole);
117     }
118 
119     public static com.liferay.portal.model.UserGroupRole updateUserGroupRole(
120         com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
121         throws com.liferay.portal.SystemException {
122         return getService().updateUserGroupRole(userGroupRole, merge);
123     }
124 
125     public static void addUserGroupRoles(long userId, long groupId,
126         long[] roleIds)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException {
129         getService().addUserGroupRoles(userId, groupId, roleIds);
130     }
131 
132     public static void addUserGroupRoles(long[] userIds, long groupId,
133         long roleId)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException {
136         getService().addUserGroupRoles(userIds, groupId, roleId);
137     }
138 
139     public static void deleteUserGroupRoles(long userId, long groupId,
140         long[] roleIds) throws com.liferay.portal.SystemException {
141         getService().deleteUserGroupRoles(userId, groupId, roleIds);
142     }
143 
144     public static void deleteUserGroupRoles(long userId, long[] groupIds)
145         throws com.liferay.portal.SystemException {
146         getService().deleteUserGroupRoles(userId, groupIds);
147     }
148 
149     public static void deleteUserGroupRoles(long[] userIds, long groupId)
150         throws com.liferay.portal.SystemException {
151         getService().deleteUserGroupRoles(userIds, groupId);
152     }
153 
154     public static void deleteUserGroupRoles(long[] userIds, long groupId,
155         long roleId) throws com.liferay.portal.SystemException {
156         getService().deleteUserGroupRoles(userIds, groupId, roleId);
157     }
158 
159     public static void deleteUserGroupRolesByGroupId(long groupId)
160         throws com.liferay.portal.SystemException {
161         getService().deleteUserGroupRolesByGroupId(groupId);
162     }
163 
164     public static void deleteUserGroupRolesByRoleId(long roleId)
165         throws com.liferay.portal.SystemException {
166         getService().deleteUserGroupRolesByRoleId(roleId);
167     }
168 
169     public static void deleteUserGroupRolesByUserId(long userId)
170         throws com.liferay.portal.SystemException {
171         getService().deleteUserGroupRolesByUserId(userId);
172     }
173 
174     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles(
175         long userId) throws com.liferay.portal.SystemException {
176         return getService().getUserGroupRoles(userId);
177     }
178 
179     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles(
180         long userId, long groupId) throws com.liferay.portal.SystemException {
181         return getService().getUserGroupRoles(userId, groupId);
182     }
183 
184     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRolesByGroupAndRole(
185         long groupId, long roleId) throws com.liferay.portal.SystemException {
186         return getService().getUserGroupRolesByGroupAndRole(groupId, roleId);
187     }
188 
189     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRolesByUserUserGroupAndGroup(
190         long userId, long groupId) throws com.liferay.portal.SystemException {
191         return getService()
192                    .getUserGroupRolesByUserUserGroupAndGroup(userId, groupId);
193     }
194 
195     public static boolean hasUserGroupRole(long userId, long groupId,
196         long roleId) throws com.liferay.portal.SystemException {
197         return getService().hasUserGroupRole(userId, groupId, roleId);
198     }
199 
200     public static boolean hasUserGroupRole(long userId, long groupId,
201         long roleId, boolean inherit) throws com.liferay.portal.SystemException {
202         return getService().hasUserGroupRole(userId, groupId, roleId, inherit);
203     }
204 
205     public static boolean hasUserGroupRole(long userId, long groupId,
206         java.lang.String roleName)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException {
209         return getService().hasUserGroupRole(userId, groupId, roleName);
210     }
211 
212     public static boolean hasUserGroupRole(long userId, long groupId,
213         java.lang.String roleName, boolean inherit)
214         throws com.liferay.portal.PortalException,
215             com.liferay.portal.SystemException {
216         return getService().hasUserGroupRole(userId, groupId, roleName, inherit);
217     }
218 
219     public static UserGroupRoleLocalService getService() {
220         if (_service == null) {
221             _service = (UserGroupRoleLocalService)PortalBeanLocatorUtil.locate(UserGroupRoleLocalService.class.getName());
222 
223             ReferenceRegistry.registerReference(UserGroupRoleLocalServiceUtil.class,
224                 "_service");
225             MethodCache.remove(UserGroupRoleLocalService.class);
226         }
227 
228         return _service;
229     }
230 
231     public void setService(UserGroupRoleLocalService service) {
232         MethodCache.remove(UserGroupRoleLocalService.class);
233 
234         _service = service;
235 
236         ReferenceRegistry.registerReference(UserGroupRoleLocalServiceUtil.class,
237             "_service");
238         MethodCache.remove(UserGroupRoleLocalService.class);
239     }
240 
241     private static UserGroupRoleLocalService _service;
242 }