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.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.UserGroup; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the user group service. This utility wraps {@link UserGroupPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 029 * 030 * <p> 031 * Caching information and settings can be found in <code>portal.properties</code> 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see UserGroupPersistence 036 * @see UserGroupPersistenceImpl 037 * @generated 038 */ 039 public class UserGroupUtil { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 044 */ 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 048 */ 049 public static void clearCache() { 050 getPersistence().clearCache(); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 055 */ 056 public static void clearCache(UserGroup userGroup) { 057 getPersistence().clearCache(userGroup); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 064 throws SystemException { 065 return getPersistence().countWithDynamicQuery(dynamicQuery); 066 } 067 068 /** 069 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 070 */ 071 public static List<UserGroup> findWithDynamicQuery( 072 DynamicQuery dynamicQuery) throws SystemException { 073 return getPersistence().findWithDynamicQuery(dynamicQuery); 074 } 075 076 /** 077 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 078 */ 079 public static List<UserGroup> findWithDynamicQuery( 080 DynamicQuery dynamicQuery, int start, int end) 081 throws SystemException { 082 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 083 } 084 085 /** 086 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 087 */ 088 public static List<UserGroup> findWithDynamicQuery( 089 DynamicQuery dynamicQuery, int start, int end, 090 OrderByComparator orderByComparator) throws SystemException { 091 return getPersistence() 092 .findWithDynamicQuery(dynamicQuery, start, end, 093 orderByComparator); 094 } 095 096 /** 097 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel) 098 */ 099 public static UserGroup update(UserGroup userGroup) 100 throws SystemException { 101 return getPersistence().update(userGroup); 102 } 103 104 /** 105 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, ServiceContext) 106 */ 107 public static UserGroup update(UserGroup userGroup, 108 ServiceContext serviceContext) throws SystemException { 109 return getPersistence().update(userGroup, serviceContext); 110 } 111 112 /** 113 * Caches the user group in the entity cache if it is enabled. 114 * 115 * @param userGroup the user group 116 */ 117 public static void cacheResult(com.liferay.portal.model.UserGroup userGroup) { 118 getPersistence().cacheResult(userGroup); 119 } 120 121 /** 122 * Caches the user groups in the entity cache if it is enabled. 123 * 124 * @param userGroups the user groups 125 */ 126 public static void cacheResult( 127 java.util.List<com.liferay.portal.model.UserGroup> userGroups) { 128 getPersistence().cacheResult(userGroups); 129 } 130 131 /** 132 * Creates a new user group with the primary key. Does not add the user group to the database. 133 * 134 * @param userGroupId the primary key for the new user group 135 * @return the new user group 136 */ 137 public static com.liferay.portal.model.UserGroup create(long userGroupId) { 138 return getPersistence().create(userGroupId); 139 } 140 141 /** 142 * Removes the user group with the primary key from the database. Also notifies the appropriate model listeners. 143 * 144 * @param userGroupId the primary key of the user group 145 * @return the user group that was removed 146 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 147 * @throws SystemException if a system exception occurred 148 */ 149 public static com.liferay.portal.model.UserGroup remove(long userGroupId) 150 throws com.liferay.portal.NoSuchUserGroupException, 151 com.liferay.portal.kernel.exception.SystemException { 152 return getPersistence().remove(userGroupId); 153 } 154 155 public static com.liferay.portal.model.UserGroup updateImpl( 156 com.liferay.portal.model.UserGroup userGroup) 157 throws com.liferay.portal.kernel.exception.SystemException { 158 return getPersistence().updateImpl(userGroup); 159 } 160 161 /** 162 * Returns the user group with the primary key or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found. 163 * 164 * @param userGroupId the primary key of the user group 165 * @return the user group 166 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 167 * @throws SystemException if a system exception occurred 168 */ 169 public static com.liferay.portal.model.UserGroup findByPrimaryKey( 170 long userGroupId) 171 throws com.liferay.portal.NoSuchUserGroupException, 172 com.liferay.portal.kernel.exception.SystemException { 173 return getPersistence().findByPrimaryKey(userGroupId); 174 } 175 176 /** 177 * Returns the user group with the primary key or returns <code>null</code> if it could not be found. 178 * 179 * @param userGroupId the primary key of the user group 180 * @return the user group, or <code>null</code> if a user group with the primary key could not be found 181 * @throws SystemException if a system exception occurred 182 */ 183 public static com.liferay.portal.model.UserGroup fetchByPrimaryKey( 184 long userGroupId) 185 throws com.liferay.portal.kernel.exception.SystemException { 186 return getPersistence().fetchByPrimaryKey(userGroupId); 187 } 188 189 /** 190 * Returns all the user groups where companyId = ?. 191 * 192 * @param companyId the company ID 193 * @return the matching user groups 194 * @throws SystemException if a system exception occurred 195 */ 196 public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId( 197 long companyId) 198 throws com.liferay.portal.kernel.exception.SystemException { 199 return getPersistence().findByCompanyId(companyId); 200 } 201 202 /** 203 * Returns a range of all the user groups where companyId = ?. 204 * 205 * <p> 206 * 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. 207 * </p> 208 * 209 * @param companyId the company ID 210 * @param start the lower bound of the range of user groups 211 * @param end the upper bound of the range of user groups (not inclusive) 212 * @return the range of matching user groups 213 * @throws SystemException if a system exception occurred 214 */ 215 public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId( 216 long companyId, int start, int end) 217 throws com.liferay.portal.kernel.exception.SystemException { 218 return getPersistence().findByCompanyId(companyId, start, end); 219 } 220 221 /** 222 * Returns an ordered range of all the user groups where companyId = ?. 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 companyId the company ID 229 * @param start the lower bound of the range of user groups 230 * @param end the upper bound of the range of user groups (not inclusive) 231 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 232 * @return the ordered range of matching user groups 233 * @throws SystemException if a system exception occurred 234 */ 235 public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId( 236 long companyId, int start, int end, 237 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 238 throws com.liferay.portal.kernel.exception.SystemException { 239 return getPersistence() 240 .findByCompanyId(companyId, start, end, orderByComparator); 241 } 242 243 /** 244 * Returns the first user group in the ordered set where companyId = ?. 245 * 246 * @param companyId the company ID 247 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 248 * @return the first matching user group 249 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 250 * @throws SystemException if a system exception occurred 251 */ 252 public static com.liferay.portal.model.UserGroup findByCompanyId_First( 253 long companyId, 254 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 255 throws com.liferay.portal.NoSuchUserGroupException, 256 com.liferay.portal.kernel.exception.SystemException { 257 return getPersistence() 258 .findByCompanyId_First(companyId, orderByComparator); 259 } 260 261 /** 262 * Returns the first user group in the ordered set where companyId = ?. 263 * 264 * @param companyId the company ID 265 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 266 * @return the first matching user group, or <code>null</code> if a matching user group could not be found 267 * @throws SystemException if a system exception occurred 268 */ 269 public static com.liferay.portal.model.UserGroup fetchByCompanyId_First( 270 long companyId, 271 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 272 throws com.liferay.portal.kernel.exception.SystemException { 273 return getPersistence() 274 .fetchByCompanyId_First(companyId, orderByComparator); 275 } 276 277 /** 278 * Returns the last user group in the ordered set where companyId = ?. 279 * 280 * @param companyId the company ID 281 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 282 * @return the last matching user group 283 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 284 * @throws SystemException if a system exception occurred 285 */ 286 public static com.liferay.portal.model.UserGroup findByCompanyId_Last( 287 long companyId, 288 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 289 throws com.liferay.portal.NoSuchUserGroupException, 290 com.liferay.portal.kernel.exception.SystemException { 291 return getPersistence() 292 .findByCompanyId_Last(companyId, orderByComparator); 293 } 294 295 /** 296 * Returns the last user group in the ordered set where companyId = ?. 297 * 298 * @param companyId the company ID 299 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 300 * @return the last matching user group, or <code>null</code> if a matching user group could not be found 301 * @throws SystemException if a system exception occurred 302 */ 303 public static com.liferay.portal.model.UserGroup fetchByCompanyId_Last( 304 long companyId, 305 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 306 throws com.liferay.portal.kernel.exception.SystemException { 307 return getPersistence() 308 .fetchByCompanyId_Last(companyId, orderByComparator); 309 } 310 311 /** 312 * Returns the user groups before and after the current user group in the ordered set where companyId = ?. 313 * 314 * @param userGroupId the primary key of the current user group 315 * @param companyId the company ID 316 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 317 * @return the previous, current, and next user group 318 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 319 * @throws SystemException if a system exception occurred 320 */ 321 public static com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext( 322 long userGroupId, long companyId, 323 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 324 throws com.liferay.portal.NoSuchUserGroupException, 325 com.liferay.portal.kernel.exception.SystemException { 326 return getPersistence() 327 .findByCompanyId_PrevAndNext(userGroupId, companyId, 328 orderByComparator); 329 } 330 331 /** 332 * Returns all the user groups that the user has permission to view where companyId = ?. 333 * 334 * @param companyId the company ID 335 * @return the matching user groups that the user has permission to view 336 * @throws SystemException if a system exception occurred 337 */ 338 public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId( 339 long companyId) 340 throws com.liferay.portal.kernel.exception.SystemException { 341 return getPersistence().filterFindByCompanyId(companyId); 342 } 343 344 /** 345 * Returns a range of all the user groups that the user has permission to view where companyId = ?. 346 * 347 * <p> 348 * 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. 349 * </p> 350 * 351 * @param companyId the company ID 352 * @param start the lower bound of the range of user groups 353 * @param end the upper bound of the range of user groups (not inclusive) 354 * @return the range of matching user groups that the user has permission to view 355 * @throws SystemException if a system exception occurred 356 */ 357 public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId( 358 long companyId, int start, int end) 359 throws com.liferay.portal.kernel.exception.SystemException { 360 return getPersistence().filterFindByCompanyId(companyId, start, end); 361 } 362 363 /** 364 * Returns an ordered range of all the user groups that the user has permissions to view where companyId = ?. 365 * 366 * <p> 367 * 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. 368 * </p> 369 * 370 * @param companyId the company ID 371 * @param start the lower bound of the range of user groups 372 * @param end the upper bound of the range of user groups (not inclusive) 373 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 374 * @return the ordered range of matching user groups that the user has permission to view 375 * @throws SystemException if a system exception occurred 376 */ 377 public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId( 378 long companyId, int start, int end, 379 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 380 throws com.liferay.portal.kernel.exception.SystemException { 381 return getPersistence() 382 .filterFindByCompanyId(companyId, start, end, 383 orderByComparator); 384 } 385 386 /** 387 * Returns the user groups before and after the current user group in the ordered set of user groups that the user has permission to view where companyId = ?. 388 * 389 * @param userGroupId the primary key of the current user group 390 * @param companyId the company ID 391 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 392 * @return the previous, current, and next user group 393 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 394 * @throws SystemException if a system exception occurred 395 */ 396 public static com.liferay.portal.model.UserGroup[] filterFindByCompanyId_PrevAndNext( 397 long userGroupId, long companyId, 398 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 399 throws com.liferay.portal.NoSuchUserGroupException, 400 com.liferay.portal.kernel.exception.SystemException { 401 return getPersistence() 402 .filterFindByCompanyId_PrevAndNext(userGroupId, companyId, 403 orderByComparator); 404 } 405 406 /** 407 * Returns all the user groups where companyId = ? and parentUserGroupId = ?. 408 * 409 * @param companyId the company ID 410 * @param parentUserGroupId the parent user group ID 411 * @return the matching user groups 412 * @throws SystemException if a system exception occurred 413 */ 414 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P( 415 long companyId, long parentUserGroupId) 416 throws com.liferay.portal.kernel.exception.SystemException { 417 return getPersistence().findByC_P(companyId, parentUserGroupId); 418 } 419 420 /** 421 * Returns a range of all the user groups where companyId = ? and parentUserGroupId = ?. 422 * 423 * <p> 424 * 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. 425 * </p> 426 * 427 * @param companyId the company ID 428 * @param parentUserGroupId the parent user group ID 429 * @param start the lower bound of the range of user groups 430 * @param end the upper bound of the range of user groups (not inclusive) 431 * @return the range of matching user groups 432 * @throws SystemException if a system exception occurred 433 */ 434 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P( 435 long companyId, long parentUserGroupId, int start, int end) 436 throws com.liferay.portal.kernel.exception.SystemException { 437 return getPersistence() 438 .findByC_P(companyId, parentUserGroupId, start, end); 439 } 440 441 /** 442 * Returns an ordered range of all the user groups where companyId = ? and parentUserGroupId = ?. 443 * 444 * <p> 445 * 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. 446 * </p> 447 * 448 * @param companyId the company ID 449 * @param parentUserGroupId the parent user group ID 450 * @param start the lower bound of the range of user groups 451 * @param end the upper bound of the range of user groups (not inclusive) 452 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 453 * @return the ordered range of matching user groups 454 * @throws SystemException if a system exception occurred 455 */ 456 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P( 457 long companyId, long parentUserGroupId, int start, int end, 458 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 459 throws com.liferay.portal.kernel.exception.SystemException { 460 return getPersistence() 461 .findByC_P(companyId, parentUserGroupId, start, end, 462 orderByComparator); 463 } 464 465 /** 466 * Returns the first user group in the ordered set where companyId = ? and parentUserGroupId = ?. 467 * 468 * @param companyId the company ID 469 * @param parentUserGroupId the parent user group ID 470 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 471 * @return the first matching user group 472 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 473 * @throws SystemException if a system exception occurred 474 */ 475 public static com.liferay.portal.model.UserGroup findByC_P_First( 476 long companyId, long parentUserGroupId, 477 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 478 throws com.liferay.portal.NoSuchUserGroupException, 479 com.liferay.portal.kernel.exception.SystemException { 480 return getPersistence() 481 .findByC_P_First(companyId, parentUserGroupId, 482 orderByComparator); 483 } 484 485 /** 486 * Returns the first user group in the ordered set where companyId = ? and parentUserGroupId = ?. 487 * 488 * @param companyId the company ID 489 * @param parentUserGroupId the parent user group ID 490 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 491 * @return the first matching user group, or <code>null</code> if a matching user group could not be found 492 * @throws SystemException if a system exception occurred 493 */ 494 public static com.liferay.portal.model.UserGroup fetchByC_P_First( 495 long companyId, long parentUserGroupId, 496 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 497 throws com.liferay.portal.kernel.exception.SystemException { 498 return getPersistence() 499 .fetchByC_P_First(companyId, parentUserGroupId, 500 orderByComparator); 501 } 502 503 /** 504 * Returns the last user group in the ordered set where companyId = ? and parentUserGroupId = ?. 505 * 506 * @param companyId the company ID 507 * @param parentUserGroupId the parent user group ID 508 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 509 * @return the last matching user group 510 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 511 * @throws SystemException if a system exception occurred 512 */ 513 public static com.liferay.portal.model.UserGroup findByC_P_Last( 514 long companyId, long parentUserGroupId, 515 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 516 throws com.liferay.portal.NoSuchUserGroupException, 517 com.liferay.portal.kernel.exception.SystemException { 518 return getPersistence() 519 .findByC_P_Last(companyId, parentUserGroupId, 520 orderByComparator); 521 } 522 523 /** 524 * Returns the last user group in the ordered set where companyId = ? and parentUserGroupId = ?. 525 * 526 * @param companyId the company ID 527 * @param parentUserGroupId the parent user group ID 528 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 529 * @return the last matching user group, or <code>null</code> if a matching user group could not be found 530 * @throws SystemException if a system exception occurred 531 */ 532 public static com.liferay.portal.model.UserGroup fetchByC_P_Last( 533 long companyId, long parentUserGroupId, 534 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 535 throws com.liferay.portal.kernel.exception.SystemException { 536 return getPersistence() 537 .fetchByC_P_Last(companyId, parentUserGroupId, 538 orderByComparator); 539 } 540 541 /** 542 * Returns the user groups before and after the current user group in the ordered set where companyId = ? and parentUserGroupId = ?. 543 * 544 * @param userGroupId the primary key of the current user group 545 * @param companyId the company ID 546 * @param parentUserGroupId the parent user group ID 547 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 548 * @return the previous, current, and next user group 549 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 550 * @throws SystemException if a system exception occurred 551 */ 552 public static com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext( 553 long userGroupId, long companyId, long parentUserGroupId, 554 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 555 throws com.liferay.portal.NoSuchUserGroupException, 556 com.liferay.portal.kernel.exception.SystemException { 557 return getPersistence() 558 .findByC_P_PrevAndNext(userGroupId, companyId, 559 parentUserGroupId, orderByComparator); 560 } 561 562 /** 563 * Returns all the user groups that the user has permission to view where companyId = ? and parentUserGroupId = ?. 564 * 565 * @param companyId the company ID 566 * @param parentUserGroupId the parent user group ID 567 * @return the matching user groups that the user has permission to view 568 * @throws SystemException if a system exception occurred 569 */ 570 public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P( 571 long companyId, long parentUserGroupId) 572 throws com.liferay.portal.kernel.exception.SystemException { 573 return getPersistence().filterFindByC_P(companyId, parentUserGroupId); 574 } 575 576 /** 577 * Returns a range of all the user groups that the user has permission to view where companyId = ? and parentUserGroupId = ?. 578 * 579 * <p> 580 * 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. 581 * </p> 582 * 583 * @param companyId the company ID 584 * @param parentUserGroupId the parent user group ID 585 * @param start the lower bound of the range of user groups 586 * @param end the upper bound of the range of user groups (not inclusive) 587 * @return the range of matching user groups that the user has permission to view 588 * @throws SystemException if a system exception occurred 589 */ 590 public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P( 591 long companyId, long parentUserGroupId, int start, int end) 592 throws com.liferay.portal.kernel.exception.SystemException { 593 return getPersistence() 594 .filterFindByC_P(companyId, parentUserGroupId, start, end); 595 } 596 597 /** 598 * Returns an ordered range of all the user groups that the user has permissions to view where companyId = ? and parentUserGroupId = ?. 599 * 600 * <p> 601 * 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. 602 * </p> 603 * 604 * @param companyId the company ID 605 * @param parentUserGroupId the parent user group ID 606 * @param start the lower bound of the range of user groups 607 * @param end the upper bound of the range of user groups (not inclusive) 608 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 609 * @return the ordered range of matching user groups that the user has permission to view 610 * @throws SystemException if a system exception occurred 611 */ 612 public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P( 613 long companyId, long parentUserGroupId, int start, int end, 614 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 615 throws com.liferay.portal.kernel.exception.SystemException { 616 return getPersistence() 617 .filterFindByC_P(companyId, parentUserGroupId, start, end, 618 orderByComparator); 619 } 620 621 /** 622 * Returns the user groups before and after the current user group in the ordered set of user groups that the user has permission to view where companyId = ? and parentUserGroupId = ?. 623 * 624 * @param userGroupId the primary key of the current user group 625 * @param companyId the company ID 626 * @param parentUserGroupId the parent user group ID 627 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 628 * @return the previous, current, and next user group 629 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 630 * @throws SystemException if a system exception occurred 631 */ 632 public static com.liferay.portal.model.UserGroup[] filterFindByC_P_PrevAndNext( 633 long userGroupId, long companyId, long parentUserGroupId, 634 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 635 throws com.liferay.portal.NoSuchUserGroupException, 636 com.liferay.portal.kernel.exception.SystemException { 637 return getPersistence() 638 .filterFindByC_P_PrevAndNext(userGroupId, companyId, 639 parentUserGroupId, orderByComparator); 640 } 641 642 /** 643 * Returns the user group where companyId = ? and name = ? or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found. 644 * 645 * @param companyId the company ID 646 * @param name the name 647 * @return the matching user group 648 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 649 * @throws SystemException if a system exception occurred 650 */ 651 public static com.liferay.portal.model.UserGroup findByC_N(long companyId, 652 java.lang.String name) 653 throws com.liferay.portal.NoSuchUserGroupException, 654 com.liferay.portal.kernel.exception.SystemException { 655 return getPersistence().findByC_N(companyId, name); 656 } 657 658 /** 659 * Returns the user group where companyId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 660 * 661 * @param companyId the company ID 662 * @param name the name 663 * @return the matching user group, or <code>null</code> if a matching user group could not be found 664 * @throws SystemException if a system exception occurred 665 */ 666 public static com.liferay.portal.model.UserGroup fetchByC_N( 667 long companyId, java.lang.String name) 668 throws com.liferay.portal.kernel.exception.SystemException { 669 return getPersistence().fetchByC_N(companyId, name); 670 } 671 672 /** 673 * Returns the user group where companyId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 674 * 675 * @param companyId the company ID 676 * @param name the name 677 * @param retrieveFromCache whether to use the finder cache 678 * @return the matching user group, or <code>null</code> if a matching user group could not be found 679 * @throws SystemException if a system exception occurred 680 */ 681 public static com.liferay.portal.model.UserGroup fetchByC_N( 682 long companyId, java.lang.String name, boolean retrieveFromCache) 683 throws com.liferay.portal.kernel.exception.SystemException { 684 return getPersistence().fetchByC_N(companyId, name, retrieveFromCache); 685 } 686 687 /** 688 * Returns all the user groups. 689 * 690 * @return the user groups 691 * @throws SystemException if a system exception occurred 692 */ 693 public static java.util.List<com.liferay.portal.model.UserGroup> findAll() 694 throws com.liferay.portal.kernel.exception.SystemException { 695 return getPersistence().findAll(); 696 } 697 698 /** 699 * Returns a range of all the user groups. 700 * 701 * <p> 702 * 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. 703 * </p> 704 * 705 * @param start the lower bound of the range of user groups 706 * @param end the upper bound of the range of user groups (not inclusive) 707 * @return the range of user groups 708 * @throws SystemException if a system exception occurred 709 */ 710 public static java.util.List<com.liferay.portal.model.UserGroup> findAll( 711 int start, int end) 712 throws com.liferay.portal.kernel.exception.SystemException { 713 return getPersistence().findAll(start, end); 714 } 715 716 /** 717 * Returns an ordered range of all the user groups. 718 * 719 * <p> 720 * 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. 721 * </p> 722 * 723 * @param start the lower bound of the range of user groups 724 * @param end the upper bound of the range of user groups (not inclusive) 725 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 726 * @return the ordered range of user groups 727 * @throws SystemException if a system exception occurred 728 */ 729 public static java.util.List<com.liferay.portal.model.UserGroup> findAll( 730 int start, int end, 731 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 732 throws com.liferay.portal.kernel.exception.SystemException { 733 return getPersistence().findAll(start, end, orderByComparator); 734 } 735 736 /** 737 * Removes all the user groups where companyId = ? from the database. 738 * 739 * @param companyId the company ID 740 * @throws SystemException if a system exception occurred 741 */ 742 public static void removeByCompanyId(long companyId) 743 throws com.liferay.portal.kernel.exception.SystemException { 744 getPersistence().removeByCompanyId(companyId); 745 } 746 747 /** 748 * Removes all the user groups where companyId = ? and parentUserGroupId = ? from the database. 749 * 750 * @param companyId the company ID 751 * @param parentUserGroupId the parent user group ID 752 * @throws SystemException if a system exception occurred 753 */ 754 public static void removeByC_P(long companyId, long parentUserGroupId) 755 throws com.liferay.portal.kernel.exception.SystemException { 756 getPersistence().removeByC_P(companyId, parentUserGroupId); 757 } 758 759 /** 760 * Removes the user group where companyId = ? and name = ? from the database. 761 * 762 * @param companyId the company ID 763 * @param name the name 764 * @return the user group that was removed 765 * @throws SystemException if a system exception occurred 766 */ 767 public static com.liferay.portal.model.UserGroup removeByC_N( 768 long companyId, java.lang.String name) 769 throws com.liferay.portal.NoSuchUserGroupException, 770 com.liferay.portal.kernel.exception.SystemException { 771 return getPersistence().removeByC_N(companyId, name); 772 } 773 774 /** 775 * Removes all the user groups from the database. 776 * 777 * @throws SystemException if a system exception occurred 778 */ 779 public static void removeAll() 780 throws com.liferay.portal.kernel.exception.SystemException { 781 getPersistence().removeAll(); 782 } 783 784 /** 785 * Returns the number of user groups where companyId = ?. 786 * 787 * @param companyId the company ID 788 * @return the number of matching user groups 789 * @throws SystemException if a system exception occurred 790 */ 791 public static int countByCompanyId(long companyId) 792 throws com.liferay.portal.kernel.exception.SystemException { 793 return getPersistence().countByCompanyId(companyId); 794 } 795 796 /** 797 * Returns the number of user groups that the user has permission to view where companyId = ?. 798 * 799 * @param companyId the company ID 800 * @return the number of matching user groups that the user has permission to view 801 * @throws SystemException if a system exception occurred 802 */ 803 public static int filterCountByCompanyId(long companyId) 804 throws com.liferay.portal.kernel.exception.SystemException { 805 return getPersistence().filterCountByCompanyId(companyId); 806 } 807 808 /** 809 * Returns the number of user groups where companyId = ? and parentUserGroupId = ?. 810 * 811 * @param companyId the company ID 812 * @param parentUserGroupId the parent user group ID 813 * @return the number of matching user groups 814 * @throws SystemException if a system exception occurred 815 */ 816 public static int countByC_P(long companyId, long parentUserGroupId) 817 throws com.liferay.portal.kernel.exception.SystemException { 818 return getPersistence().countByC_P(companyId, parentUserGroupId); 819 } 820 821 /** 822 * Returns the number of user groups that the user has permission to view where companyId = ? and parentUserGroupId = ?. 823 * 824 * @param companyId the company ID 825 * @param parentUserGroupId the parent user group ID 826 * @return the number of matching user groups that the user has permission to view 827 * @throws SystemException if a system exception occurred 828 */ 829 public static int filterCountByC_P(long companyId, long parentUserGroupId) 830 throws com.liferay.portal.kernel.exception.SystemException { 831 return getPersistence().filterCountByC_P(companyId, parentUserGroupId); 832 } 833 834 /** 835 * Returns the number of user groups where companyId = ? and name = ?. 836 * 837 * @param companyId the company ID 838 * @param name the name 839 * @return the number of matching user groups 840 * @throws SystemException if a system exception occurred 841 */ 842 public static int countByC_N(long companyId, java.lang.String name) 843 throws com.liferay.portal.kernel.exception.SystemException { 844 return getPersistence().countByC_N(companyId, name); 845 } 846 847 /** 848 * Returns the number of user groups. 849 * 850 * @return the number of user groups 851 * @throws SystemException if a system exception occurred 852 */ 853 public static int countAll() 854 throws com.liferay.portal.kernel.exception.SystemException { 855 return getPersistence().countAll(); 856 } 857 858 /** 859 * Returns all the groups associated with the user group. 860 * 861 * @param pk the primary key of the user group 862 * @return the groups associated with the user group 863 * @throws SystemException if a system exception occurred 864 */ 865 public static java.util.List<com.liferay.portal.model.Group> getGroups( 866 long pk) throws com.liferay.portal.kernel.exception.SystemException { 867 return getPersistence().getGroups(pk); 868 } 869 870 /** 871 * Returns a range of all the groups associated with the user group. 872 * 873 * <p> 874 * 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. 875 * </p> 876 * 877 * @param pk the primary key of the user group 878 * @param start the lower bound of the range of user groups 879 * @param end the upper bound of the range of user groups (not inclusive) 880 * @return the range of groups associated with the user group 881 * @throws SystemException if a system exception occurred 882 */ 883 public static java.util.List<com.liferay.portal.model.Group> getGroups( 884 long pk, int start, int end) 885 throws com.liferay.portal.kernel.exception.SystemException { 886 return getPersistence().getGroups(pk, start, end); 887 } 888 889 /** 890 * Returns an ordered range of all the groups associated with the user group. 891 * 892 * <p> 893 * 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. 894 * </p> 895 * 896 * @param pk the primary key of the user group 897 * @param start the lower bound of the range of user groups 898 * @param end the upper bound of the range of user groups (not inclusive) 899 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 900 * @return the ordered range of groups associated with the user group 901 * @throws SystemException if a system exception occurred 902 */ 903 public static java.util.List<com.liferay.portal.model.Group> getGroups( 904 long pk, int start, int end, 905 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 906 throws com.liferay.portal.kernel.exception.SystemException { 907 return getPersistence().getGroups(pk, start, end, orderByComparator); 908 } 909 910 /** 911 * Returns the number of groups associated with the user group. 912 * 913 * @param pk the primary key of the user group 914 * @return the number of groups associated with the user group 915 * @throws SystemException if a system exception occurred 916 */ 917 public static int getGroupsSize(long pk) 918 throws com.liferay.portal.kernel.exception.SystemException { 919 return getPersistence().getGroupsSize(pk); 920 } 921 922 /** 923 * Returns <code>true</code> if the group is associated with the user group. 924 * 925 * @param pk the primary key of the user group 926 * @param groupPK the primary key of the group 927 * @return <code>true</code> if the group is associated with the user group; <code>false</code> otherwise 928 * @throws SystemException if a system exception occurred 929 */ 930 public static boolean containsGroup(long pk, long groupPK) 931 throws com.liferay.portal.kernel.exception.SystemException { 932 return getPersistence().containsGroup(pk, groupPK); 933 } 934 935 /** 936 * Returns <code>true</code> if the user group has any groups associated with it. 937 * 938 * @param pk the primary key of the user group to check for associations with groups 939 * @return <code>true</code> if the user group has any groups associated with it; <code>false</code> otherwise 940 * @throws SystemException if a system exception occurred 941 */ 942 public static boolean containsGroups(long pk) 943 throws com.liferay.portal.kernel.exception.SystemException { 944 return getPersistence().containsGroups(pk); 945 } 946 947 /** 948 * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 949 * 950 * @param pk the primary key of the user group 951 * @param groupPK the primary key of the group 952 * @throws SystemException if a system exception occurred 953 */ 954 public static void addGroup(long pk, long groupPK) 955 throws com.liferay.portal.kernel.exception.SystemException { 956 getPersistence().addGroup(pk, groupPK); 957 } 958 959 /** 960 * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 961 * 962 * @param pk the primary key of the user group 963 * @param group the group 964 * @throws SystemException if a system exception occurred 965 */ 966 public static void addGroup(long pk, com.liferay.portal.model.Group group) 967 throws com.liferay.portal.kernel.exception.SystemException { 968 getPersistence().addGroup(pk, group); 969 } 970 971 /** 972 * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 973 * 974 * @param pk the primary key of the user group 975 * @param groupPKs the primary keys of the groups 976 * @throws SystemException if a system exception occurred 977 */ 978 public static void addGroups(long pk, long[] groupPKs) 979 throws com.liferay.portal.kernel.exception.SystemException { 980 getPersistence().addGroups(pk, groupPKs); 981 } 982 983 /** 984 * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 985 * 986 * @param pk the primary key of the user group 987 * @param groups the groups 988 * @throws SystemException if a system exception occurred 989 */ 990 public static void addGroups(long pk, 991 java.util.List<com.liferay.portal.model.Group> groups) 992 throws com.liferay.portal.kernel.exception.SystemException { 993 getPersistence().addGroups(pk, groups); 994 } 995 996 /** 997 * Clears all associations between the user group and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 998 * 999 * @param pk the primary key of the user group to clear the associated groups from 1000 * @throws SystemException if a system exception occurred 1001 */ 1002 public static void clearGroups(long pk) 1003 throws com.liferay.portal.kernel.exception.SystemException { 1004 getPersistence().clearGroups(pk); 1005 } 1006 1007 /** 1008 * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1009 * 1010 * @param pk the primary key of the user group 1011 * @param groupPK the primary key of the group 1012 * @throws SystemException if a system exception occurred 1013 */ 1014 public static void removeGroup(long pk, long groupPK) 1015 throws com.liferay.portal.kernel.exception.SystemException { 1016 getPersistence().removeGroup(pk, groupPK); 1017 } 1018 1019 /** 1020 * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1021 * 1022 * @param pk the primary key of the user group 1023 * @param group the group 1024 * @throws SystemException if a system exception occurred 1025 */ 1026 public static void removeGroup(long pk, com.liferay.portal.model.Group group) 1027 throws com.liferay.portal.kernel.exception.SystemException { 1028 getPersistence().removeGroup(pk, group); 1029 } 1030 1031 /** 1032 * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1033 * 1034 * @param pk the primary key of the user group 1035 * @param groupPKs the primary keys of the groups 1036 * @throws SystemException if a system exception occurred 1037 */ 1038 public static void removeGroups(long pk, long[] groupPKs) 1039 throws com.liferay.portal.kernel.exception.SystemException { 1040 getPersistence().removeGroups(pk, groupPKs); 1041 } 1042 1043 /** 1044 * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1045 * 1046 * @param pk the primary key of the user group 1047 * @param groups the groups 1048 * @throws SystemException if a system exception occurred 1049 */ 1050 public static void removeGroups(long pk, 1051 java.util.List<com.liferay.portal.model.Group> groups) 1052 throws com.liferay.portal.kernel.exception.SystemException { 1053 getPersistence().removeGroups(pk, groups); 1054 } 1055 1056 /** 1057 * Sets the groups associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1058 * 1059 * @param pk the primary key of the user group 1060 * @param groupPKs the primary keys of the groups to be associated with the user group 1061 * @throws SystemException if a system exception occurred 1062 */ 1063 public static void setGroups(long pk, long[] groupPKs) 1064 throws com.liferay.portal.kernel.exception.SystemException { 1065 getPersistence().setGroups(pk, groupPKs); 1066 } 1067 1068 /** 1069 * Sets the groups associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1070 * 1071 * @param pk the primary key of the user group 1072 * @param groups the groups to be associated with the user group 1073 * @throws SystemException if a system exception occurred 1074 */ 1075 public static void setGroups(long pk, 1076 java.util.List<com.liferay.portal.model.Group> groups) 1077 throws com.liferay.portal.kernel.exception.SystemException { 1078 getPersistence().setGroups(pk, groups); 1079 } 1080 1081 /** 1082 * Returns all the teams associated with the user group. 1083 * 1084 * @param pk the primary key of the user group 1085 * @return the teams associated with the user group 1086 * @throws SystemException if a system exception occurred 1087 */ 1088 public static java.util.List<com.liferay.portal.model.Team> getTeams( 1089 long pk) throws com.liferay.portal.kernel.exception.SystemException { 1090 return getPersistence().getTeams(pk); 1091 } 1092 1093 /** 1094 * Returns a range of all the teams associated with the user group. 1095 * 1096 * <p> 1097 * 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. 1098 * </p> 1099 * 1100 * @param pk the primary key of the user group 1101 * @param start the lower bound of the range of user groups 1102 * @param end the upper bound of the range of user groups (not inclusive) 1103 * @return the range of teams associated with the user group 1104 * @throws SystemException if a system exception occurred 1105 */ 1106 public static java.util.List<com.liferay.portal.model.Team> getTeams( 1107 long pk, int start, int end) 1108 throws com.liferay.portal.kernel.exception.SystemException { 1109 return getPersistence().getTeams(pk, start, end); 1110 } 1111 1112 /** 1113 * Returns an ordered range of all the teams associated with the user group. 1114 * 1115 * <p> 1116 * 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. 1117 * </p> 1118 * 1119 * @param pk the primary key of the user group 1120 * @param start the lower bound of the range of user groups 1121 * @param end the upper bound of the range of user groups (not inclusive) 1122 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1123 * @return the ordered range of teams associated with the user group 1124 * @throws SystemException if a system exception occurred 1125 */ 1126 public static java.util.List<com.liferay.portal.model.Team> getTeams( 1127 long pk, int start, int end, 1128 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1129 throws com.liferay.portal.kernel.exception.SystemException { 1130 return getPersistence().getTeams(pk, start, end, orderByComparator); 1131 } 1132 1133 /** 1134 * Returns the number of teams associated with the user group. 1135 * 1136 * @param pk the primary key of the user group 1137 * @return the number of teams associated with the user group 1138 * @throws SystemException if a system exception occurred 1139 */ 1140 public static int getTeamsSize(long pk) 1141 throws com.liferay.portal.kernel.exception.SystemException { 1142 return getPersistence().getTeamsSize(pk); 1143 } 1144 1145 /** 1146 * Returns <code>true</code> if the team is associated with the user group. 1147 * 1148 * @param pk the primary key of the user group 1149 * @param teamPK the primary key of the team 1150 * @return <code>true</code> if the team is associated with the user group; <code>false</code> otherwise 1151 * @throws SystemException if a system exception occurred 1152 */ 1153 public static boolean containsTeam(long pk, long teamPK) 1154 throws com.liferay.portal.kernel.exception.SystemException { 1155 return getPersistence().containsTeam(pk, teamPK); 1156 } 1157 1158 /** 1159 * Returns <code>true</code> if the user group has any teams associated with it. 1160 * 1161 * @param pk the primary key of the user group to check for associations with teams 1162 * @return <code>true</code> if the user group has any teams associated with it; <code>false</code> otherwise 1163 * @throws SystemException if a system exception occurred 1164 */ 1165 public static boolean containsTeams(long pk) 1166 throws com.liferay.portal.kernel.exception.SystemException { 1167 return getPersistence().containsTeams(pk); 1168 } 1169 1170 /** 1171 * Adds an association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1172 * 1173 * @param pk the primary key of the user group 1174 * @param teamPK the primary key of the team 1175 * @throws SystemException if a system exception occurred 1176 */ 1177 public static void addTeam(long pk, long teamPK) 1178 throws com.liferay.portal.kernel.exception.SystemException { 1179 getPersistence().addTeam(pk, teamPK); 1180 } 1181 1182 /** 1183 * Adds an association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1184 * 1185 * @param pk the primary key of the user group 1186 * @param team the team 1187 * @throws SystemException if a system exception occurred 1188 */ 1189 public static void addTeam(long pk, com.liferay.portal.model.Team team) 1190 throws com.liferay.portal.kernel.exception.SystemException { 1191 getPersistence().addTeam(pk, team); 1192 } 1193 1194 /** 1195 * Adds an association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1196 * 1197 * @param pk the primary key of the user group 1198 * @param teamPKs the primary keys of the teams 1199 * @throws SystemException if a system exception occurred 1200 */ 1201 public static void addTeams(long pk, long[] teamPKs) 1202 throws com.liferay.portal.kernel.exception.SystemException { 1203 getPersistence().addTeams(pk, teamPKs); 1204 } 1205 1206 /** 1207 * Adds an association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1208 * 1209 * @param pk the primary key of the user group 1210 * @param teams the teams 1211 * @throws SystemException if a system exception occurred 1212 */ 1213 public static void addTeams(long pk, 1214 java.util.List<com.liferay.portal.model.Team> teams) 1215 throws com.liferay.portal.kernel.exception.SystemException { 1216 getPersistence().addTeams(pk, teams); 1217 } 1218 1219 /** 1220 * Clears all associations between the user group and its teams. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1221 * 1222 * @param pk the primary key of the user group to clear the associated teams from 1223 * @throws SystemException if a system exception occurred 1224 */ 1225 public static void clearTeams(long pk) 1226 throws com.liferay.portal.kernel.exception.SystemException { 1227 getPersistence().clearTeams(pk); 1228 } 1229 1230 /** 1231 * Removes the association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1232 * 1233 * @param pk the primary key of the user group 1234 * @param teamPK the primary key of the team 1235 * @throws SystemException if a system exception occurred 1236 */ 1237 public static void removeTeam(long pk, long teamPK) 1238 throws com.liferay.portal.kernel.exception.SystemException { 1239 getPersistence().removeTeam(pk, teamPK); 1240 } 1241 1242 /** 1243 * Removes the association between the user group and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1244 * 1245 * @param pk the primary key of the user group 1246 * @param team the team 1247 * @throws SystemException if a system exception occurred 1248 */ 1249 public static void removeTeam(long pk, com.liferay.portal.model.Team team) 1250 throws com.liferay.portal.kernel.exception.SystemException { 1251 getPersistence().removeTeam(pk, team); 1252 } 1253 1254 /** 1255 * Removes the association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1256 * 1257 * @param pk the primary key of the user group 1258 * @param teamPKs the primary keys of the teams 1259 * @throws SystemException if a system exception occurred 1260 */ 1261 public static void removeTeams(long pk, long[] teamPKs) 1262 throws com.liferay.portal.kernel.exception.SystemException { 1263 getPersistence().removeTeams(pk, teamPKs); 1264 } 1265 1266 /** 1267 * Removes the association between the user group and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1268 * 1269 * @param pk the primary key of the user group 1270 * @param teams the teams 1271 * @throws SystemException if a system exception occurred 1272 */ 1273 public static void removeTeams(long pk, 1274 java.util.List<com.liferay.portal.model.Team> teams) 1275 throws com.liferay.portal.kernel.exception.SystemException { 1276 getPersistence().removeTeams(pk, teams); 1277 } 1278 1279 /** 1280 * Sets the teams associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1281 * 1282 * @param pk the primary key of the user group 1283 * @param teamPKs the primary keys of the teams to be associated with the user group 1284 * @throws SystemException if a system exception occurred 1285 */ 1286 public static void setTeams(long pk, long[] teamPKs) 1287 throws com.liferay.portal.kernel.exception.SystemException { 1288 getPersistence().setTeams(pk, teamPKs); 1289 } 1290 1291 /** 1292 * Sets the teams associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1293 * 1294 * @param pk the primary key of the user group 1295 * @param teams the teams to be associated with the user group 1296 * @throws SystemException if a system exception occurred 1297 */ 1298 public static void setTeams(long pk, 1299 java.util.List<com.liferay.portal.model.Team> teams) 1300 throws com.liferay.portal.kernel.exception.SystemException { 1301 getPersistence().setTeams(pk, teams); 1302 } 1303 1304 /** 1305 * Returns all the users associated with the user group. 1306 * 1307 * @param pk the primary key of the user group 1308 * @return the users associated with the user group 1309 * @throws SystemException if a system exception occurred 1310 */ 1311 public static java.util.List<com.liferay.portal.model.User> getUsers( 1312 long pk) throws com.liferay.portal.kernel.exception.SystemException { 1313 return getPersistence().getUsers(pk); 1314 } 1315 1316 /** 1317 * Returns a range of all the users associated with the user group. 1318 * 1319 * <p> 1320 * 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. 1321 * </p> 1322 * 1323 * @param pk the primary key of the user group 1324 * @param start the lower bound of the range of user groups 1325 * @param end the upper bound of the range of user groups (not inclusive) 1326 * @return the range of users associated with the user group 1327 * @throws SystemException if a system exception occurred 1328 */ 1329 public static java.util.List<com.liferay.portal.model.User> getUsers( 1330 long pk, int start, int end) 1331 throws com.liferay.portal.kernel.exception.SystemException { 1332 return getPersistence().getUsers(pk, start, end); 1333 } 1334 1335 /** 1336 * Returns an ordered range of all the users associated with the user group. 1337 * 1338 * <p> 1339 * 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. 1340 * </p> 1341 * 1342 * @param pk the primary key of the user group 1343 * @param start the lower bound of the range of user groups 1344 * @param end the upper bound of the range of user groups (not inclusive) 1345 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1346 * @return the ordered range of users associated with the user group 1347 * @throws SystemException if a system exception occurred 1348 */ 1349 public static java.util.List<com.liferay.portal.model.User> getUsers( 1350 long pk, int start, int end, 1351 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1352 throws com.liferay.portal.kernel.exception.SystemException { 1353 return getPersistence().getUsers(pk, start, end, orderByComparator); 1354 } 1355 1356 /** 1357 * Returns the number of users associated with the user group. 1358 * 1359 * @param pk the primary key of the user group 1360 * @return the number of users associated with the user group 1361 * @throws SystemException if a system exception occurred 1362 */ 1363 public static int getUsersSize(long pk) 1364 throws com.liferay.portal.kernel.exception.SystemException { 1365 return getPersistence().getUsersSize(pk); 1366 } 1367 1368 /** 1369 * Returns <code>true</code> if the user is associated with the user group. 1370 * 1371 * @param pk the primary key of the user group 1372 * @param userPK the primary key of the user 1373 * @return <code>true</code> if the user is associated with the user group; <code>false</code> otherwise 1374 * @throws SystemException if a system exception occurred 1375 */ 1376 public static boolean containsUser(long pk, long userPK) 1377 throws com.liferay.portal.kernel.exception.SystemException { 1378 return getPersistence().containsUser(pk, userPK); 1379 } 1380 1381 /** 1382 * Returns <code>true</code> if the user group has any users associated with it. 1383 * 1384 * @param pk the primary key of the user group to check for associations with users 1385 * @return <code>true</code> if the user group has any users associated with it; <code>false</code> otherwise 1386 * @throws SystemException if a system exception occurred 1387 */ 1388 public static boolean containsUsers(long pk) 1389 throws com.liferay.portal.kernel.exception.SystemException { 1390 return getPersistence().containsUsers(pk); 1391 } 1392 1393 /** 1394 * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1395 * 1396 * @param pk the primary key of the user group 1397 * @param userPK the primary key of the user 1398 * @throws SystemException if a system exception occurred 1399 */ 1400 public static void addUser(long pk, long userPK) 1401 throws com.liferay.portal.kernel.exception.SystemException { 1402 getPersistence().addUser(pk, userPK); 1403 } 1404 1405 /** 1406 * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1407 * 1408 * @param pk the primary key of the user group 1409 * @param user the user 1410 * @throws SystemException if a system exception occurred 1411 */ 1412 public static void addUser(long pk, com.liferay.portal.model.User user) 1413 throws com.liferay.portal.kernel.exception.SystemException { 1414 getPersistence().addUser(pk, user); 1415 } 1416 1417 /** 1418 * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1419 * 1420 * @param pk the primary key of the user group 1421 * @param userPKs the primary keys of the users 1422 * @throws SystemException if a system exception occurred 1423 */ 1424 public static void addUsers(long pk, long[] userPKs) 1425 throws com.liferay.portal.kernel.exception.SystemException { 1426 getPersistence().addUsers(pk, userPKs); 1427 } 1428 1429 /** 1430 * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1431 * 1432 * @param pk the primary key of the user group 1433 * @param users the users 1434 * @throws SystemException if a system exception occurred 1435 */ 1436 public static void addUsers(long pk, 1437 java.util.List<com.liferay.portal.model.User> users) 1438 throws com.liferay.portal.kernel.exception.SystemException { 1439 getPersistence().addUsers(pk, users); 1440 } 1441 1442 /** 1443 * Clears all associations between the user group and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1444 * 1445 * @param pk the primary key of the user group to clear the associated users from 1446 * @throws SystemException if a system exception occurred 1447 */ 1448 public static void clearUsers(long pk) 1449 throws com.liferay.portal.kernel.exception.SystemException { 1450 getPersistence().clearUsers(pk); 1451 } 1452 1453 /** 1454 * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1455 * 1456 * @param pk the primary key of the user group 1457 * @param userPK the primary key of the user 1458 * @throws SystemException if a system exception occurred 1459 */ 1460 public static void removeUser(long pk, long userPK) 1461 throws com.liferay.portal.kernel.exception.SystemException { 1462 getPersistence().removeUser(pk, userPK); 1463 } 1464 1465 /** 1466 * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1467 * 1468 * @param pk the primary key of the user group 1469 * @param user the user 1470 * @throws SystemException if a system exception occurred 1471 */ 1472 public static void removeUser(long pk, com.liferay.portal.model.User user) 1473 throws com.liferay.portal.kernel.exception.SystemException { 1474 getPersistence().removeUser(pk, user); 1475 } 1476 1477 /** 1478 * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1479 * 1480 * @param pk the primary key of the user group 1481 * @param userPKs the primary keys of the users 1482 * @throws SystemException if a system exception occurred 1483 */ 1484 public static void removeUsers(long pk, long[] userPKs) 1485 throws com.liferay.portal.kernel.exception.SystemException { 1486 getPersistence().removeUsers(pk, userPKs); 1487 } 1488 1489 /** 1490 * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1491 * 1492 * @param pk the primary key of the user group 1493 * @param users the users 1494 * @throws SystemException if a system exception occurred 1495 */ 1496 public static void removeUsers(long pk, 1497 java.util.List<com.liferay.portal.model.User> users) 1498 throws com.liferay.portal.kernel.exception.SystemException { 1499 getPersistence().removeUsers(pk, users); 1500 } 1501 1502 /** 1503 * Sets the users associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1504 * 1505 * @param pk the primary key of the user group 1506 * @param userPKs the primary keys of the users to be associated with the user group 1507 * @throws SystemException if a system exception occurred 1508 */ 1509 public static void setUsers(long pk, long[] userPKs) 1510 throws com.liferay.portal.kernel.exception.SystemException { 1511 getPersistence().setUsers(pk, userPKs); 1512 } 1513 1514 /** 1515 * Sets the users associated with the user group, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1516 * 1517 * @param pk the primary key of the user group 1518 * @param users the users to be associated with the user group 1519 * @throws SystemException if a system exception occurred 1520 */ 1521 public static void setUsers(long pk, 1522 java.util.List<com.liferay.portal.model.User> users) 1523 throws com.liferay.portal.kernel.exception.SystemException { 1524 getPersistence().setUsers(pk, users); 1525 } 1526 1527 public static UserGroupPersistence getPersistence() { 1528 if (_persistence == null) { 1529 _persistence = (UserGroupPersistence)PortalBeanLocatorUtil.locate(UserGroupPersistence.class.getName()); 1530 1531 ReferenceRegistry.registerReference(UserGroupUtil.class, 1532 "_persistence"); 1533 } 1534 1535 return _persistence; 1536 } 1537 1538 /** 1539 * @deprecated 1540 */ 1541 public void setPersistence(UserGroupPersistence persistence) { 1542 } 1543 1544 private static UserGroupPersistence _persistence; 1545 }