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