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.annotation.Isolation; 018 import com.liferay.portal.kernel.annotation.Propagation; 019 import com.liferay.portal.kernel.annotation.Transactional; 020 import com.liferay.portal.kernel.exception.PortalException; 021 import com.liferay.portal.kernel.exception.SystemException; 022 023 /** 024 * The interface for the user group role local service. 025 * 026 * <p> 027 * Never modify or reference this interface directly. Always use {@link UserGroupRoleLocalServiceUtil} to access the user group role local service. Add custom service methods to {@link com.liferay.portal.service.impl.UserGroupRoleLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 028 * </p> 029 * 030 * <p> 031 * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see UserGroupRoleLocalServiceUtil 036 * @see com.liferay.portal.service.base.UserGroupRoleLocalServiceBaseImpl 037 * @see com.liferay.portal.service.impl.UserGroupRoleLocalServiceImpl 038 * @generated 039 */ 040 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 041 PortalException.class, SystemException.class}) 042 public interface UserGroupRoleLocalService { 043 /** 044 * Adds the user group role to the database. Also notifies the appropriate model listeners. 045 * 046 * @param userGroupRole the user group role to add 047 * @return the user group role that was added 048 * @throws SystemException if a system exception occurred 049 */ 050 public com.liferay.portal.model.UserGroupRole addUserGroupRole( 051 com.liferay.portal.model.UserGroupRole userGroupRole) 052 throws com.liferay.portal.kernel.exception.SystemException; 053 054 /** 055 * Creates a new user group role with the primary key. Does not add the user group role to the database. 056 * 057 * @param userGroupRolePK the primary key for the new user group role 058 * @return the new user group role 059 */ 060 public com.liferay.portal.model.UserGroupRole createUserGroupRole( 061 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK); 062 063 /** 064 * Deletes the user group role with the primary key from the database. Also notifies the appropriate model listeners. 065 * 066 * @param userGroupRolePK the primary key of the user group role to delete 067 * @throws PortalException if a user group role with the primary key could not be found 068 * @throws SystemException if a system exception occurred 069 */ 070 public void deleteUserGroupRole( 071 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) 072 throws com.liferay.portal.kernel.exception.PortalException, 073 com.liferay.portal.kernel.exception.SystemException; 074 075 /** 076 * Deletes the user group role from the database. Also notifies the appropriate model listeners. 077 * 078 * @param userGroupRole the user group role to delete 079 * @throws SystemException if a system exception occurred 080 */ 081 public void deleteUserGroupRole( 082 com.liferay.portal.model.UserGroupRole userGroupRole) 083 throws com.liferay.portal.kernel.exception.SystemException; 084 085 /** 086 * Performs a dynamic query on the database and returns the matching rows. 087 * 088 * @param dynamicQuery the dynamic query to search with 089 * @return the matching rows 090 * @throws SystemException if a system exception occurred 091 */ 092 @SuppressWarnings("rawtypes") 093 public java.util.List dynamicQuery( 094 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 095 throws com.liferay.portal.kernel.exception.SystemException; 096 097 /** 098 * Performs a dynamic query on the database and returns a range of the matching rows. 099 * 100 * <p> 101 * 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. 102 * </p> 103 * 104 * @param dynamicQuery the dynamic query to search with 105 * @param start the lower bound of the range of model instances to return 106 * @param end the upper bound of the range of model instances to return (not inclusive) 107 * @return the range of matching rows 108 * @throws SystemException if a system exception occurred 109 */ 110 @SuppressWarnings("rawtypes") 111 public java.util.List dynamicQuery( 112 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 113 int end) throws com.liferay.portal.kernel.exception.SystemException; 114 115 /** 116 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 117 * 118 * <p> 119 * 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. 120 * </p> 121 * 122 * @param dynamicQuery the dynamic query to search with 123 * @param start the lower bound of the range of model instances to return 124 * @param end the upper bound of the range of model instances to return (not inclusive) 125 * @param orderByComparator the comparator to order the results by 126 * @return the ordered range of matching rows 127 * @throws SystemException if a system exception occurred 128 */ 129 @SuppressWarnings("rawtypes") 130 public java.util.List dynamicQuery( 131 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 132 int end, 133 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 134 throws com.liferay.portal.kernel.exception.SystemException; 135 136 /** 137 * Counts the number of rows that match the dynamic query. 138 * 139 * @param dynamicQuery the dynamic query to search with 140 * @return the number of rows that match the dynamic query 141 * @throws SystemException if a system exception occurred 142 */ 143 public long dynamicQueryCount( 144 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) 145 throws com.liferay.portal.kernel.exception.SystemException; 146 147 /** 148 * Gets the user group role with the primary key. 149 * 150 * @param userGroupRolePK the primary key of the user group role to get 151 * @return the user group role 152 * @throws PortalException if a user group role with the primary key could not be found 153 * @throws SystemException if a system exception occurred 154 */ 155 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 156 public com.liferay.portal.model.UserGroupRole getUserGroupRole( 157 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) 158 throws com.liferay.portal.kernel.exception.PortalException, 159 com.liferay.portal.kernel.exception.SystemException; 160 161 /** 162 * Gets a range of all the user group roles. 163 * 164 * <p> 165 * 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. 166 * </p> 167 * 168 * @param start the lower bound of the range of user group roles to return 169 * @param end the upper bound of the range of user group roles to return (not inclusive) 170 * @return the range of user group roles 171 * @throws SystemException if a system exception occurred 172 */ 173 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 174 public java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles( 175 int start, int end) 176 throws com.liferay.portal.kernel.exception.SystemException; 177 178 /** 179 * Gets the number of user group roles. 180 * 181 * @return the number of user group roles 182 * @throws SystemException if a system exception occurred 183 */ 184 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 185 public int getUserGroupRolesCount() 186 throws com.liferay.portal.kernel.exception.SystemException; 187 188 /** 189 * Updates the user group role in the database. Also notifies the appropriate model listeners. 190 * 191 * @param userGroupRole the user group role to update 192 * @return the user group role that was updated 193 * @throws SystemException if a system exception occurred 194 */ 195 public com.liferay.portal.model.UserGroupRole updateUserGroupRole( 196 com.liferay.portal.model.UserGroupRole userGroupRole) 197 throws com.liferay.portal.kernel.exception.SystemException; 198 199 /** 200 * Updates the user group role in the database. Also notifies the appropriate model listeners. 201 * 202 * @param userGroupRole the user group role to update 203 * @param merge whether to merge the user group role with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation. 204 * @return the user group role that was updated 205 * @throws SystemException if a system exception occurred 206 */ 207 public com.liferay.portal.model.UserGroupRole updateUserGroupRole( 208 com.liferay.portal.model.UserGroupRole userGroupRole, boolean merge) 209 throws com.liferay.portal.kernel.exception.SystemException; 210 211 public void addUserGroupRoles(long userId, long groupId, long[] roleIds) 212 throws com.liferay.portal.kernel.exception.PortalException, 213 com.liferay.portal.kernel.exception.SystemException; 214 215 public void addUserGroupRoles(long[] userIds, long groupId, long roleId) 216 throws com.liferay.portal.kernel.exception.PortalException, 217 com.liferay.portal.kernel.exception.SystemException; 218 219 public void deleteUserGroupRoles(long userId, long groupId, long[] roleIds) 220 throws com.liferay.portal.kernel.exception.SystemException; 221 222 public void deleteUserGroupRoles(long userId, long[] groupIds) 223 throws com.liferay.portal.kernel.exception.SystemException; 224 225 public void deleteUserGroupRoles(long[] userIds, long groupId) 226 throws com.liferay.portal.kernel.exception.SystemException; 227 228 public void deleteUserGroupRoles(long[] userIds, long groupId, long roleId) 229 throws com.liferay.portal.kernel.exception.SystemException; 230 231 public void deleteUserGroupRolesByGroupId(long groupId) 232 throws com.liferay.portal.kernel.exception.SystemException; 233 234 public void deleteUserGroupRolesByRoleId(long roleId) 235 throws com.liferay.portal.kernel.exception.SystemException; 236 237 public void deleteUserGroupRolesByUserId(long userId) 238 throws com.liferay.portal.kernel.exception.SystemException; 239 240 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 241 public java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles( 242 long userId) throws com.liferay.portal.kernel.exception.SystemException; 243 244 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 245 public java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRoles( 246 long userId, long groupId) 247 throws com.liferay.portal.kernel.exception.SystemException; 248 249 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 250 public java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRolesByGroupAndRole( 251 long groupId, long roleId) 252 throws com.liferay.portal.kernel.exception.SystemException; 253 254 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 255 public java.util.List<com.liferay.portal.model.UserGroupRole> getUserGroupRolesByUserUserGroupAndGroup( 256 long userId, long groupId) 257 throws com.liferay.portal.kernel.exception.SystemException; 258 259 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 260 public boolean hasUserGroupRole(long userId, long groupId, long roleId) 261 throws com.liferay.portal.kernel.exception.SystemException; 262 263 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 264 public boolean hasUserGroupRole(long userId, long groupId, long roleId, 265 boolean inherit) 266 throws com.liferay.portal.kernel.exception.SystemException; 267 268 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 269 public boolean hasUserGroupRole(long userId, long groupId, 270 java.lang.String roleName) 271 throws com.liferay.portal.kernel.exception.PortalException, 272 com.liferay.portal.kernel.exception.SystemException; 273 274 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 275 public boolean hasUserGroupRole(long userId, long groupId, 276 java.lang.String roleName, boolean inherit) 277 throws com.liferay.portal.kernel.exception.PortalException, 278 com.liferay.portal.kernel.exception.SystemException; 279 }