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.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.model.UserGroupRole; 020 021 /** 022 * The persistence interface for the user group role service. 023 * 024 * <p> 025 * Caching information and settings can be found in <code>portal.properties</code> 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see com.liferay.portal.service.persistence.impl.UserGroupRolePersistenceImpl 030 * @see UserGroupRoleUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface UserGroupRolePersistence extends BasePersistence<UserGroupRole> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link UserGroupRoleUtil} to access the user group role persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Returns all the user group roles where userId = ?. 043 * 044 * @param userId the user ID 045 * @return the matching user group roles 046 */ 047 public java.util.List<UserGroupRole> findByUserId(long userId); 048 049 /** 050 * Returns a range of all the user group roles where userId = ?. 051 * 052 * <p> 053 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 054 * </p> 055 * 056 * @param userId the user ID 057 * @param start the lower bound of the range of user group roles 058 * @param end the upper bound of the range of user group roles (not inclusive) 059 * @return the range of matching user group roles 060 */ 061 public java.util.List<UserGroupRole> findByUserId(long userId, int start, 062 int end); 063 064 /** 065 * Returns an ordered range of all the user group roles where userId = ?. 066 * 067 * <p> 068 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 069 * </p> 070 * 071 * @param userId the user ID 072 * @param start the lower bound of the range of user group roles 073 * @param end the upper bound of the range of user group roles (not inclusive) 074 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 075 * @return the ordered range of matching user group roles 076 */ 077 public java.util.List<UserGroupRole> findByUserId(long userId, int start, 078 int end, 079 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 080 081 /** 082 * Returns an ordered range of all the user group roles where userId = ?. 083 * 084 * <p> 085 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 086 * </p> 087 * 088 * @param userId the user ID 089 * @param start the lower bound of the range of user group roles 090 * @param end the upper bound of the range of user group roles (not inclusive) 091 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 092 * @param retrieveFromCache whether to retrieve from the finder cache 093 * @return the ordered range of matching user group roles 094 */ 095 public java.util.List<UserGroupRole> findByUserId(long userId, int start, 096 int end, 097 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator, 098 boolean retrieveFromCache); 099 100 /** 101 * Returns the first user group role in the ordered set where userId = ?. 102 * 103 * @param userId the user ID 104 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 105 * @return the first matching user group role 106 * @throws NoSuchUserGroupRoleException if a matching user group role could not be found 107 */ 108 public UserGroupRole findByUserId_First(long userId, 109 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 110 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 111 112 /** 113 * Returns the first user group role in the ordered set where userId = ?. 114 * 115 * @param userId the user ID 116 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 117 * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found 118 */ 119 public UserGroupRole fetchByUserId_First(long userId, 120 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 121 122 /** 123 * Returns the last user group role in the ordered set where userId = ?. 124 * 125 * @param userId the user ID 126 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 127 * @return the last matching user group role 128 * @throws NoSuchUserGroupRoleException if a matching user group role could not be found 129 */ 130 public UserGroupRole findByUserId_Last(long userId, 131 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 132 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 133 134 /** 135 * Returns the last user group role in the ordered set where userId = ?. 136 * 137 * @param userId the user ID 138 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 139 * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found 140 */ 141 public UserGroupRole fetchByUserId_Last(long userId, 142 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 143 144 /** 145 * Returns the user group roles before and after the current user group role in the ordered set where userId = ?. 146 * 147 * @param userGroupRolePK the primary key of the current user group role 148 * @param userId the user ID 149 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 150 * @return the previous, current, and next user group role 151 * @throws NoSuchUserGroupRoleException if a user group role with the primary key could not be found 152 */ 153 public UserGroupRole[] findByUserId_PrevAndNext( 154 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK, 155 long userId, 156 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 157 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 158 159 /** 160 * Removes all the user group roles where userId = ? from the database. 161 * 162 * @param userId the user ID 163 */ 164 public void removeByUserId(long userId); 165 166 /** 167 * Returns the number of user group roles where userId = ?. 168 * 169 * @param userId the user ID 170 * @return the number of matching user group roles 171 */ 172 public int countByUserId(long userId); 173 174 /** 175 * Returns all the user group roles where groupId = ?. 176 * 177 * @param groupId the group ID 178 * @return the matching user group roles 179 */ 180 public java.util.List<UserGroupRole> findByGroupId(long groupId); 181 182 /** 183 * Returns a range of all the user group roles where groupId = ?. 184 * 185 * <p> 186 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 187 * </p> 188 * 189 * @param groupId the group ID 190 * @param start the lower bound of the range of user group roles 191 * @param end the upper bound of the range of user group roles (not inclusive) 192 * @return the range of matching user group roles 193 */ 194 public java.util.List<UserGroupRole> findByGroupId(long groupId, int start, 195 int end); 196 197 /** 198 * Returns an ordered range of all the user group roles where groupId = ?. 199 * 200 * <p> 201 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 202 * </p> 203 * 204 * @param groupId the group ID 205 * @param start the lower bound of the range of user group roles 206 * @param end the upper bound of the range of user group roles (not inclusive) 207 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 208 * @return the ordered range of matching user group roles 209 */ 210 public java.util.List<UserGroupRole> findByGroupId(long groupId, int start, 211 int end, 212 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 213 214 /** 215 * Returns an ordered range of all the user group roles where groupId = ?. 216 * 217 * <p> 218 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 219 * </p> 220 * 221 * @param groupId the group ID 222 * @param start the lower bound of the range of user group roles 223 * @param end the upper bound of the range of user group roles (not inclusive) 224 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 225 * @param retrieveFromCache whether to retrieve from the finder cache 226 * @return the ordered range of matching user group roles 227 */ 228 public java.util.List<UserGroupRole> findByGroupId(long groupId, int start, 229 int end, 230 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator, 231 boolean retrieveFromCache); 232 233 /** 234 * Returns the first user group role in the ordered set where groupId = ?. 235 * 236 * @param groupId the group ID 237 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 238 * @return the first matching user group role 239 * @throws NoSuchUserGroupRoleException if a matching user group role could not be found 240 */ 241 public UserGroupRole findByGroupId_First(long groupId, 242 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 243 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 244 245 /** 246 * Returns the first user group role in the ordered set where groupId = ?. 247 * 248 * @param groupId the group ID 249 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 250 * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found 251 */ 252 public UserGroupRole fetchByGroupId_First(long groupId, 253 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 254 255 /** 256 * Returns the last user group role in the ordered set where groupId = ?. 257 * 258 * @param groupId the group ID 259 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 260 * @return the last matching user group role 261 * @throws NoSuchUserGroupRoleException if a matching user group role could not be found 262 */ 263 public UserGroupRole findByGroupId_Last(long groupId, 264 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 265 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 266 267 /** 268 * Returns the last user group role in the ordered set where groupId = ?. 269 * 270 * @param groupId the group ID 271 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 272 * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found 273 */ 274 public UserGroupRole fetchByGroupId_Last(long groupId, 275 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 276 277 /** 278 * Returns the user group roles before and after the current user group role in the ordered set where groupId = ?. 279 * 280 * @param userGroupRolePK the primary key of the current user group role 281 * @param groupId the group ID 282 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 283 * @return the previous, current, and next user group role 284 * @throws NoSuchUserGroupRoleException if a user group role with the primary key could not be found 285 */ 286 public UserGroupRole[] findByGroupId_PrevAndNext( 287 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK, 288 long groupId, 289 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 290 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 291 292 /** 293 * Removes all the user group roles where groupId = ? from the database. 294 * 295 * @param groupId the group ID 296 */ 297 public void removeByGroupId(long groupId); 298 299 /** 300 * Returns the number of user group roles where groupId = ?. 301 * 302 * @param groupId the group ID 303 * @return the number of matching user group roles 304 */ 305 public int countByGroupId(long groupId); 306 307 /** 308 * Returns all the user group roles where roleId = ?. 309 * 310 * @param roleId the role ID 311 * @return the matching user group roles 312 */ 313 public java.util.List<UserGroupRole> findByRoleId(long roleId); 314 315 /** 316 * Returns a range of all the user group roles where roleId = ?. 317 * 318 * <p> 319 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 320 * </p> 321 * 322 * @param roleId the role ID 323 * @param start the lower bound of the range of user group roles 324 * @param end the upper bound of the range of user group roles (not inclusive) 325 * @return the range of matching user group roles 326 */ 327 public java.util.List<UserGroupRole> findByRoleId(long roleId, int start, 328 int end); 329 330 /** 331 * Returns an ordered range of all the user group roles where roleId = ?. 332 * 333 * <p> 334 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 335 * </p> 336 * 337 * @param roleId the role ID 338 * @param start the lower bound of the range of user group roles 339 * @param end the upper bound of the range of user group roles (not inclusive) 340 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 341 * @return the ordered range of matching user group roles 342 */ 343 public java.util.List<UserGroupRole> findByRoleId(long roleId, int start, 344 int end, 345 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 346 347 /** 348 * Returns an ordered range of all the user group roles where roleId = ?. 349 * 350 * <p> 351 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 352 * </p> 353 * 354 * @param roleId the role ID 355 * @param start the lower bound of the range of user group roles 356 * @param end the upper bound of the range of user group roles (not inclusive) 357 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 358 * @param retrieveFromCache whether to retrieve from the finder cache 359 * @return the ordered range of matching user group roles 360 */ 361 public java.util.List<UserGroupRole> findByRoleId(long roleId, int start, 362 int end, 363 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator, 364 boolean retrieveFromCache); 365 366 /** 367 * Returns the first user group role in the ordered set where roleId = ?. 368 * 369 * @param roleId the role ID 370 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 371 * @return the first matching user group role 372 * @throws NoSuchUserGroupRoleException if a matching user group role could not be found 373 */ 374 public UserGroupRole findByRoleId_First(long roleId, 375 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 376 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 377 378 /** 379 * Returns the first user group role in the ordered set where roleId = ?. 380 * 381 * @param roleId the role ID 382 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 383 * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found 384 */ 385 public UserGroupRole fetchByRoleId_First(long roleId, 386 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 387 388 /** 389 * Returns the last user group role in the ordered set where roleId = ?. 390 * 391 * @param roleId the role ID 392 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 393 * @return the last matching user group role 394 * @throws NoSuchUserGroupRoleException if a matching user group role could not be found 395 */ 396 public UserGroupRole findByRoleId_Last(long roleId, 397 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 398 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 399 400 /** 401 * Returns the last user group role in the ordered set where roleId = ?. 402 * 403 * @param roleId the role ID 404 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 405 * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found 406 */ 407 public UserGroupRole fetchByRoleId_Last(long roleId, 408 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 409 410 /** 411 * Returns the user group roles before and after the current user group role in the ordered set where roleId = ?. 412 * 413 * @param userGroupRolePK the primary key of the current user group role 414 * @param roleId the role ID 415 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 416 * @return the previous, current, and next user group role 417 * @throws NoSuchUserGroupRoleException if a user group role with the primary key could not be found 418 */ 419 public UserGroupRole[] findByRoleId_PrevAndNext( 420 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK, 421 long roleId, 422 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 423 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 424 425 /** 426 * Removes all the user group roles where roleId = ? from the database. 427 * 428 * @param roleId the role ID 429 */ 430 public void removeByRoleId(long roleId); 431 432 /** 433 * Returns the number of user group roles where roleId = ?. 434 * 435 * @param roleId the role ID 436 * @return the number of matching user group roles 437 */ 438 public int countByRoleId(long roleId); 439 440 /** 441 * Returns all the user group roles where userId = ? and groupId = ?. 442 * 443 * @param userId the user ID 444 * @param groupId the group ID 445 * @return the matching user group roles 446 */ 447 public java.util.List<UserGroupRole> findByU_G(long userId, long groupId); 448 449 /** 450 * Returns a range of all the user group roles where userId = ? and groupId = ?. 451 * 452 * <p> 453 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 454 * </p> 455 * 456 * @param userId the user ID 457 * @param groupId the group ID 458 * @param start the lower bound of the range of user group roles 459 * @param end the upper bound of the range of user group roles (not inclusive) 460 * @return the range of matching user group roles 461 */ 462 public java.util.List<UserGroupRole> findByU_G(long userId, long groupId, 463 int start, int end); 464 465 /** 466 * Returns an ordered range of all the user group roles where userId = ? and groupId = ?. 467 * 468 * <p> 469 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 470 * </p> 471 * 472 * @param userId the user ID 473 * @param groupId the group ID 474 * @param start the lower bound of the range of user group roles 475 * @param end the upper bound of the range of user group roles (not inclusive) 476 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 477 * @return the ordered range of matching user group roles 478 */ 479 public java.util.List<UserGroupRole> findByU_G(long userId, long groupId, 480 int start, int end, 481 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 482 483 /** 484 * Returns an ordered range of all the user group roles where userId = ? and groupId = ?. 485 * 486 * <p> 487 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 488 * </p> 489 * 490 * @param userId the user ID 491 * @param groupId the group ID 492 * @param start the lower bound of the range of user group roles 493 * @param end the upper bound of the range of user group roles (not inclusive) 494 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 495 * @param retrieveFromCache whether to retrieve from the finder cache 496 * @return the ordered range of matching user group roles 497 */ 498 public java.util.List<UserGroupRole> findByU_G(long userId, long groupId, 499 int start, int end, 500 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator, 501 boolean retrieveFromCache); 502 503 /** 504 * Returns the first user group role in the ordered set where userId = ? and groupId = ?. 505 * 506 * @param userId the user ID 507 * @param groupId the group ID 508 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 509 * @return the first matching user group role 510 * @throws NoSuchUserGroupRoleException if a matching user group role could not be found 511 */ 512 public UserGroupRole findByU_G_First(long userId, long groupId, 513 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 514 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 515 516 /** 517 * Returns the first user group role in the ordered set where userId = ? and groupId = ?. 518 * 519 * @param userId the user ID 520 * @param groupId the group ID 521 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 522 * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found 523 */ 524 public UserGroupRole fetchByU_G_First(long userId, long groupId, 525 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 526 527 /** 528 * Returns the last user group role in the ordered set where userId = ? and groupId = ?. 529 * 530 * @param userId the user ID 531 * @param groupId the group ID 532 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 533 * @return the last matching user group role 534 * @throws NoSuchUserGroupRoleException if a matching user group role could not be found 535 */ 536 public UserGroupRole findByU_G_Last(long userId, long groupId, 537 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 538 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 539 540 /** 541 * Returns the last user group role in the ordered set where userId = ? and groupId = ?. 542 * 543 * @param userId the user ID 544 * @param groupId the group ID 545 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 546 * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found 547 */ 548 public UserGroupRole fetchByU_G_Last(long userId, long groupId, 549 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 550 551 /** 552 * Returns the user group roles before and after the current user group role in the ordered set where userId = ? and groupId = ?. 553 * 554 * @param userGroupRolePK the primary key of the current user group role 555 * @param userId the user ID 556 * @param groupId the group ID 557 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 558 * @return the previous, current, and next user group role 559 * @throws NoSuchUserGroupRoleException if a user group role with the primary key could not be found 560 */ 561 public UserGroupRole[] findByU_G_PrevAndNext( 562 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK, 563 long userId, long groupId, 564 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 565 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 566 567 /** 568 * Removes all the user group roles where userId = ? and groupId = ? from the database. 569 * 570 * @param userId the user ID 571 * @param groupId the group ID 572 */ 573 public void removeByU_G(long userId, long groupId); 574 575 /** 576 * Returns the number of user group roles where userId = ? and groupId = ?. 577 * 578 * @param userId the user ID 579 * @param groupId the group ID 580 * @return the number of matching user group roles 581 */ 582 public int countByU_G(long userId, long groupId); 583 584 /** 585 * Returns all the user group roles where groupId = ? and roleId = ?. 586 * 587 * @param groupId the group ID 588 * @param roleId the role ID 589 * @return the matching user group roles 590 */ 591 public java.util.List<UserGroupRole> findByG_R(long groupId, long roleId); 592 593 /** 594 * Returns a range of all the user group roles where groupId = ? and roleId = ?. 595 * 596 * <p> 597 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 598 * </p> 599 * 600 * @param groupId the group ID 601 * @param roleId the role ID 602 * @param start the lower bound of the range of user group roles 603 * @param end the upper bound of the range of user group roles (not inclusive) 604 * @return the range of matching user group roles 605 */ 606 public java.util.List<UserGroupRole> findByG_R(long groupId, long roleId, 607 int start, int end); 608 609 /** 610 * Returns an ordered range of all the user group roles where groupId = ? and roleId = ?. 611 * 612 * <p> 613 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 614 * </p> 615 * 616 * @param groupId the group ID 617 * @param roleId the role ID 618 * @param start the lower bound of the range of user group roles 619 * @param end the upper bound of the range of user group roles (not inclusive) 620 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 621 * @return the ordered range of matching user group roles 622 */ 623 public java.util.List<UserGroupRole> findByG_R(long groupId, long roleId, 624 int start, int end, 625 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 626 627 /** 628 * Returns an ordered range of all the user group roles where groupId = ? and roleId = ?. 629 * 630 * <p> 631 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 632 * </p> 633 * 634 * @param groupId the group ID 635 * @param roleId the role ID 636 * @param start the lower bound of the range of user group roles 637 * @param end the upper bound of the range of user group roles (not inclusive) 638 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 639 * @param retrieveFromCache whether to retrieve from the finder cache 640 * @return the ordered range of matching user group roles 641 */ 642 public java.util.List<UserGroupRole> findByG_R(long groupId, long roleId, 643 int start, int end, 644 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator, 645 boolean retrieveFromCache); 646 647 /** 648 * Returns the first user group role in the ordered set where groupId = ? and roleId = ?. 649 * 650 * @param groupId the group ID 651 * @param roleId the role ID 652 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 653 * @return the first matching user group role 654 * @throws NoSuchUserGroupRoleException if a matching user group role could not be found 655 */ 656 public UserGroupRole findByG_R_First(long groupId, long roleId, 657 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 658 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 659 660 /** 661 * Returns the first user group role in the ordered set where groupId = ? and roleId = ?. 662 * 663 * @param groupId the group ID 664 * @param roleId the role ID 665 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 666 * @return the first matching user group role, or <code>null</code> if a matching user group role could not be found 667 */ 668 public UserGroupRole fetchByG_R_First(long groupId, long roleId, 669 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 670 671 /** 672 * Returns the last user group role in the ordered set where groupId = ? and roleId = ?. 673 * 674 * @param groupId the group ID 675 * @param roleId the role ID 676 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 677 * @return the last matching user group role 678 * @throws NoSuchUserGroupRoleException if a matching user group role could not be found 679 */ 680 public UserGroupRole findByG_R_Last(long groupId, long roleId, 681 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 682 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 683 684 /** 685 * Returns the last user group role in the ordered set where groupId = ? and roleId = ?. 686 * 687 * @param groupId the group ID 688 * @param roleId the role ID 689 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 690 * @return the last matching user group role, or <code>null</code> if a matching user group role could not be found 691 */ 692 public UserGroupRole fetchByG_R_Last(long groupId, long roleId, 693 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 694 695 /** 696 * Returns the user group roles before and after the current user group role in the ordered set where groupId = ? and roleId = ?. 697 * 698 * @param userGroupRolePK the primary key of the current user group role 699 * @param groupId the group ID 700 * @param roleId the role ID 701 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 702 * @return the previous, current, and next user group role 703 * @throws NoSuchUserGroupRoleException if a user group role with the primary key could not be found 704 */ 705 public UserGroupRole[] findByG_R_PrevAndNext( 706 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK, 707 long groupId, long roleId, 708 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator) 709 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 710 711 /** 712 * Removes all the user group roles where groupId = ? and roleId = ? from the database. 713 * 714 * @param groupId the group ID 715 * @param roleId the role ID 716 */ 717 public void removeByG_R(long groupId, long roleId); 718 719 /** 720 * Returns the number of user group roles where groupId = ? and roleId = ?. 721 * 722 * @param groupId the group ID 723 * @param roleId the role ID 724 * @return the number of matching user group roles 725 */ 726 public int countByG_R(long groupId, long roleId); 727 728 /** 729 * Caches the user group role in the entity cache if it is enabled. 730 * 731 * @param userGroupRole the user group role 732 */ 733 public void cacheResult(UserGroupRole userGroupRole); 734 735 /** 736 * Caches the user group roles in the entity cache if it is enabled. 737 * 738 * @param userGroupRoles the user group roles 739 */ 740 public void cacheResult(java.util.List<UserGroupRole> userGroupRoles); 741 742 /** 743 * Creates a new user group role with the primary key. Does not add the user group role to the database. 744 * 745 * @param userGroupRolePK the primary key for the new user group role 746 * @return the new user group role 747 */ 748 public UserGroupRole create( 749 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK); 750 751 /** 752 * Removes the user group role with the primary key from the database. Also notifies the appropriate model listeners. 753 * 754 * @param userGroupRolePK the primary key of the user group role 755 * @return the user group role that was removed 756 * @throws NoSuchUserGroupRoleException if a user group role with the primary key could not be found 757 */ 758 public UserGroupRole remove( 759 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) 760 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 761 762 public UserGroupRole updateImpl(UserGroupRole userGroupRole); 763 764 /** 765 * Returns the user group role with the primary key or throws a {@link NoSuchUserGroupRoleException} if it could not be found. 766 * 767 * @param userGroupRolePK the primary key of the user group role 768 * @return the user group role 769 * @throws NoSuchUserGroupRoleException if a user group role with the primary key could not be found 770 */ 771 public UserGroupRole findByPrimaryKey( 772 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK) 773 throws com.liferay.portal.exception.NoSuchUserGroupRoleException; 774 775 /** 776 * Returns the user group role with the primary key or returns <code>null</code> if it could not be found. 777 * 778 * @param userGroupRolePK the primary key of the user group role 779 * @return the user group role, or <code>null</code> if a user group role with the primary key could not be found 780 */ 781 public UserGroupRole fetchByPrimaryKey( 782 com.liferay.portal.service.persistence.UserGroupRolePK userGroupRolePK); 783 784 @Override 785 public java.util.Map<java.io.Serializable, UserGroupRole> fetchByPrimaryKeys( 786 java.util.Set<java.io.Serializable> primaryKeys); 787 788 /** 789 * Returns all the user group roles. 790 * 791 * @return the user group roles 792 */ 793 public java.util.List<UserGroupRole> findAll(); 794 795 /** 796 * Returns a range of all the user group roles. 797 * 798 * <p> 799 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 800 * </p> 801 * 802 * @param start the lower bound of the range of user group roles 803 * @param end the upper bound of the range of user group roles (not inclusive) 804 * @return the range of user group roles 805 */ 806 public java.util.List<UserGroupRole> findAll(int start, int end); 807 808 /** 809 * Returns an ordered range of all the user group roles. 810 * 811 * <p> 812 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 813 * </p> 814 * 815 * @param start the lower bound of the range of user group roles 816 * @param end the upper bound of the range of user group roles (not inclusive) 817 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 818 * @return the ordered range of user group roles 819 */ 820 public java.util.List<UserGroupRole> findAll(int start, int end, 821 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator); 822 823 /** 824 * Returns an ordered range of all the user group roles. 825 * 826 * <p> 827 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link UserGroupRoleModelImpl}. 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. 828 * </p> 829 * 830 * @param start the lower bound of the range of user group roles 831 * @param end the upper bound of the range of user group roles (not inclusive) 832 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 833 * @param retrieveFromCache whether to retrieve from the finder cache 834 * @return the ordered range of user group roles 835 */ 836 public java.util.List<UserGroupRole> findAll(int start, int end, 837 com.liferay.portal.kernel.util.OrderByComparator<UserGroupRole> orderByComparator, 838 boolean retrieveFromCache); 839 840 /** 841 * Removes all the user group roles from the database. 842 */ 843 public void removeAll(); 844 845 /** 846 * Returns the number of user group roles. 847 * 848 * @return the number of user group roles 849 */ 850 public int countAll(); 851 }