001 /** 002 * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the local service utility for UserGroupGroupRole. This utility wraps 024 * {@link com.liferay.portal.service.impl.UserGroupGroupRoleLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see UserGroupGroupRoleLocalService 032 * @see com.liferay.portal.service.base.UserGroupGroupRoleLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.UserGroupGroupRoleLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class UserGroupGroupRoleLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserGroupGroupRoleLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds the user group group role to the database. Also notifies the appropriate model listeners. 046 * 047 * @param userGroupGroupRole the user group group role 048 * @return the user group group role that was added 049 */ 050 public static com.liferay.portal.model.UserGroupGroupRole addUserGroupGroupRole( 051 com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole) { 052 return getService().addUserGroupGroupRole(userGroupGroupRole); 053 } 054 055 public static void addUserGroupGroupRoles(long userGroupId, long groupId, 056 long[] roleIds) { 057 getService().addUserGroupGroupRoles(userGroupId, groupId, roleIds); 058 } 059 060 public static void addUserGroupGroupRoles(long[] userGroupIds, 061 long groupId, long roleId) { 062 getService().addUserGroupGroupRoles(userGroupIds, groupId, roleId); 063 } 064 065 /** 066 * Creates a new user group group role with the primary key. Does not add the user group group role to the database. 067 * 068 * @param userGroupGroupRolePK the primary key for the new user group group role 069 * @return the new user group group role 070 */ 071 public static com.liferay.portal.model.UserGroupGroupRole createUserGroupGroupRole( 072 com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) { 073 return getService().createUserGroupGroupRole(userGroupGroupRolePK); 074 } 075 076 /** 077 * @throws PortalException 078 */ 079 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 080 com.liferay.portal.model.PersistedModel persistedModel) 081 throws com.liferay.portal.kernel.exception.PortalException { 082 return getService().deletePersistedModel(persistedModel); 083 } 084 085 /** 086 * Deletes the user group group role from the database. Also notifies the appropriate model listeners. 087 * 088 * @param userGroupGroupRole the user group group role 089 * @return the user group group role that was removed 090 */ 091 public static com.liferay.portal.model.UserGroupGroupRole deleteUserGroupGroupRole( 092 com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole) { 093 return getService().deleteUserGroupGroupRole(userGroupGroupRole); 094 } 095 096 /** 097 * Deletes the user group group role with the primary key from the database. Also notifies the appropriate model listeners. 098 * 099 * @param userGroupGroupRolePK the primary key of the user group group role 100 * @return the user group group role that was removed 101 * @throws PortalException if a user group group role with the primary key could not be found 102 */ 103 public static com.liferay.portal.model.UserGroupGroupRole deleteUserGroupGroupRole( 104 com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) 105 throws com.liferay.portal.kernel.exception.PortalException { 106 return getService().deleteUserGroupGroupRole(userGroupGroupRolePK); 107 } 108 109 public static void deleteUserGroupGroupRoles(long groupId, int roleType) { 110 getService().deleteUserGroupGroupRoles(groupId, roleType); 111 } 112 113 public static void deleteUserGroupGroupRoles(long userGroupId, 114 long groupId, long[] roleIds) { 115 getService().deleteUserGroupGroupRoles(userGroupId, groupId, roleIds); 116 } 117 118 public static void deleteUserGroupGroupRoles(long userGroupId, 119 long[] groupIds) { 120 getService().deleteUserGroupGroupRoles(userGroupId, groupIds); 121 } 122 123 public static void deleteUserGroupGroupRoles(long[] userGroupIds, 124 long groupId) { 125 getService().deleteUserGroupGroupRoles(userGroupIds, groupId); 126 } 127 128 public static void deleteUserGroupGroupRoles(long[] userGroupIds, 129 long groupId, long roleId) { 130 getService().deleteUserGroupGroupRoles(userGroupIds, groupId, roleId); 131 } 132 133 public static void deleteUserGroupGroupRolesByGroupId(long groupId) { 134 getService().deleteUserGroupGroupRolesByGroupId(groupId); 135 } 136 137 public static void deleteUserGroupGroupRolesByRoleId(long roleId) { 138 getService().deleteUserGroupGroupRolesByRoleId(roleId); 139 } 140 141 public static void deleteUserGroupGroupRolesByUserGroupId(long userGroupId) { 142 getService().deleteUserGroupGroupRolesByUserGroupId(userGroupId); 143 } 144 145 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 146 return getService().dynamicQuery(); 147 } 148 149 /** 150 * Performs a dynamic query on the database and returns the matching rows. 151 * 152 * @param dynamicQuery the dynamic query 153 * @return the matching rows 154 */ 155 public static <T> java.util.List<T> dynamicQuery( 156 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 157 return getService().dynamicQuery(dynamicQuery); 158 } 159 160 /** 161 * Performs a dynamic query on the database and returns a range of the matching rows. 162 * 163 * <p> 164 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupGroupRoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 165 * </p> 166 * 167 * @param dynamicQuery the dynamic query 168 * @param start the lower bound of the range of model instances 169 * @param end the upper bound of the range of model instances (not inclusive) 170 * @return the range of matching rows 171 */ 172 public static <T> java.util.List<T> dynamicQuery( 173 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 174 int end) { 175 return getService().dynamicQuery(dynamicQuery, start, end); 176 } 177 178 /** 179 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 180 * 181 * <p> 182 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupGroupRoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 183 * </p> 184 * 185 * @param dynamicQuery the dynamic query 186 * @param start the lower bound of the range of model instances 187 * @param end the upper bound of the range of model instances (not inclusive) 188 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 189 * @return the ordered range of matching rows 190 */ 191 public static <T> java.util.List<T> dynamicQuery( 192 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 193 int end, 194 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 195 return getService() 196 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 197 } 198 199 /** 200 * Returns the number of rows matching the dynamic query. 201 * 202 * @param dynamicQuery the dynamic query 203 * @return the number of rows matching the dynamic query 204 */ 205 public static long dynamicQueryCount( 206 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 207 return getService().dynamicQueryCount(dynamicQuery); 208 } 209 210 /** 211 * Returns the number of rows matching the dynamic query. 212 * 213 * @param dynamicQuery the dynamic query 214 * @param projection the projection to apply to the query 215 * @return the number of rows matching the dynamic query 216 */ 217 public static long dynamicQueryCount( 218 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 219 com.liferay.portal.kernel.dao.orm.Projection projection) { 220 return getService().dynamicQueryCount(dynamicQuery, projection); 221 } 222 223 public static com.liferay.portal.model.UserGroupGroupRole fetchUserGroupGroupRole( 224 com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) { 225 return getService().fetchUserGroupGroupRole(userGroupGroupRolePK); 226 } 227 228 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 229 return getService().getActionableDynamicQuery(); 230 } 231 232 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 233 return getService().getIndexableActionableDynamicQuery(); 234 } 235 236 /** 237 * Returns the OSGi service identifier. 238 * 239 * @return the OSGi service identifier 240 */ 241 public static java.lang.String getOSGiServiceIdentifier() { 242 return getService().getOSGiServiceIdentifier(); 243 } 244 245 public static com.liferay.portal.model.PersistedModel getPersistedModel( 246 java.io.Serializable primaryKeyObj) 247 throws com.liferay.portal.kernel.exception.PortalException { 248 return getService().getPersistedModel(primaryKeyObj); 249 } 250 251 /** 252 * Returns the user group group role with the primary key. 253 * 254 * @param userGroupGroupRolePK the primary key of the user group group role 255 * @return the user group group role 256 * @throws PortalException if a user group group role with the primary key could not be found 257 */ 258 public static com.liferay.portal.model.UserGroupGroupRole getUserGroupGroupRole( 259 com.liferay.portal.service.persistence.UserGroupGroupRolePK userGroupGroupRolePK) 260 throws com.liferay.portal.kernel.exception.PortalException { 261 return getService().getUserGroupGroupRole(userGroupGroupRolePK); 262 } 263 264 /** 265 * Returns a range of all the user group group roles. 266 * 267 * <p> 268 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserGroupGroupRoleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 269 * </p> 270 * 271 * @param start the lower bound of the range of user group group roles 272 * @param end the upper bound of the range of user group group roles (not inclusive) 273 * @return the range of user group group roles 274 */ 275 public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles( 276 int start, int end) { 277 return getService().getUserGroupGroupRoles(start, end); 278 } 279 280 public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles( 281 long userGroupId) { 282 return getService().getUserGroupGroupRoles(userGroupId); 283 } 284 285 public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRoles( 286 long userGroupId, long groupId) { 287 return getService().getUserGroupGroupRoles(userGroupId, groupId); 288 } 289 290 public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRolesByGroupAndRole( 291 long groupId, long roleId) { 292 return getService().getUserGroupGroupRolesByGroupAndRole(groupId, roleId); 293 } 294 295 public static java.util.List<com.liferay.portal.model.UserGroupGroupRole> getUserGroupGroupRolesByUser( 296 long userId) { 297 return getService().getUserGroupGroupRolesByUser(userId); 298 } 299 300 /** 301 * Returns the number of user group group roles. 302 * 303 * @return the number of user group group roles 304 */ 305 public static int getUserGroupGroupRolesCount() { 306 return getService().getUserGroupGroupRolesCount(); 307 } 308 309 public static boolean hasUserGroupGroupRole(long userGroupId, long groupId, 310 long roleId) { 311 return getService().hasUserGroupGroupRole(userGroupId, groupId, roleId); 312 } 313 314 public static boolean hasUserGroupGroupRole(long userGroupId, long groupId, 315 java.lang.String roleName) 316 throws com.liferay.portal.kernel.exception.PortalException { 317 return getService().hasUserGroupGroupRole(userGroupId, groupId, roleName); 318 } 319 320 /** 321 * Updates the user group group role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 322 * 323 * @param userGroupGroupRole the user group group role 324 * @return the user group group role that was updated 325 */ 326 public static com.liferay.portal.model.UserGroupGroupRole updateUserGroupGroupRole( 327 com.liferay.portal.model.UserGroupGroupRole userGroupGroupRole) { 328 return getService().updateUserGroupGroupRole(userGroupGroupRole); 329 } 330 331 public static UserGroupGroupRoleLocalService getService() { 332 if (_service == null) { 333 _service = (UserGroupGroupRoleLocalService)PortalBeanLocatorUtil.locate(UserGroupGroupRoleLocalService.class.getName()); 334 335 ReferenceRegistry.registerReference(UserGroupGroupRoleLocalServiceUtil.class, 336 "_service"); 337 } 338 339 return _service; 340 } 341 342 private static UserGroupGroupRoleLocalService _service; 343 }