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.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.PortalException,
54              com.liferay.portal.SystemException {
55          getService().deleteUserGroupRole(userGroupRolePK);
56      }
57  
58      public static void deleteUserGroupRole(
59          com.liferay.portal.model.UserGroupRole userGroupRole)
60          throws com.liferay.portal.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.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.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.PortalException,
79              com.liferay.portal.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) throws com.liferay.portal.SystemException {
85          return getService().getUserGroupRoles(start, end);
86      }
87  
88      public static int getUserGroupRolesCount()
89          throws com.liferay.portal.SystemException {
90          return getService().getUserGroupRolesCount();
91      }
92  
93      public static com.liferay.portal.model.UserGroupRole updateUserGroupRole(
94          com.liferay.portal.model.UserGroupRole userGroupRole)
95          throws com.liferay.portal.SystemException {
96          return getService().updateUserGroupRole(userGroupRole);
97      }
98  
99      public static com.liferay.portal.model.UserGroupRole updateUserGroupRole(
100         com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
101         throws com.liferay.portal.SystemException {
102         return getService().updateUserGroupRole(userGroupRole, merge);
103     }
104 
105     public static void addUserGroupRoles(long userId, long groupId,
106         long[] roleIds)
107         throws com.liferay.portal.PortalException,
108             com.liferay.portal.SystemException {
109         getService().addUserGroupRoles(userId, groupId, roleIds);
110     }
111 
112     public static void addUserGroupRoles(long[] userIds, long groupId,
113         long roleId)
114         throws com.liferay.portal.PortalException,
115             com.liferay.portal.SystemException {
116         getService().addUserGroupRoles(userIds, groupId, roleId);
117     }
118 
119     public static void deleteUserGroupRoles(long userId, long groupId,
120         long[] roleIds) throws com.liferay.portal.SystemException {
121         getService().deleteUserGroupRoles(userId, groupId, roleIds);
122     }
123 
124     public static void deleteUserGroupRoles(long userId, long[] groupIds)
125         throws com.liferay.portal.SystemException {
126         getService().deleteUserGroupRoles(userId, groupIds);
127     }
128 
129     public static void deleteUserGroupRoles(long[] userIds, long groupId)
130         throws com.liferay.portal.SystemException {
131         getService().deleteUserGroupRoles(userIds, groupId);
132     }
133 
134     public static void deleteUserGroupRoles(long[] userIds, long groupId,
135         long roleId) throws com.liferay.portal.SystemException {
136         getService().deleteUserGroupRoles(userIds, groupId, roleId);
137     }
138 
139     public static void deleteUserGroupRolesByGroupId(long groupId)
140         throws com.liferay.portal.SystemException {
141         getService().deleteUserGroupRolesByGroupId(groupId);
142     }
143 
144     public static void deleteUserGroupRolesByRoleId(long roleId)
145         throws com.liferay.portal.SystemException {
146         getService().deleteUserGroupRolesByRoleId(roleId);
147     }
148 
149     public static void deleteUserGroupRolesByUserId(long userId)
150         throws com.liferay.portal.SystemException {
151         getService().deleteUserGroupRolesByUserId(userId);
152     }
153 
154     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles(
155         long userId, long groupId) throws com.liferay.portal.SystemException {
156         return getService().getUserGroupRoles(userId, groupId);
157     }
158 
159     public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRolesByGroupAndRole(
160         long groupId, long roleId) throws com.liferay.portal.SystemException {
161         return getService().getUserGroupRolesByGroupAndRole(groupId, roleId);
162     }
163 
164     public static boolean hasUserGroupRole(long userId, long groupId,
165         long roleId) throws com.liferay.portal.SystemException {
166         return getService().hasUserGroupRole(userId, groupId, roleId);
167     }
168 
169     public static boolean hasUserGroupRole(long userId, long groupId,
170         java.lang.String roleName)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException {
173         return getService().hasUserGroupRole(userId, groupId, roleName);
174     }
175 
176     public static UserGroupRoleLocalService getService() {
177         if (_service == null) {
178             _service = (UserGroupRoleLocalService)PortalBeanLocatorUtil.locate(UserGroupRoleLocalService.class.getName());
179         }
180 
181         return _service;
182     }
183 
184     public void setService(UserGroupRoleLocalService service) {
185         _service = service;
186     }
187 
188     private static UserGroupRoleLocalService _service;
189 }