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="UserGroupRoleLocalServiceUtil.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 UserGroupRoleLocalService} 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       UserGroupRoleLocalService
37   * @generated
38   */
39  public class UserGroupRoleLocalServiceUtil {
40      public static com.liferay.portal.model.UserGroupRole addUserGroupRole(
41          com.liferay.portal.model.UserGroupRole userGroupRole)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addUserGroupRole(userGroupRole);
44      }
45  
46      public static com.liferay.portal.model.UserGroupRole createUserGroupRole(
47          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) {
48          return getService().createUserGroupRole(userGroupRolePK);
49      }
50  
51      public static void deleteUserGroupRole(
52          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
53          throws com.liferay.portal.kernel.exception.PortalException,
54              com.liferay.portal.kernel.exception.SystemException {
55          getService().deleteUserGroupRole(userGroupRolePK);
56      }
57  
58      public static void deleteUserGroupRole(
59          com.liferay.portal.model.UserGroupRole userGroupRole)
60          throws com.liferay.portal.kernel.exception.SystemException {
61          getService().deleteUserGroupRole(userGroupRole);
62      }
63  
64      @SuppressWarnings("unchecked")
65      public static java.util.List dynamicQuery(
66          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
67          throws com.liferay.portal.kernel.exception.SystemException {
68          return getService().dynamicQuery(dynamicQuery);
69      }
70  
71      @SuppressWarnings("unchecked")
72      public static java.util.List dynamicQuery(
73          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
74          int end) throws com.liferay.portal.kernel.exception.SystemException {
75          return getService().dynamicQuery(dynamicQuery, start, end);
76      }
77  
78      @SuppressWarnings("unchecked")
79      public static java.util.List dynamicQuery(
80          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
81          int end,
82          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
83          throws com.liferay.portal.kernel.exception.SystemException {
84          return getService()
85                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
86      }
87  
88      public static long dynamicQueryCount(
89          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
90          throws com.liferay.portal.kernel.exception.SystemException {
91          return getService().dynamicQueryCount(dynamicQuery);
92      }
93  
94      public static com.liferay.portal.model.UserGroupRole getUserGroupRole(
95          com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
96          throws com.liferay.portal.kernel.exception.PortalException,
97              com.liferay.portal.kernel.exception.SystemException {
98          return getService().getUserGroupRole(userGroupRolePK);
99      }
100 
101     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles(
102         int start, int end)
103         throws com.liferay.portal.kernel.exception.SystemException {
104         return getService().getUserGroupRoles(start, end);
105     }
106 
107     public static int getUserGroupRolesCount()
108         throws com.liferay.portal.kernel.exception.SystemException {
109         return getService().getUserGroupRolesCount();
110     }
111 
112     public static com.liferay.portal.model.UserGroupRole updateUserGroupRole(
113         com.liferay.portal.model.UserGroupRole userGroupRole)
114         throws com.liferay.portal.kernel.exception.SystemException {
115         return getService().updateUserGroupRole(userGroupRole);
116     }
117 
118     public static com.liferay.portal.model.UserGroupRole updateUserGroupRole(
119         com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
120         throws com.liferay.portal.kernel.exception.SystemException {
121         return getService().updateUserGroupRole(userGroupRole, merge);
122     }
123 
124     public static void addUserGroupRoles(long userId, long groupId,
125         long[] roleIds)
126         throws com.liferay.portal.kernel.exception.PortalException,
127             com.liferay.portal.kernel.exception.SystemException {
128         getService().addUserGroupRoles(userId, groupId, roleIds);
129     }
130 
131     public static void addUserGroupRoles(long[] userIds, long groupId,
132         long roleId)
133         throws com.liferay.portal.kernel.exception.PortalException,
134             com.liferay.portal.kernel.exception.SystemException {
135         getService().addUserGroupRoles(userIds, groupId, roleId);
136     }
137 
138     public static void deleteUserGroupRoles(long userId, long groupId,
139         long[] roleIds)
140         throws com.liferay.portal.kernel.exception.SystemException {
141         getService().deleteUserGroupRoles(userId, groupId, roleIds);
142     }
143 
144     public static void deleteUserGroupRoles(long userId, long[] groupIds)
145         throws com.liferay.portal.kernel.exception.SystemException {
146         getService().deleteUserGroupRoles(userId, groupIds);
147     }
148 
149     public static void deleteUserGroupRoles(long[] userIds, long groupId)
150         throws com.liferay.portal.kernel.exception.SystemException {
151         getService().deleteUserGroupRoles(userIds, groupId);
152     }
153 
154     public static void deleteUserGroupRoles(long[] userIds, long groupId,
155         long roleId) throws com.liferay.portal.kernel.exception.SystemException {
156         getService().deleteUserGroupRoles(userIds, groupId, roleId);
157     }
158 
159     public static void deleteUserGroupRolesByGroupId(long groupId)
160         throws com.liferay.portal.kernel.exception.SystemException {
161         getService().deleteUserGroupRolesByGroupId(groupId);
162     }
163 
164     public static void deleteUserGroupRolesByRoleId(long roleId)
165         throws com.liferay.portal.kernel.exception.SystemException {
166         getService().deleteUserGroupRolesByRoleId(roleId);
167     }
168 
169     public static void deleteUserGroupRolesByUserId(long userId)
170         throws com.liferay.portal.kernel.exception.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.kernel.exception.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)
181         throws com.liferay.portal.kernel.exception.SystemException {
182         return getService().getUserGroupRoles(userId, groupId);
183     }
184 
185     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRolesByGroupAndRole(
186         long groupId, long roleId)
187         throws com.liferay.portal.kernel.exception.SystemException {
188         return getService().getUserGroupRolesByGroupAndRole(groupId, roleId);
189     }
190 
191     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRolesByUserUserGroupAndGroup(
192         long userId, long groupId)
193         throws com.liferay.portal.kernel.exception.SystemException {
194         return getService()
195                    .getUserGroupRolesByUserUserGroupAndGroup(userId, groupId);
196     }
197 
198     public static boolean hasUserGroupRole(long userId, long groupId,
199         long roleId) throws com.liferay.portal.kernel.exception.SystemException {
200         return getService().hasUserGroupRole(userId, groupId, roleId);
201     }
202 
203     public static boolean hasUserGroupRole(long userId, long groupId,
204         long roleId, boolean inherit)
205         throws com.liferay.portal.kernel.exception.SystemException {
206         return getService().hasUserGroupRole(userId, groupId, roleId, inherit);
207     }
208 
209     public static boolean hasUserGroupRole(long userId, long groupId,
210         java.lang.String roleName)
211         throws com.liferay.portal.kernel.exception.PortalException,
212             com.liferay.portal.kernel.exception.SystemException {
213         return getService().hasUserGroupRole(userId, groupId, roleName);
214     }
215 
216     public static boolean hasUserGroupRole(long userId, long groupId,
217         java.lang.String roleName, boolean inherit)
218         throws com.liferay.portal.kernel.exception.PortalException,
219             com.liferay.portal.kernel.exception.SystemException {
220         return getService().hasUserGroupRole(userId, groupId, roleName, inherit);
221     }
222 
223     public static UserGroupRoleLocalService getService() {
224         if (_service == null) {
225             _service = (UserGroupRoleLocalService)PortalBeanLocatorUtil.locate(UserGroupRoleLocalService.class.getName());
226         }
227 
228         return _service;
229     }
230 
231     public void setService(UserGroupRoleLocalService service) {
232         _service = service;
233     }
234 
235     private static UserGroupRoleLocalService _service;
236 }