1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="UserGroupRoleLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides static methods for the
37   * {@link UserGroupRoleLocalService} bean. The static methods of
38   * this class calls the same methods of the bean instance. It's convenient to be
39   * able to just write one line to call a method on a bean instead of writing a
40   * lookup call and a method call.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       UserGroupRoleLocalService
45   * @generated
46   */
47  public class UserGroupRoleLocalServiceUtil {
48      public static com.liferay.portal.model.UserGroupRole addUserGroupRole(
49          com.liferay.portal.model.UserGroupRole userGroupRole)
50          throws com.liferay.portal.SystemException {
51          return getService().addUserGroupRole(userGroupRole);
52      }
53  
54      public static com.liferay.portal.model.UserGroupRole createUserGroupRole(
55          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) {
56          return getService().createUserGroupRole(userGroupRolePK);
57      }
58  
59      public static void deleteUserGroupRole(
60          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
61          throws com.liferay.portal.PortalException,
62              com.liferay.portal.SystemException {
63          getService().deleteUserGroupRole(userGroupRolePK);
64      }
65  
66      public static void deleteUserGroupRole(
67          com.liferay.portal.model.UserGroupRole userGroupRole)
68          throws com.liferay.portal.SystemException {
69          getService().deleteUserGroupRole(userGroupRole);
70      }
71  
72      public static java.util.List<Object> dynamicQuery(
73          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
74          throws com.liferay.portal.SystemException {
75          return getService().dynamicQuery(dynamicQuery);
76      }
77  
78      public static java.util.List<Object> dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80          int end) throws com.liferay.portal.SystemException {
81          return getService().dynamicQuery(dynamicQuery, start, end);
82      }
83  
84      public static com.liferay.portal.model.UserGroupRole getUserGroupRole(
85          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
86          throws com.liferay.portal.PortalException,
87              com.liferay.portal.SystemException {
88          return getService().getUserGroupRole(userGroupRolePK);
89      }
90  
91      public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles(
92          int start, int end) throws com.liferay.portal.SystemException {
93          return getService().getUserGroupRoles(start, end);
94      }
95  
96      public static int getUserGroupRolesCount()
97          throws com.liferay.portal.SystemException {
98          return getService().getUserGroupRolesCount();
99      }
100 
101     public static com.liferay.portal.model.UserGroupRole updateUserGroupRole(
102         com.liferay.portal.model.UserGroupRole userGroupRole)
103         throws com.liferay.portal.SystemException {
104         return getService().updateUserGroupRole(userGroupRole);
105     }
106 
107     public static com.liferay.portal.model.UserGroupRole updateUserGroupRole(
108         com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
109         throws com.liferay.portal.SystemException {
110         return getService().updateUserGroupRole(userGroupRole, merge);
111     }
112 
113     public static void addUserGroupRoles(long userId, long groupId,
114         long[] roleIds)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException {
117         getService().addUserGroupRoles(userId, groupId, roleIds);
118     }
119 
120     public static void addUserGroupRoles(long[] userIds, long groupId,
121         long roleId)
122         throws com.liferay.portal.PortalException,
123             com.liferay.portal.SystemException {
124         getService().addUserGroupRoles(userIds, groupId, roleId);
125     }
126 
127     public static void deleteUserGroupRoles(long userId, long groupId,
128         long[] roleIds) throws com.liferay.portal.SystemException {
129         getService().deleteUserGroupRoles(userId, groupId, roleIds);
130     }
131 
132     public static void deleteUserGroupRoles(long userId, long[] groupIds)
133         throws com.liferay.portal.SystemException {
134         getService().deleteUserGroupRoles(userId, groupIds);
135     }
136 
137     public static void deleteUserGroupRoles(long[] userIds, long groupId)
138         throws com.liferay.portal.SystemException {
139         getService().deleteUserGroupRoles(userIds, groupId);
140     }
141 
142     public static void deleteUserGroupRoles(long[] userIds, long groupId,
143         long roleId) throws com.liferay.portal.SystemException {
144         getService().deleteUserGroupRoles(userIds, groupId, roleId);
145     }
146 
147     public static void deleteUserGroupRolesByGroupId(long groupId)
148         throws com.liferay.portal.SystemException {
149         getService().deleteUserGroupRolesByGroupId(groupId);
150     }
151 
152     public static void deleteUserGroupRolesByRoleId(long roleId)
153         throws com.liferay.portal.SystemException {
154         getService().deleteUserGroupRolesByRoleId(roleId);
155     }
156 
157     public static void deleteUserGroupRolesByUserId(long userId)
158         throws com.liferay.portal.SystemException {
159         getService().deleteUserGroupRolesByUserId(userId);
160     }
161 
162     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles(
163         long userId) throws com.liferay.portal.SystemException {
164         return getService().getUserGroupRoles(userId);
165     }
166 
167     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles(
168         long userId, long groupId) throws com.liferay.portal.SystemException {
169         return getService().getUserGroupRoles(userId, groupId);
170     }
171 
172     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRolesByGroupAndRole(
173         long groupId, long roleId) throws com.liferay.portal.SystemException {
174         return getService().getUserGroupRolesByGroupAndRole(groupId, roleId);
175     }
176 
177     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRolesByUserUserGroupAndGroup(
178         long userId, long groupId) throws com.liferay.portal.SystemException {
179         return getService()
180                    .getUserGroupRolesByUserUserGroupAndGroup(userId, groupId);
181     }
182 
183     public static boolean hasUserGroupRole(long userId, long groupId,
184         long roleId) throws com.liferay.portal.SystemException {
185         return getService().hasUserGroupRole(userId, groupId, roleId);
186     }
187 
188     public static boolean hasUserGroupRole(long userId, long groupId,
189         long roleId, boolean inherit) throws com.liferay.portal.SystemException {
190         return getService().hasUserGroupRole(userId, groupId, roleId, inherit);
191     }
192 
193     public static boolean hasUserGroupRole(long userId, long groupId,
194         java.lang.String roleName)
195         throws com.liferay.portal.PortalException,
196             com.liferay.portal.SystemException {
197         return getService().hasUserGroupRole(userId, groupId, roleName);
198     }
199 
200     public static boolean hasUserGroupRole(long userId, long groupId,
201         java.lang.String roleName, boolean inherit)
202         throws com.liferay.portal.PortalException,
203             com.liferay.portal.SystemException {
204         return getService().hasUserGroupRole(userId, groupId, roleName, inherit);
205     }
206 
207     public static UserGroupRoleLocalService getService() {
208         if (_service == null) {
209             _service = (UserGroupRoleLocalService)PortalBeanLocatorUtil.locate(UserGroupRoleLocalService.class.getName());
210         }
211 
212         return _service;
213     }
214 
215     public void setService(UserGroupRoleLocalService service) {
216         _service = service;
217     }
218 
219     private static UserGroupRoleLocalService _service;
220 }