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