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