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