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