001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link UserGroupRoleLocalService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       UserGroupRoleLocalService
030     * @generated
031     */
032    public class UserGroupRoleLocalServiceUtil {
033            public static com.liferay.portal.model.UserGroupRole addUserGroupRole(
034                    com.liferay.portal.model.UserGroupRole userGroupRole)
035                    throws com.liferay.portal.kernel.exception.SystemException {
036                    return getService().addUserGroupRole(userGroupRole);
037            }
038    
039            public static com.liferay.portal.model.UserGroupRole createUserGroupRole(
040                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) {
041                    return getService().createUserGroupRole(userGroupRolePK);
042            }
043    
044            public static void deleteUserGroupRole(
045                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
046                    throws com.liferay.portal.kernel.exception.PortalException,
047                            com.liferay.portal.kernel.exception.SystemException {
048                    getService().deleteUserGroupRole(userGroupRolePK);
049            }
050    
051            public static void deleteUserGroupRole(
052                    com.liferay.portal.model.UserGroupRole userGroupRole)
053                    throws com.liferay.portal.kernel.exception.SystemException {
054                    getService().deleteUserGroupRole(userGroupRole);
055            }
056    
057            @SuppressWarnings("unchecked")
058            public static java.util.List dynamicQuery(
059                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
060                    throws com.liferay.portal.kernel.exception.SystemException {
061                    return getService().dynamicQuery(dynamicQuery);
062            }
063    
064            @SuppressWarnings("unchecked")
065            public static java.util.List dynamicQuery(
066                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
067                    int end) throws com.liferay.portal.kernel.exception.SystemException {
068                    return getService().dynamicQuery(dynamicQuery, start, end);
069            }
070    
071            @SuppressWarnings("unchecked")
072            public static java.util.List dynamicQuery(
073                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
074                    int end,
075                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
076                    throws com.liferay.portal.kernel.exception.SystemException {
077                    return getService()
078                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
079            }
080    
081            public static long dynamicQueryCount(
082                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
083                    throws com.liferay.portal.kernel.exception.SystemException {
084                    return getService().dynamicQueryCount(dynamicQuery);
085            }
086    
087            public static com.liferay.portal.model.UserGroupRole getUserGroupRole(
088                    com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK)
089                    throws com.liferay.portal.kernel.exception.PortalException,
090                            com.liferay.portal.kernel.exception.SystemException {
091                    return getService().getUserGroupRole(userGroupRolePK);
092            }
093    
094            public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles(
095                    int start, int end)
096                    throws com.liferay.portal.kernel.exception.SystemException {
097                    return getService().getUserGroupRoles(start, end);
098            }
099    
100            public static int getUserGroupRolesCount()
101                    throws com.liferay.portal.kernel.exception.SystemException {
102                    return getService().getUserGroupRolesCount();
103            }
104    
105            public static com.liferay.portal.model.UserGroupRole updateUserGroupRole(
106                    com.liferay.portal.model.UserGroupRole userGroupRole)
107                    throws com.liferay.portal.kernel.exception.SystemException {
108                    return getService().updateUserGroupRole(userGroupRole);
109            }
110    
111            public static com.liferay.portal.model.UserGroupRole updateUserGroupRole(
112                    com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge)
113                    throws com.liferay.portal.kernel.exception.SystemException {
114                    return getService().updateUserGroupRole(userGroupRole, merge);
115            }
116    
117            public static void addUserGroupRoles(long userId, long groupId,
118                    long[] roleIds)
119                    throws com.liferay.portal.kernel.exception.PortalException,
120                            com.liferay.portal.kernel.exception.SystemException {
121                    getService().addUserGroupRoles(userId, groupId, roleIds);
122            }
123    
124            public static void addUserGroupRoles(long[] userIds, long groupId,
125                    long roleId)
126                    throws com.liferay.portal.kernel.exception.PortalException,
127                            com.liferay.portal.kernel.exception.SystemException {
128                    getService().addUserGroupRoles(userIds, groupId, roleId);
129            }
130    
131            public static void deleteUserGroupRoles(long userId, long groupId,
132                    long[] roleIds)
133                    throws com.liferay.portal.kernel.exception.SystemException {
134                    getService().deleteUserGroupRoles(userId, groupId, roleIds);
135            }
136    
137            public static void deleteUserGroupRoles(long userId, long[] groupIds)
138                    throws com.liferay.portal.kernel.exception.SystemException {
139                    getService().deleteUserGroupRoles(userId, groupIds);
140            }
141    
142            public static void deleteUserGroupRoles(long[] userIds, long groupId)
143                    throws com.liferay.portal.kernel.exception.SystemException {
144                    getService().deleteUserGroupRoles(userIds, groupId);
145            }
146    
147            public static void deleteUserGroupRoles(long[] userIds, long groupId,
148                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
149                    getService().deleteUserGroupRoles(userIds, groupId, roleId);
150            }
151    
152            public static void deleteUserGroupRolesByGroupId(long groupId)
153                    throws com.liferay.portal.kernel.exception.SystemException {
154                    getService().deleteUserGroupRolesByGroupId(groupId);
155            }
156    
157            public static void deleteUserGroupRolesByRoleId(long roleId)
158                    throws com.liferay.portal.kernel.exception.SystemException {
159                    getService().deleteUserGroupRolesByRoleId(roleId);
160            }
161    
162            public static void deleteUserGroupRolesByUserId(long userId)
163                    throws com.liferay.portal.kernel.exception.SystemException {
164                    getService().deleteUserGroupRolesByUserId(userId);
165            }
166    
167            public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles(
168                    long userId) throws com.liferay.portal.kernel.exception.SystemException {
169                    return getService().getUserGroupRoles(userId);
170            }
171    
172            public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles(
173                    long userId, long groupId)
174                    throws com.liferay.portal.kernel.exception.SystemException {
175                    return getService().getUserGroupRoles(userId, groupId);
176            }
177    
178            public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRolesByGroupAndRole(
179                    long groupId, long roleId)
180                    throws com.liferay.portal.kernel.exception.SystemException {
181                    return getService().getUserGroupRolesByGroupAndRole(groupId, roleId);
182            }
183    
184            public static java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRolesByUserUserGroupAndGroup(
185                    long userId, long groupId)
186                    throws com.liferay.portal.kernel.exception.SystemException {
187                    return getService()
188                                       .getUserGroupRolesByUserUserGroupAndGroup(userId, groupId);
189            }
190    
191            public static boolean hasUserGroupRole(long userId, long groupId,
192                    long roleId) throws com.liferay.portal.kernel.exception.SystemException {
193                    return getService().hasUserGroupRole(userId, groupId, roleId);
194            }
195    
196            public static boolean hasUserGroupRole(long userId, long groupId,
197                    long roleId, boolean inherit)
198                    throws com.liferay.portal.kernel.exception.SystemException {
199                    return getService().hasUserGroupRole(userId, groupId, roleId, inherit);
200            }
201    
202            public static boolean hasUserGroupRole(long userId, long groupId,
203                    java.lang.String roleName)
204                    throws com.liferay.portal.kernel.exception.PortalException,
205                            com.liferay.portal.kernel.exception.SystemException {
206                    return getService().hasUserGroupRole(userId, groupId, roleName);
207            }
208    
209            public static boolean hasUserGroupRole(long userId, long groupId,
210                    java.lang.String roleName, boolean inherit)
211                    throws com.liferay.portal.kernel.exception.PortalException,
212                            com.liferay.portal.kernel.exception.SystemException {
213                    return getService().hasUserGroupRole(userId, groupId, roleName, inherit);
214            }
215    
216            public static UserGroupRoleLocalService getService() {
217                    if (_service == null) {
218                            _service = (UserGroupRoleLocalService)PortalBeanLocatorUtil.locate(UserGroupRoleLocalService.class.getName());
219                    }
220    
221                    return _service;
222            }
223    
224            public void setService(UserGroupRoleLocalService service) {
225                    _service = service;
226            }
227    
228            private static UserGroupRoleLocalService _service;
229    }