1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="UserGroupGroupRoleLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link UserGroupGroupRoleLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       UserGroupGroupRoleLocalService
39   * @generated
40   */
41  public class UserGroupGroupRoleLocalServiceUtil {
42      public static com.liferay.portal.model.UserGroupGroupRole addUserGroupGroupRole(
43          com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
44          throws com.liferay.portal.SystemException {
45          return getService().addUserGroupGroupRole(userGroupGroupRole);
46      }
47  
48      public static com.liferay.portal.model.UserGroupGroupRole createUserGroupGroupRole(
49          com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) {
50          return getService().createUserGroupGroupRole(userGroupGroupRolePK);
51      }
52  
53      public static void deleteUserGroupGroupRole(
54          com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
55          throws com.liferay.portal.PortalException,
56              com.liferay.portal.SystemException {
57          getService().deleteUserGroupGroupRole(userGroupGroupRolePK);
58      }
59  
60      public static void deleteUserGroupGroupRole(
61          com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
62          throws com.liferay.portal.SystemException {
63          getService().deleteUserGroupGroupRole(userGroupGroupRole);
64      }
65  
66      @SuppressWarnings("rawtypes")
67      public static java.util.List dynamicQuery(
68          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
69          throws com.liferay.portal.SystemException {
70          return getService().dynamicQuery(dynamicQuery);
71      }
72  
73      @SuppressWarnings("rawtypes")
74      public static java.util.List dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException {
77          return getService().dynamicQuery(dynamicQuery, start, end);
78      }
79  
80      @SuppressWarnings("rawtypes")
81      public static java.util.List dynamicQuery(
82          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
83          int end,
84          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
85          throws com.liferay.portal.SystemException {
86          return getService()
87                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
88      }
89  
90      public static int dynamicQueryCount(
91          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
92          throws com.liferay.portal.SystemException {
93          return getService().dynamicQueryCount(dynamicQuery);
94      }
95  
96      public static com.liferay.portal.model.UserGroupGroupRole getUserGroupGroupRole(
97          com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK)
98          throws com.liferay.portal.PortalException,
99              com.liferay.portal.SystemException {
100         return getService().getUserGroupGroupRole(userGroupGroupRolePK);
101     }
102 
103     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
104         int start, int end) throws com.liferay.portal.SystemException {
105         return getService().getUserGroupGroupRoles(start, end);
106     }
107 
108     public static int getUserGroupGroupRolesCount()
109         throws com.liferay.portal.SystemException {
110         return getService().getUserGroupGroupRolesCount();
111     }
112 
113     public static com.liferay.portal.model.UserGroupGroupRole updateUserGroupGroupRole(
114         com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole)
115         throws com.liferay.portal.SystemException {
116         return getService().updateUserGroupGroupRole(userGroupGroupRole);
117     }
118 
119     public static com.liferay.portal.model.UserGroupGroupRole updateUserGroupGroupRole(
120         com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole,
121         boolean merge) throws com.liferay.portal.SystemException {
122         return getService().updateUserGroupGroupRole(userGroupGroupRole, merge);
123     }
124 
125     public static void addUserGroupGroupRoles(long userGroupId, long groupId,
126         long[] roleIds)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException {
129         getService().addUserGroupGroupRoles(userGroupId, groupId, roleIds);
130     }
131 
132     public static void addUserGroupGroupRoles(long[] userGroupIds,
133         long groupId, long roleId)
134         throws com.liferay.portal.PortalException,
135             com.liferay.portal.SystemException {
136         getService().addUserGroupGroupRoles(userGroupIds, groupId, roleId);
137     }
138 
139     public static void deleteUserGroupGroupRoles(long userGroupId,
140         long groupId, long[] roleIds) throws com.liferay.portal.SystemException {
141         getService().deleteUserGroupGroupRoles(userGroupId, groupId, roleIds);
142     }
143 
144     public static void deleteUserGroupGroupRoles(long userGroupId,
145         long[] groupIds) throws com.liferay.portal.SystemException {
146         getService().deleteUserGroupGroupRoles(userGroupId, groupIds);
147     }
148 
149     public static void deleteUserGroupGroupRoles(long[] userGroupIds,
150         long groupId) throws com.liferay.portal.SystemException {
151         getService().deleteUserGroupGroupRoles(userGroupIds, groupId);
152     }
153 
154     public static void deleteUserGroupGroupRoles(long[] userGroupIds,
155         long groupId, long roleId) throws com.liferay.portal.SystemException {
156         getService().deleteUserGroupGroupRoles(userGroupIds, groupId, roleId);
157     }
158 
159     public static void deleteUserGroupGroupRolesByGroupId(long groupId)
160         throws com.liferay.portal.SystemException {
161         getService().deleteUserGroupGroupRolesByGroupId(groupId);
162     }
163 
164     public static void deleteUserGroupGroupRolesByRoleId(long roleId)
165         throws com.liferay.portal.SystemException {
166         getService().deleteUserGroupGroupRolesByRoleId(roleId);
167     }
168 
169     public static void deleteUserGroupGroupRolesByUserGroupId(long userGroupId)
170         throws com.liferay.portal.SystemException {
171         getService().deleteUserGroupGroupRolesByUserGroupId(userGroupId);
172     }
173 
174     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
175         long userGroupId) throws com.liferay.portal.SystemException {
176         return getService().getUserGroupGroupRoles(userGroupId);
177     }
178 
179     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles(
180         long userGroupId, long groupId)
181         throws com.liferay.portal.SystemException {
182         return getService().getUserGroupGroupRoles(userGroupId, groupId);
183     }
184 
185     public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRolesByGroupAndRole(
186         long groupId, long roleId) throws com.liferay.portal.SystemException {
187         return getService().getUserGroupGroupRolesByGroupAndRole(groupId, roleId);
188     }
189 
190     public static boolean hasUserGroupGroupRole(long userGroupId, long groupId,
191         long roleId) throws com.liferay.portal.SystemException {
192         return getService().hasUserGroupGroupRole(userGroupId, groupId, roleId);
193     }
194 
195     public static boolean hasUserGroupGroupRole(long userGroupId, long groupId,
196         java.lang.String roleName)
197         throws com.liferay.portal.PortalException,
198             com.liferay.portal.SystemException {
199         return getService().hasUserGroupGroupRole(userGroupId, groupId, roleName);
200     }
201 
202     public static UserGroupGroupRoleLocalService getService() {
203         if (_service == null) {
204             _service = (UserGroupGroupRoleLocalService)PortalBeanLocatorUtil.locate(UserGroupGroupRoleLocalService.class.getName());
205 
206             ReferenceRegistry.registerReference(UserGroupGroupRoleLocalServiceUtil.class,
207                 "_service");
208             MethodCache.remove(UserGroupGroupRoleLocalService.class);
209         }
210 
211         return _service;
212     }
213 
214     public void setService(UserGroupGroupRoleLocalService service) {
215         MethodCache.remove(UserGroupGroupRoleLocalService.class);
216 
217         _service = service;
218 
219         ReferenceRegistry.registerReference(UserGroupGroupRoleLocalServiceUtil.class,
220             "_service");
221         MethodCache.remove(UserGroupGroupRoleLocalService.class);
222     }
223 
224     private static UserGroupGroupRoleLocalService _service;
225 }