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