001 /** 002 * Copyright (c) 2000-2011 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.model.UserGroup; 022 import com.liferay.portal.service.ServiceContext; 023 024 import java.util.List; 025 026 /** 027 * 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. 028 * 029 * <p> 030 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 031 * </p> 032 * 033 * <p> 034 * Caching information and settings can be found in <code>portal.properties</code> 035 * </p> 036 * 037 * @author Brian Wing Shun Chan 038 * @see UserGroupPersistence 039 * @see UserGroupPersistenceImpl 040 * @generated 041 */ 042 public class UserGroupUtil { 043 /** 044 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 045 */ 046 public static void clearCache() { 047 getPersistence().clearCache(); 048 } 049 050 /** 051 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 052 */ 053 public static void clearCache(UserGroup userGroup) { 054 getPersistence().clearCache(userGroup); 055 } 056 057 /** 058 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 059 */ 060 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 061 throws SystemException { 062 return getPersistence().countWithDynamicQuery(dynamicQuery); 063 } 064 065 /** 066 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 067 */ 068 public static List<UserGroup> findWithDynamicQuery( 069 DynamicQuery dynamicQuery) throws SystemException { 070 return getPersistence().findWithDynamicQuery(dynamicQuery); 071 } 072 073 /** 074 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 075 */ 076 public static List<UserGroup> findWithDynamicQuery( 077 DynamicQuery dynamicQuery, int start, int end) 078 throws SystemException { 079 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 080 } 081 082 /** 083 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 084 */ 085 public static List<UserGroup> findWithDynamicQuery( 086 DynamicQuery dynamicQuery, int start, int end, 087 OrderByComparator orderByComparator) throws SystemException { 088 return getPersistence() 089 .findWithDynamicQuery(dynamicQuery, start, end, 090 orderByComparator); 091 } 092 093 /** 094 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 095 */ 096 public static UserGroup remove(UserGroup userGroup) 097 throws SystemException { 098 return getPersistence().remove(userGroup); 099 } 100 101 /** 102 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 103 */ 104 public static UserGroup update(UserGroup userGroup, boolean merge) 105 throws SystemException { 106 return getPersistence().update(userGroup, merge); 107 } 108 109 /** 110 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 111 */ 112 public static UserGroup update(UserGroup userGroup, boolean merge, 113 ServiceContext serviceContext) throws SystemException { 114 return getPersistence().update(userGroup, merge, serviceContext); 115 } 116 117 /** 118 * Caches the user group in the entity cache if it is enabled. 119 * 120 * @param userGroup the user group to cache 121 */ 122 public static void cacheResult(com.liferay.portal.model.UserGroup userGroup) { 123 getPersistence().cacheResult(userGroup); 124 } 125 126 /** 127 * Caches the user groups in the entity cache if it is enabled. 128 * 129 * @param userGroups the user groups to cache 130 */ 131 public static void cacheResult( 132 java.util.List<com.liferay.portal.model.UserGroup> userGroups) { 133 getPersistence().cacheResult(userGroups); 134 } 135 136 /** 137 * Creates a new user group with the primary key. Does not add the user group to the database. 138 * 139 * @param userGroupId the primary key for the new user group 140 * @return the new user group 141 */ 142 public static com.liferay.portal.model.UserGroup create(long userGroupId) { 143 return getPersistence().create(userGroupId); 144 } 145 146 /** 147 * Removes the user group with the primary key from the database. Also notifies the appropriate model listeners. 148 * 149 * @param userGroupId the primary key of the user group to remove 150 * @return the user group that was removed 151 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 152 * @throws SystemException if a system exception occurred 153 */ 154 public static com.liferay.portal.model.UserGroup remove(long userGroupId) 155 throws com.liferay.portal.NoSuchUserGroupException, 156 com.liferay.portal.kernel.exception.SystemException { 157 return getPersistence().remove(userGroupId); 158 } 159 160 public static com.liferay.portal.model.UserGroup updateImpl( 161 com.liferay.portal.model.UserGroup userGroup, boolean merge) 162 throws com.liferay.portal.kernel.exception.SystemException { 163 return getPersistence().updateImpl(userGroup, merge); 164 } 165 166 /** 167 * Finds the user group with the primary key or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found. 168 * 169 * @param userGroupId the primary key of the user group to find 170 * @return the user group 171 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 172 * @throws SystemException if a system exception occurred 173 */ 174 public static com.liferay.portal.model.UserGroup findByPrimaryKey( 175 long userGroupId) 176 throws com.liferay.portal.NoSuchUserGroupException, 177 com.liferay.portal.kernel.exception.SystemException { 178 return getPersistence().findByPrimaryKey(userGroupId); 179 } 180 181 /** 182 * Finds the user group with the primary key or returns <code>null</code> if it could not be found. 183 * 184 * @param userGroupId the primary key of the user group to find 185 * @return the user group, or <code>null</code> if a user group with the primary key could not be found 186 * @throws SystemException if a system exception occurred 187 */ 188 public static com.liferay.portal.model.UserGroup fetchByPrimaryKey( 189 long userGroupId) 190 throws com.liferay.portal.kernel.exception.SystemException { 191 return getPersistence().fetchByPrimaryKey(userGroupId); 192 } 193 194 /** 195 * Finds all the user groups where companyId = ?. 196 * 197 * @param companyId the company id to search with 198 * @return the matching user groups 199 * @throws SystemException if a system exception occurred 200 */ 201 public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId( 202 long companyId) 203 throws com.liferay.portal.kernel.exception.SystemException { 204 return getPersistence().findByCompanyId(companyId); 205 } 206 207 /** 208 * Finds a range of all the user groups where companyId = ?. 209 * 210 * <p> 211 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 212 * </p> 213 * 214 * @param companyId the company id to search with 215 * @param start the lower bound of the range of user groups to return 216 * @param end the upper bound of the range of user groups to return (not inclusive) 217 * @return the range of matching user groups 218 * @throws SystemException if a system exception occurred 219 */ 220 public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId( 221 long companyId, int start, int end) 222 throws com.liferay.portal.kernel.exception.SystemException { 223 return getPersistence().findByCompanyId(companyId, start, end); 224 } 225 226 /** 227 * Finds an ordered range of all the user groups where companyId = ?. 228 * 229 * <p> 230 * 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. 231 * </p> 232 * 233 * @param companyId the company id to search with 234 * @param start the lower bound of the range of user groups to return 235 * @param end the upper bound of the range of user groups to return (not inclusive) 236 * @param orderByComparator the comparator to order the results by 237 * @return the ordered range of matching user groups 238 * @throws SystemException if a system exception occurred 239 */ 240 public static java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId( 241 long companyId, int start, int end, 242 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 243 throws com.liferay.portal.kernel.exception.SystemException { 244 return getPersistence() 245 .findByCompanyId(companyId, start, end, orderByComparator); 246 } 247 248 /** 249 * Finds the first user group in the ordered set where companyId = ?. 250 * 251 * <p> 252 * 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. 253 * </p> 254 * 255 * @param companyId the company id to search with 256 * @param orderByComparator the comparator to order the set by 257 * @return the first matching user group 258 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 259 * @throws SystemException if a system exception occurred 260 */ 261 public static com.liferay.portal.model.UserGroup findByCompanyId_First( 262 long companyId, 263 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 264 throws com.liferay.portal.NoSuchUserGroupException, 265 com.liferay.portal.kernel.exception.SystemException { 266 return getPersistence() 267 .findByCompanyId_First(companyId, orderByComparator); 268 } 269 270 /** 271 * Finds the last user group in the ordered set where companyId = ?. 272 * 273 * <p> 274 * 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. 275 * </p> 276 * 277 * @param companyId the company id to search with 278 * @param orderByComparator the comparator to order the set by 279 * @return the last matching user group 280 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 281 * @throws SystemException if a system exception occurred 282 */ 283 public static com.liferay.portal.model.UserGroup findByCompanyId_Last( 284 long companyId, 285 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 286 throws com.liferay.portal.NoSuchUserGroupException, 287 com.liferay.portal.kernel.exception.SystemException { 288 return getPersistence() 289 .findByCompanyId_Last(companyId, orderByComparator); 290 } 291 292 /** 293 * Finds the user groups before and after the current user group in the ordered set where companyId = ?. 294 * 295 * <p> 296 * 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. 297 * </p> 298 * 299 * @param userGroupId the primary key of the current user group 300 * @param companyId the company id to search with 301 * @param orderByComparator the comparator to order the set by 302 * @return the previous, current, and next user group 303 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 304 * @throws SystemException if a system exception occurred 305 */ 306 public static com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext( 307 long userGroupId, long companyId, 308 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 309 throws com.liferay.portal.NoSuchUserGroupException, 310 com.liferay.portal.kernel.exception.SystemException { 311 return getPersistence() 312 .findByCompanyId_PrevAndNext(userGroupId, companyId, 313 orderByComparator); 314 } 315 316 /** 317 * Filters by the user's permissions and finds all the user groups where companyId = ?. 318 * 319 * @param companyId the company id to search with 320 * @return the matching user groups that the user has permission to view 321 * @throws SystemException if a system exception occurred 322 */ 323 public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId( 324 long companyId) 325 throws com.liferay.portal.kernel.exception.SystemException { 326 return getPersistence().filterFindByCompanyId(companyId); 327 } 328 329 /** 330 * Filters by the user's permissions and finds a range of all the user groups where companyId = ?. 331 * 332 * <p> 333 * 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. 334 * </p> 335 * 336 * @param companyId the company id to search with 337 * @param start the lower bound of the range of user groups to return 338 * @param end the upper bound of the range of user groups to return (not inclusive) 339 * @return the range of matching user groups that the user has permission to view 340 * @throws SystemException if a system exception occurred 341 */ 342 public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId( 343 long companyId, int start, int end) 344 throws com.liferay.portal.kernel.exception.SystemException { 345 return getPersistence().filterFindByCompanyId(companyId, start, end); 346 } 347 348 /** 349 * Filters by the user's permissions and finds an ordered range of all the user groups where companyId = ?. 350 * 351 * <p> 352 * 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. 353 * </p> 354 * 355 * @param companyId the company id to search with 356 * @param start the lower bound of the range of user groups to return 357 * @param end the upper bound of the range of user groups to return (not inclusive) 358 * @param orderByComparator the comparator to order the results by 359 * @return the ordered range of matching user groups that the user has permission to view 360 * @throws SystemException if a system exception occurred 361 */ 362 public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByCompanyId( 363 long companyId, int start, int end, 364 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 365 throws com.liferay.portal.kernel.exception.SystemException { 366 return getPersistence() 367 .filterFindByCompanyId(companyId, start, end, 368 orderByComparator); 369 } 370 371 /** 372 * Finds all the user groups where companyId = ? and parentUserGroupId = ?. 373 * 374 * @param companyId the company id to search with 375 * @param parentUserGroupId the parent user group id to search with 376 * @return the matching user groups 377 * @throws SystemException if a system exception occurred 378 */ 379 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P( 380 long companyId, long parentUserGroupId) 381 throws com.liferay.portal.kernel.exception.SystemException { 382 return getPersistence().findByC_P(companyId, parentUserGroupId); 383 } 384 385 /** 386 * Finds a range of all the user groups where companyId = ? and parentUserGroupId = ?. 387 * 388 * <p> 389 * 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. 390 * </p> 391 * 392 * @param companyId the company id to search with 393 * @param parentUserGroupId the parent user group id to search with 394 * @param start the lower bound of the range of user groups to return 395 * @param end the upper bound of the range of user groups to return (not inclusive) 396 * @return the range of matching user groups 397 * @throws SystemException if a system exception occurred 398 */ 399 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P( 400 long companyId, long parentUserGroupId, int start, int end) 401 throws com.liferay.portal.kernel.exception.SystemException { 402 return getPersistence() 403 .findByC_P(companyId, parentUserGroupId, start, end); 404 } 405 406 /** 407 * Finds an ordered range of all the user groups where companyId = ? and parentUserGroupId = ?. 408 * 409 * <p> 410 * 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. 411 * </p> 412 * 413 * @param companyId the company id to search with 414 * @param parentUserGroupId the parent user group id to search with 415 * @param start the lower bound of the range of user groups to return 416 * @param end the upper bound of the range of user groups to return (not inclusive) 417 * @param orderByComparator the comparator to order the results by 418 * @return the ordered range of matching user groups 419 * @throws SystemException if a system exception occurred 420 */ 421 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P( 422 long companyId, long parentUserGroupId, int start, int end, 423 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 424 throws com.liferay.portal.kernel.exception.SystemException { 425 return getPersistence() 426 .findByC_P(companyId, parentUserGroupId, start, end, 427 orderByComparator); 428 } 429 430 /** 431 * Finds the first user group in the ordered set where companyId = ? and parentUserGroupId = ?. 432 * 433 * <p> 434 * 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. 435 * </p> 436 * 437 * @param companyId the company id to search with 438 * @param parentUserGroupId the parent user group id to search with 439 * @param orderByComparator the comparator to order the set by 440 * @return the first matching user group 441 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 442 * @throws SystemException if a system exception occurred 443 */ 444 public static com.liferay.portal.model.UserGroup findByC_P_First( 445 long companyId, long parentUserGroupId, 446 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 447 throws com.liferay.portal.NoSuchUserGroupException, 448 com.liferay.portal.kernel.exception.SystemException { 449 return getPersistence() 450 .findByC_P_First(companyId, parentUserGroupId, 451 orderByComparator); 452 } 453 454 /** 455 * Finds the last user group in the ordered set where companyId = ? and parentUserGroupId = ?. 456 * 457 * <p> 458 * 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. 459 * </p> 460 * 461 * @param companyId the company id to search with 462 * @param parentUserGroupId the parent user group id to search with 463 * @param orderByComparator the comparator to order the set by 464 * @return the last matching user group 465 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 466 * @throws SystemException if a system exception occurred 467 */ 468 public static com.liferay.portal.model.UserGroup findByC_P_Last( 469 long companyId, long parentUserGroupId, 470 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 471 throws com.liferay.portal.NoSuchUserGroupException, 472 com.liferay.portal.kernel.exception.SystemException { 473 return getPersistence() 474 .findByC_P_Last(companyId, parentUserGroupId, 475 orderByComparator); 476 } 477 478 /** 479 * Finds the user groups before and after the current user group in the ordered set where companyId = ? and parentUserGroupId = ?. 480 * 481 * <p> 482 * 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. 483 * </p> 484 * 485 * @param userGroupId the primary key of the current user group 486 * @param companyId the company id to search with 487 * @param parentUserGroupId the parent user group id to search with 488 * @param orderByComparator the comparator to order the set by 489 * @return the previous, current, and next user group 490 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 491 * @throws SystemException if a system exception occurred 492 */ 493 public static com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext( 494 long userGroupId, long companyId, long parentUserGroupId, 495 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 496 throws com.liferay.portal.NoSuchUserGroupException, 497 com.liferay.portal.kernel.exception.SystemException { 498 return getPersistence() 499 .findByC_P_PrevAndNext(userGroupId, companyId, 500 parentUserGroupId, orderByComparator); 501 } 502 503 /** 504 * Filters by the user's permissions and finds all the user groups where companyId = ? and parentUserGroupId = ?. 505 * 506 * @param companyId the company id to search with 507 * @param parentUserGroupId the parent user group id to search with 508 * @return the matching user groups that the user has permission to view 509 * @throws SystemException if a system exception occurred 510 */ 511 public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P( 512 long companyId, long parentUserGroupId) 513 throws com.liferay.portal.kernel.exception.SystemException { 514 return getPersistence().filterFindByC_P(companyId, parentUserGroupId); 515 } 516 517 /** 518 * Filters by the user's permissions and finds a range of all the user groups where companyId = ? and parentUserGroupId = ?. 519 * 520 * <p> 521 * 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. 522 * </p> 523 * 524 * @param companyId the company id to search with 525 * @param parentUserGroupId the parent user group id to search with 526 * @param start the lower bound of the range of user groups to return 527 * @param end the upper bound of the range of user groups to return (not inclusive) 528 * @return the range of matching user groups that the user has permission to view 529 * @throws SystemException if a system exception occurred 530 */ 531 public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P( 532 long companyId, long parentUserGroupId, int start, int end) 533 throws com.liferay.portal.kernel.exception.SystemException { 534 return getPersistence() 535 .filterFindByC_P(companyId, parentUserGroupId, start, end); 536 } 537 538 /** 539 * Filters by the user's permissions and finds an ordered range of all the user groups where companyId = ? and parentUserGroupId = ?. 540 * 541 * <p> 542 * 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. 543 * </p> 544 * 545 * @param companyId the company id to search with 546 * @param parentUserGroupId the parent user group id to search with 547 * @param start the lower bound of the range of user groups to return 548 * @param end the upper bound of the range of user groups to return (not inclusive) 549 * @param orderByComparator the comparator to order the results by 550 * @return the ordered range of matching user groups that the user has permission to view 551 * @throws SystemException if a system exception occurred 552 */ 553 public static java.util.List<com.liferay.portal.model.UserGroup> filterFindByC_P( 554 long companyId, long parentUserGroupId, int start, int end, 555 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 556 throws com.liferay.portal.kernel.exception.SystemException { 557 return getPersistence() 558 .filterFindByC_P(companyId, parentUserGroupId, start, end, 559 orderByComparator); 560 } 561 562 /** 563 * Finds the user group where companyId = ? and name = ? or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found. 564 * 565 * @param companyId the company id to search with 566 * @param name the name to search with 567 * @return the matching user group 568 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 569 * @throws SystemException if a system exception occurred 570 */ 571 public static com.liferay.portal.model.UserGroup findByC_N(long companyId, 572 java.lang.String name) 573 throws com.liferay.portal.NoSuchUserGroupException, 574 com.liferay.portal.kernel.exception.SystemException { 575 return getPersistence().findByC_N(companyId, name); 576 } 577 578 /** 579 * Finds the user group where companyId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 580 * 581 * @param companyId the company id to search with 582 * @param name the name to search with 583 * @return the matching user group, or <code>null</code> if a matching user group could not be found 584 * @throws SystemException if a system exception occurred 585 */ 586 public static com.liferay.portal.model.UserGroup fetchByC_N( 587 long companyId, java.lang.String name) 588 throws com.liferay.portal.kernel.exception.SystemException { 589 return getPersistence().fetchByC_N(companyId, name); 590 } 591 592 /** 593 * Finds the user group where companyId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 594 * 595 * @param companyId the company id to search with 596 * @param name the name to search with 597 * @return the matching user group, or <code>null</code> if a matching user group could not be found 598 * @throws SystemException if a system exception occurred 599 */ 600 public static com.liferay.portal.model.UserGroup fetchByC_N( 601 long companyId, java.lang.String name, boolean retrieveFromCache) 602 throws com.liferay.portal.kernel.exception.SystemException { 603 return getPersistence().fetchByC_N(companyId, name, retrieveFromCache); 604 } 605 606 /** 607 * Finds all the user groups. 608 * 609 * @return the user groups 610 * @throws SystemException if a system exception occurred 611 */ 612 public static java.util.List<com.liferay.portal.model.UserGroup> findAll() 613 throws com.liferay.portal.kernel.exception.SystemException { 614 return getPersistence().findAll(); 615 } 616 617 /** 618 * Finds a range of all the user groups. 619 * 620 * <p> 621 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 622 * </p> 623 * 624 * @param start the lower bound of the range of user groups to return 625 * @param end the upper bound of the range of user groups to return (not inclusive) 626 * @return the range of user groups 627 * @throws SystemException if a system exception occurred 628 */ 629 public static java.util.List<com.liferay.portal.model.UserGroup> findAll( 630 int start, int end) 631 throws com.liferay.portal.kernel.exception.SystemException { 632 return getPersistence().findAll(start, end); 633 } 634 635 /** 636 * Finds an ordered range of all the user groups. 637 * 638 * <p> 639 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 640 * </p> 641 * 642 * @param start the lower bound of the range of user groups to return 643 * @param end the upper bound of the range of user groups to return (not inclusive) 644 * @param orderByComparator the comparator to order the results by 645 * @return the ordered range of user groups 646 * @throws SystemException if a system exception occurred 647 */ 648 public static java.util.List<com.liferay.portal.model.UserGroup> findAll( 649 int start, int end, 650 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 651 throws com.liferay.portal.kernel.exception.SystemException { 652 return getPersistence().findAll(start, end, orderByComparator); 653 } 654 655 /** 656 * Removes all the user groups where companyId = ? from the database. 657 * 658 * @param companyId the company id to search with 659 * @throws SystemException if a system exception occurred 660 */ 661 public static void removeByCompanyId(long companyId) 662 throws com.liferay.portal.kernel.exception.SystemException { 663 getPersistence().removeByCompanyId(companyId); 664 } 665 666 /** 667 * Removes all the user groups where companyId = ? and parentUserGroupId = ? from the database. 668 * 669 * @param companyId the company id to search with 670 * @param parentUserGroupId the parent user group id to search with 671 * @throws SystemException if a system exception occurred 672 */ 673 public static void removeByC_P(long companyId, long parentUserGroupId) 674 throws com.liferay.portal.kernel.exception.SystemException { 675 getPersistence().removeByC_P(companyId, parentUserGroupId); 676 } 677 678 /** 679 * Removes the user group where companyId = ? and name = ? from the database. 680 * 681 * @param companyId the company id to search with 682 * @param name the name to search with 683 * @throws SystemException if a system exception occurred 684 */ 685 public static void removeByC_N(long companyId, java.lang.String name) 686 throws com.liferay.portal.NoSuchUserGroupException, 687 com.liferay.portal.kernel.exception.SystemException { 688 getPersistence().removeByC_N(companyId, name); 689 } 690 691 /** 692 * Removes all the user groups from the database. 693 * 694 * @throws SystemException if a system exception occurred 695 */ 696 public static void removeAll() 697 throws com.liferay.portal.kernel.exception.SystemException { 698 getPersistence().removeAll(); 699 } 700 701 /** 702 * Counts all the user groups where companyId = ?. 703 * 704 * @param companyId the company id to search with 705 * @return the number of matching user groups 706 * @throws SystemException if a system exception occurred 707 */ 708 public static int countByCompanyId(long companyId) 709 throws com.liferay.portal.kernel.exception.SystemException { 710 return getPersistence().countByCompanyId(companyId); 711 } 712 713 /** 714 * Filters by the user's permissions and counts all the user groups where companyId = ?. 715 * 716 * @param companyId the company id to search with 717 * @return the number of matching user groups that the user has permission to view 718 * @throws SystemException if a system exception occurred 719 */ 720 public static int filterCountByCompanyId(long companyId) 721 throws com.liferay.portal.kernel.exception.SystemException { 722 return getPersistence().filterCountByCompanyId(companyId); 723 } 724 725 /** 726 * Counts all the user groups where companyId = ? and parentUserGroupId = ?. 727 * 728 * @param companyId the company id to search with 729 * @param parentUserGroupId the parent user group id to search with 730 * @return the number of matching user groups 731 * @throws SystemException if a system exception occurred 732 */ 733 public static int countByC_P(long companyId, long parentUserGroupId) 734 throws com.liferay.portal.kernel.exception.SystemException { 735 return getPersistence().countByC_P(companyId, parentUserGroupId); 736 } 737 738 /** 739 * Filters by the user's permissions and counts all the user groups where companyId = ? and parentUserGroupId = ?. 740 * 741 * @param companyId the company id to search with 742 * @param parentUserGroupId the parent user group id to search with 743 * @return the number of matching user groups that the user has permission to view 744 * @throws SystemException if a system exception occurred 745 */ 746 public static int filterCountByC_P(long companyId, long parentUserGroupId) 747 throws com.liferay.portal.kernel.exception.SystemException { 748 return getPersistence().filterCountByC_P(companyId, parentUserGroupId); 749 } 750 751 /** 752 * Counts all the user groups where companyId = ? and name = ?. 753 * 754 * @param companyId the company id to search with 755 * @param name the name to search with 756 * @return the number of matching user groups 757 * @throws SystemException if a system exception occurred 758 */ 759 public static int countByC_N(long companyId, java.lang.String name) 760 throws com.liferay.portal.kernel.exception.SystemException { 761 return getPersistence().countByC_N(companyId, name); 762 } 763 764 /** 765 * Counts all the user groups. 766 * 767 * @return the number of user groups 768 * @throws SystemException if a system exception occurred 769 */ 770 public static int countAll() 771 throws com.liferay.portal.kernel.exception.SystemException { 772 return getPersistence().countAll(); 773 } 774 775 /** 776 * Gets all the groups associated with the user group. 777 * 778 * @param pk the primary key of the user group to get the associated groups for 779 * @return the groups associated with the user group 780 * @throws SystemException if a system exception occurred 781 */ 782 public static java.util.List<com.liferay.portal.model.Group> getGroups( 783 long pk) throws com.liferay.portal.kernel.exception.SystemException { 784 return getPersistence().getGroups(pk); 785 } 786 787 /** 788 * Gets a range of all the groups associated with the user group. 789 * 790 * <p> 791 * 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. 792 * </p> 793 * 794 * @param pk the primary key of the user group to get the associated groups for 795 * @param start the lower bound of the range of user groups to return 796 * @param end the upper bound of the range of user groups to return (not inclusive) 797 * @return the range of groups associated with the user group 798 * @throws SystemException if a system exception occurred 799 */ 800 public static java.util.List<com.liferay.portal.model.Group> getGroups( 801 long pk, int start, int end) 802 throws com.liferay.portal.kernel.exception.SystemException { 803 return getPersistence().getGroups(pk, start, end); 804 } 805 806 /** 807 * Gets an ordered range of all the groups associated with the user group. 808 * 809 * <p> 810 * 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. 811 * </p> 812 * 813 * @param pk the primary key of the user group to get the associated groups for 814 * @param start the lower bound of the range of user groups to return 815 * @param end the upper bound of the range of user groups to return (not inclusive) 816 * @param orderByComparator the comparator to order the results by 817 * @return the ordered range of groups associated with the user group 818 * @throws SystemException if a system exception occurred 819 */ 820 public static java.util.List<com.liferay.portal.model.Group> getGroups( 821 long pk, int start, int end, 822 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 823 throws com.liferay.portal.kernel.exception.SystemException { 824 return getPersistence().getGroups(pk, start, end, orderByComparator); 825 } 826 827 /** 828 * Gets the number of groups associated with the user group. 829 * 830 * @param pk the primary key of the user group to get the number of associated groups for 831 * @return the number of groups associated with the user group 832 * @throws SystemException if a system exception occurred 833 */ 834 public static int getGroupsSize(long pk) 835 throws com.liferay.portal.kernel.exception.SystemException { 836 return getPersistence().getGroupsSize(pk); 837 } 838 839 /** 840 * Determines if the group is associated with the user group. 841 * 842 * @param pk the primary key of the user group 843 * @param groupPK the primary key of the group 844 * @return <code>true</code> if the group is associated with the user group; <code>false</code> otherwise 845 * @throws SystemException if a system exception occurred 846 */ 847 public static boolean containsGroup(long pk, long groupPK) 848 throws com.liferay.portal.kernel.exception.SystemException { 849 return getPersistence().containsGroup(pk, groupPK); 850 } 851 852 /** 853 * Determines if the user group has any groups associated with it. 854 * 855 * @param pk the primary key of the user group to check for associations with groups 856 * @return <code>true</code> if the user group has any groups associated with it; <code>false</code> otherwise 857 * @throws SystemException if a system exception occurred 858 */ 859 public static boolean containsGroups(long pk) 860 throws com.liferay.portal.kernel.exception.SystemException { 861 return getPersistence().containsGroups(pk); 862 } 863 864 /** 865 * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 866 * 867 * @param pk the primary key of the user group 868 * @param groupPK the primary key of the group 869 * @throws SystemException if a system exception occurred 870 */ 871 public static void addGroup(long pk, long groupPK) 872 throws com.liferay.portal.kernel.exception.SystemException { 873 getPersistence().addGroup(pk, groupPK); 874 } 875 876 /** 877 * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 878 * 879 * @param pk the primary key of the user group 880 * @param group the group 881 * @throws SystemException if a system exception occurred 882 */ 883 public static void addGroup(long pk, com.liferay.portal.model.Group group) 884 throws com.liferay.portal.kernel.exception.SystemException { 885 getPersistence().addGroup(pk, group); 886 } 887 888 /** 889 * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 890 * 891 * @param pk the primary key of the user group 892 * @param groupPKs the primary keys of the groups 893 * @throws SystemException if a system exception occurred 894 */ 895 public static void addGroups(long pk, long[] groupPKs) 896 throws com.liferay.portal.kernel.exception.SystemException { 897 getPersistence().addGroups(pk, groupPKs); 898 } 899 900 /** 901 * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 902 * 903 * @param pk the primary key of the user group 904 * @param groups the groups 905 * @throws SystemException if a system exception occurred 906 */ 907 public static void addGroups(long pk, 908 java.util.List<com.liferay.portal.model.Group> groups) 909 throws com.liferay.portal.kernel.exception.SystemException { 910 getPersistence().addGroups(pk, groups); 911 } 912 913 /** 914 * Clears all associations between the user group and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 915 * 916 * @param pk the primary key of the user group to clear the associated groups from 917 * @throws SystemException if a system exception occurred 918 */ 919 public static void clearGroups(long pk) 920 throws com.liferay.portal.kernel.exception.SystemException { 921 getPersistence().clearGroups(pk); 922 } 923 924 /** 925 * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 926 * 927 * @param pk the primary key of the user group 928 * @param groupPK the primary key of the group 929 * @throws SystemException if a system exception occurred 930 */ 931 public static void removeGroup(long pk, long groupPK) 932 throws com.liferay.portal.kernel.exception.SystemException { 933 getPersistence().removeGroup(pk, groupPK); 934 } 935 936 /** 937 * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 938 * 939 * @param pk the primary key of the user group 940 * @param group the group 941 * @throws SystemException if a system exception occurred 942 */ 943 public static void removeGroup(long pk, com.liferay.portal.model.Group group) 944 throws com.liferay.portal.kernel.exception.SystemException { 945 getPersistence().removeGroup(pk, group); 946 } 947 948 /** 949 * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 950 * 951 * @param pk the primary key of the user group 952 * @param groupPKs the primary keys of the groups 953 * @throws SystemException if a system exception occurred 954 */ 955 public static void removeGroups(long pk, long[] groupPKs) 956 throws com.liferay.portal.kernel.exception.SystemException { 957 getPersistence().removeGroups(pk, groupPKs); 958 } 959 960 /** 961 * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 962 * 963 * @param pk the primary key of the user group 964 * @param groups the groups 965 * @throws SystemException if a system exception occurred 966 */ 967 public static void removeGroups(long pk, 968 java.util.List<com.liferay.portal.model.Group> groups) 969 throws com.liferay.portal.kernel.exception.SystemException { 970 getPersistence().removeGroups(pk, groups); 971 } 972 973 /** 974 * 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. 975 * 976 * @param pk the primary key of the user group to set the associations for 977 * @param groupPKs the primary keys of the groups to be associated with the user group 978 * @throws SystemException if a system exception occurred 979 */ 980 public static void setGroups(long pk, long[] groupPKs) 981 throws com.liferay.portal.kernel.exception.SystemException { 982 getPersistence().setGroups(pk, groupPKs); 983 } 984 985 /** 986 * 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. 987 * 988 * @param pk the primary key of the user group to set the associations for 989 * @param groups the groups to be associated with the user group 990 * @throws SystemException if a system exception occurred 991 */ 992 public static void setGroups(long pk, 993 java.util.List<com.liferay.portal.model.Group> groups) 994 throws com.liferay.portal.kernel.exception.SystemException { 995 getPersistence().setGroups(pk, groups); 996 } 997 998 /** 999 * Gets all the users associated with the user group. 1000 * 1001 * @param pk the primary key of the user group to get the associated users for 1002 * @return the users associated with the user group 1003 * @throws SystemException if a system exception occurred 1004 */ 1005 public static java.util.List<com.liferay.portal.model.User> getUsers( 1006 long pk) throws com.liferay.portal.kernel.exception.SystemException { 1007 return getPersistence().getUsers(pk); 1008 } 1009 1010 /** 1011 * Gets a range of all the users associated with the user group. 1012 * 1013 * <p> 1014 * 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. 1015 * </p> 1016 * 1017 * @param pk the primary key of the user group to get the associated users for 1018 * @param start the lower bound of the range of user groups to return 1019 * @param end the upper bound of the range of user groups to return (not inclusive) 1020 * @return the range of users associated with the user group 1021 * @throws SystemException if a system exception occurred 1022 */ 1023 public static java.util.List<com.liferay.portal.model.User> getUsers( 1024 long pk, int start, int end) 1025 throws com.liferay.portal.kernel.exception.SystemException { 1026 return getPersistence().getUsers(pk, start, end); 1027 } 1028 1029 /** 1030 * Gets an ordered range of all the users associated with the user group. 1031 * 1032 * <p> 1033 * 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. 1034 * </p> 1035 * 1036 * @param pk the primary key of the user group to get the associated users for 1037 * @param start the lower bound of the range of user groups to return 1038 * @param end the upper bound of the range of user groups to return (not inclusive) 1039 * @param orderByComparator the comparator to order the results by 1040 * @return the ordered range of users associated with the user group 1041 * @throws SystemException if a system exception occurred 1042 */ 1043 public static java.util.List<com.liferay.portal.model.User> getUsers( 1044 long pk, int start, int end, 1045 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1046 throws com.liferay.portal.kernel.exception.SystemException { 1047 return getPersistence().getUsers(pk, start, end, orderByComparator); 1048 } 1049 1050 /** 1051 * Gets the number of users associated with the user group. 1052 * 1053 * @param pk the primary key of the user group to get the number of associated users for 1054 * @return the number of users associated with the user group 1055 * @throws SystemException if a system exception occurred 1056 */ 1057 public static int getUsersSize(long pk) 1058 throws com.liferay.portal.kernel.exception.SystemException { 1059 return getPersistence().getUsersSize(pk); 1060 } 1061 1062 /** 1063 * Determines if the user is associated with the user group. 1064 * 1065 * @param pk the primary key of the user group 1066 * @param userPK the primary key of the user 1067 * @return <code>true</code> if the user is associated with the user group; <code>false</code> otherwise 1068 * @throws SystemException if a system exception occurred 1069 */ 1070 public static boolean containsUser(long pk, long userPK) 1071 throws com.liferay.portal.kernel.exception.SystemException { 1072 return getPersistence().containsUser(pk, userPK); 1073 } 1074 1075 /** 1076 * Determines if the user group has any users associated with it. 1077 * 1078 * @param pk the primary key of the user group to check for associations with users 1079 * @return <code>true</code> if the user group has any users associated with it; <code>false</code> otherwise 1080 * @throws SystemException if a system exception occurred 1081 */ 1082 public static boolean containsUsers(long pk) 1083 throws com.liferay.portal.kernel.exception.SystemException { 1084 return getPersistence().containsUsers(pk); 1085 } 1086 1087 /** 1088 * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1089 * 1090 * @param pk the primary key of the user group 1091 * @param userPK the primary key of the user 1092 * @throws SystemException if a system exception occurred 1093 */ 1094 public static void addUser(long pk, long userPK) 1095 throws com.liferay.portal.kernel.exception.SystemException { 1096 getPersistence().addUser(pk, userPK); 1097 } 1098 1099 /** 1100 * Adds an association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1101 * 1102 * @param pk the primary key of the user group 1103 * @param user the user 1104 * @throws SystemException if a system exception occurred 1105 */ 1106 public static void addUser(long pk, com.liferay.portal.model.User user) 1107 throws com.liferay.portal.kernel.exception.SystemException { 1108 getPersistence().addUser(pk, user); 1109 } 1110 1111 /** 1112 * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1113 * 1114 * @param pk the primary key of the user group 1115 * @param userPKs the primary keys of the users 1116 * @throws SystemException if a system exception occurred 1117 */ 1118 public static void addUsers(long pk, long[] userPKs) 1119 throws com.liferay.portal.kernel.exception.SystemException { 1120 getPersistence().addUsers(pk, userPKs); 1121 } 1122 1123 /** 1124 * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1125 * 1126 * @param pk the primary key of the user group 1127 * @param users the users 1128 * @throws SystemException if a system exception occurred 1129 */ 1130 public static void addUsers(long pk, 1131 java.util.List<com.liferay.portal.model.User> users) 1132 throws com.liferay.portal.kernel.exception.SystemException { 1133 getPersistence().addUsers(pk, users); 1134 } 1135 1136 /** 1137 * Clears all associations between the user group and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1138 * 1139 * @param pk the primary key of the user group to clear the associated users from 1140 * @throws SystemException if a system exception occurred 1141 */ 1142 public static void clearUsers(long pk) 1143 throws com.liferay.portal.kernel.exception.SystemException { 1144 getPersistence().clearUsers(pk); 1145 } 1146 1147 /** 1148 * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1149 * 1150 * @param pk the primary key of the user group 1151 * @param userPK the primary key of the user 1152 * @throws SystemException if a system exception occurred 1153 */ 1154 public static void removeUser(long pk, long userPK) 1155 throws com.liferay.portal.kernel.exception.SystemException { 1156 getPersistence().removeUser(pk, userPK); 1157 } 1158 1159 /** 1160 * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1161 * 1162 * @param pk the primary key of the user group 1163 * @param user the user 1164 * @throws SystemException if a system exception occurred 1165 */ 1166 public static void removeUser(long pk, com.liferay.portal.model.User user) 1167 throws com.liferay.portal.kernel.exception.SystemException { 1168 getPersistence().removeUser(pk, user); 1169 } 1170 1171 /** 1172 * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1173 * 1174 * @param pk the primary key of the user group 1175 * @param userPKs the primary keys of the users 1176 * @throws SystemException if a system exception occurred 1177 */ 1178 public static void removeUsers(long pk, long[] userPKs) 1179 throws com.liferay.portal.kernel.exception.SystemException { 1180 getPersistence().removeUsers(pk, userPKs); 1181 } 1182 1183 /** 1184 * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1185 * 1186 * @param pk the primary key of the user group 1187 * @param users the users 1188 * @throws SystemException if a system exception occurred 1189 */ 1190 public static void removeUsers(long pk, 1191 java.util.List<com.liferay.portal.model.User> users) 1192 throws com.liferay.portal.kernel.exception.SystemException { 1193 getPersistence().removeUsers(pk, users); 1194 } 1195 1196 /** 1197 * 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. 1198 * 1199 * @param pk the primary key of the user group to set the associations for 1200 * @param userPKs the primary keys of the users to be associated with the user group 1201 * @throws SystemException if a system exception occurred 1202 */ 1203 public static void setUsers(long pk, long[] userPKs) 1204 throws com.liferay.portal.kernel.exception.SystemException { 1205 getPersistence().setUsers(pk, userPKs); 1206 } 1207 1208 /** 1209 * 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. 1210 * 1211 * @param pk the primary key of the user group to set the associations for 1212 * @param users the users to be associated with the user group 1213 * @throws SystemException if a system exception occurred 1214 */ 1215 public static void setUsers(long pk, 1216 java.util.List<com.liferay.portal.model.User> users) 1217 throws com.liferay.portal.kernel.exception.SystemException { 1218 getPersistence().setUsers(pk, users); 1219 } 1220 1221 public static UserGroupPersistence getPersistence() { 1222 if (_persistence == null) { 1223 _persistence = (UserGroupPersistence)PortalBeanLocatorUtil.locate(UserGroupPersistence.class.getName()); 1224 } 1225 1226 return _persistence; 1227 } 1228 1229 public void setPersistence(UserGroupPersistence persistence) { 1230 _persistence = persistence; 1231 } 1232 1233 private static UserGroupPersistence _persistence; 1234 }