001 /** 002 * Copyright (c) 2000-2010 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 * Finds all the user groups where companyId = ? and parentUserGroupId = ?. 318 * 319 * @param companyId the company id to search with 320 * @param parentUserGroupId the parent user group id to search with 321 * @return the matching user groups 322 * @throws SystemException if a system exception occurred 323 */ 324 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P( 325 long companyId, long parentUserGroupId) 326 throws com.liferay.portal.kernel.exception.SystemException { 327 return getPersistence().findByC_P(companyId, parentUserGroupId); 328 } 329 330 /** 331 * Finds a range of all the user groups where companyId = ? and parentUserGroupId = ?. 332 * 333 * <p> 334 * 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. 335 * </p> 336 * 337 * @param companyId the company id to search with 338 * @param parentUserGroupId the parent user group id to search with 339 * @param start the lower bound of the range of user groups to return 340 * @param end the upper bound of the range of user groups to return (not inclusive) 341 * @return the range of matching user groups 342 * @throws SystemException if a system exception occurred 343 */ 344 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P( 345 long companyId, long parentUserGroupId, int start, int end) 346 throws com.liferay.portal.kernel.exception.SystemException { 347 return getPersistence() 348 .findByC_P(companyId, parentUserGroupId, start, end); 349 } 350 351 /** 352 * Finds an ordered range of all the user groups where companyId = ? and parentUserGroupId = ?. 353 * 354 * <p> 355 * 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. 356 * </p> 357 * 358 * @param companyId the company id to search with 359 * @param parentUserGroupId the parent user group id to search with 360 * @param start the lower bound of the range of user groups to return 361 * @param end the upper bound of the range of user groups to return (not inclusive) 362 * @param orderByComparator the comparator to order the results by 363 * @return the ordered range of matching user groups 364 * @throws SystemException if a system exception occurred 365 */ 366 public static java.util.List<com.liferay.portal.model.UserGroup> findByC_P( 367 long companyId, long parentUserGroupId, int start, int end, 368 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 369 throws com.liferay.portal.kernel.exception.SystemException { 370 return getPersistence() 371 .findByC_P(companyId, parentUserGroupId, start, end, 372 orderByComparator); 373 } 374 375 /** 376 * Finds the first user group in the ordered set where companyId = ? and parentUserGroupId = ?. 377 * 378 * <p> 379 * 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. 380 * </p> 381 * 382 * @param companyId the company id to search with 383 * @param parentUserGroupId the parent user group id to search with 384 * @param orderByComparator the comparator to order the set by 385 * @return the first matching user group 386 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 387 * @throws SystemException if a system exception occurred 388 */ 389 public static com.liferay.portal.model.UserGroup findByC_P_First( 390 long companyId, long parentUserGroupId, 391 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 392 throws com.liferay.portal.NoSuchUserGroupException, 393 com.liferay.portal.kernel.exception.SystemException { 394 return getPersistence() 395 .findByC_P_First(companyId, parentUserGroupId, 396 orderByComparator); 397 } 398 399 /** 400 * Finds the last user group in the ordered set where companyId = ? and parentUserGroupId = ?. 401 * 402 * <p> 403 * 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. 404 * </p> 405 * 406 * @param companyId the company id to search with 407 * @param parentUserGroupId the parent user group id to search with 408 * @param orderByComparator the comparator to order the set by 409 * @return the last matching user group 410 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 411 * @throws SystemException if a system exception occurred 412 */ 413 public static com.liferay.portal.model.UserGroup findByC_P_Last( 414 long companyId, long parentUserGroupId, 415 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 416 throws com.liferay.portal.NoSuchUserGroupException, 417 com.liferay.portal.kernel.exception.SystemException { 418 return getPersistence() 419 .findByC_P_Last(companyId, parentUserGroupId, 420 orderByComparator); 421 } 422 423 /** 424 * Finds the user groups before and after the current user group in the ordered set where companyId = ? and parentUserGroupId = ?. 425 * 426 * <p> 427 * 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. 428 * </p> 429 * 430 * @param userGroupId the primary key of the current user group 431 * @param companyId the company id to search with 432 * @param parentUserGroupId the parent user group id to search with 433 * @param orderByComparator the comparator to order the set by 434 * @return the previous, current, and next user group 435 * @throws com.liferay.portal.NoSuchUserGroupException if a user group with the primary key could not be found 436 * @throws SystemException if a system exception occurred 437 */ 438 public static com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext( 439 long userGroupId, long companyId, long parentUserGroupId, 440 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 441 throws com.liferay.portal.NoSuchUserGroupException, 442 com.liferay.portal.kernel.exception.SystemException { 443 return getPersistence() 444 .findByC_P_PrevAndNext(userGroupId, companyId, 445 parentUserGroupId, orderByComparator); 446 } 447 448 /** 449 * Finds the user group where companyId = ? and name = ? or throws a {@link com.liferay.portal.NoSuchUserGroupException} if it could not be found. 450 * 451 * @param companyId the company id to search with 452 * @param name the name to search with 453 * @return the matching user group 454 * @throws com.liferay.portal.NoSuchUserGroupException if a matching user group could not be found 455 * @throws SystemException if a system exception occurred 456 */ 457 public static com.liferay.portal.model.UserGroup findByC_N(long companyId, 458 java.lang.String name) 459 throws com.liferay.portal.NoSuchUserGroupException, 460 com.liferay.portal.kernel.exception.SystemException { 461 return getPersistence().findByC_N(companyId, name); 462 } 463 464 /** 465 * Finds the user group where companyId = ? and name = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 466 * 467 * @param companyId the company id to search with 468 * @param name the name to search with 469 * @return the matching user group, or <code>null</code> if a matching user group could not be found 470 * @throws SystemException if a system exception occurred 471 */ 472 public static com.liferay.portal.model.UserGroup fetchByC_N( 473 long companyId, java.lang.String name) 474 throws com.liferay.portal.kernel.exception.SystemException { 475 return getPersistence().fetchByC_N(companyId, name); 476 } 477 478 /** 479 * Finds the user group where companyId = ? and name = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 480 * 481 * @param companyId the company id to search with 482 * @param name the name to search with 483 * @return the matching user group, or <code>null</code> if a matching user group could not be found 484 * @throws SystemException if a system exception occurred 485 */ 486 public static com.liferay.portal.model.UserGroup fetchByC_N( 487 long companyId, java.lang.String name, boolean retrieveFromCache) 488 throws com.liferay.portal.kernel.exception.SystemException { 489 return getPersistence().fetchByC_N(companyId, name, retrieveFromCache); 490 } 491 492 /** 493 * Finds all the user groups. 494 * 495 * @return the user groups 496 * @throws SystemException if a system exception occurred 497 */ 498 public static java.util.List<com.liferay.portal.model.UserGroup> findAll() 499 throws com.liferay.portal.kernel.exception.SystemException { 500 return getPersistence().findAll(); 501 } 502 503 /** 504 * Finds a range of all the user groups. 505 * 506 * <p> 507 * 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. 508 * </p> 509 * 510 * @param start the lower bound of the range of user groups to return 511 * @param end the upper bound of the range of user groups to return (not inclusive) 512 * @return the range of user groups 513 * @throws SystemException if a system exception occurred 514 */ 515 public static java.util.List<com.liferay.portal.model.UserGroup> findAll( 516 int start, int end) 517 throws com.liferay.portal.kernel.exception.SystemException { 518 return getPersistence().findAll(start, end); 519 } 520 521 /** 522 * Finds an ordered range of all the user groups. 523 * 524 * <p> 525 * 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. 526 * </p> 527 * 528 * @param start the lower bound of the range of user groups to return 529 * @param end the upper bound of the range of user groups to return (not inclusive) 530 * @param orderByComparator the comparator to order the results by 531 * @return the ordered range of user groups 532 * @throws SystemException if a system exception occurred 533 */ 534 public static java.util.List<com.liferay.portal.model.UserGroup> findAll( 535 int start, int end, 536 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 537 throws com.liferay.portal.kernel.exception.SystemException { 538 return getPersistence().findAll(start, end, orderByComparator); 539 } 540 541 /** 542 * Removes all the user groups where companyId = ? from the database. 543 * 544 * @param companyId the company id to search with 545 * @throws SystemException if a system exception occurred 546 */ 547 public static void removeByCompanyId(long companyId) 548 throws com.liferay.portal.kernel.exception.SystemException { 549 getPersistence().removeByCompanyId(companyId); 550 } 551 552 /** 553 * Removes all the user groups where companyId = ? and parentUserGroupId = ? from the database. 554 * 555 * @param companyId the company id to search with 556 * @param parentUserGroupId the parent user group id to search with 557 * @throws SystemException if a system exception occurred 558 */ 559 public static void removeByC_P(long companyId, long parentUserGroupId) 560 throws com.liferay.portal.kernel.exception.SystemException { 561 getPersistence().removeByC_P(companyId, parentUserGroupId); 562 } 563 564 /** 565 * Removes the user group where companyId = ? and name = ? from the database. 566 * 567 * @param companyId the company id to search with 568 * @param name the name to search with 569 * @throws SystemException if a system exception occurred 570 */ 571 public static void removeByC_N(long companyId, java.lang.String name) 572 throws com.liferay.portal.NoSuchUserGroupException, 573 com.liferay.portal.kernel.exception.SystemException { 574 getPersistence().removeByC_N(companyId, name); 575 } 576 577 /** 578 * Removes all the user groups from the database. 579 * 580 * @throws SystemException if a system exception occurred 581 */ 582 public static void removeAll() 583 throws com.liferay.portal.kernel.exception.SystemException { 584 getPersistence().removeAll(); 585 } 586 587 /** 588 * Counts all the user groups where companyId = ?. 589 * 590 * @param companyId the company id to search with 591 * @return the number of matching user groups 592 * @throws SystemException if a system exception occurred 593 */ 594 public static int countByCompanyId(long companyId) 595 throws com.liferay.portal.kernel.exception.SystemException { 596 return getPersistence().countByCompanyId(companyId); 597 } 598 599 /** 600 * Counts all the user groups where companyId = ? and parentUserGroupId = ?. 601 * 602 * @param companyId the company id to search with 603 * @param parentUserGroupId the parent user group id to search with 604 * @return the number of matching user groups 605 * @throws SystemException if a system exception occurred 606 */ 607 public static int countByC_P(long companyId, long parentUserGroupId) 608 throws com.liferay.portal.kernel.exception.SystemException { 609 return getPersistence().countByC_P(companyId, parentUserGroupId); 610 } 611 612 /** 613 * Counts all the user groups where companyId = ? and name = ?. 614 * 615 * @param companyId the company id to search with 616 * @param name the name to search with 617 * @return the number of matching user groups 618 * @throws SystemException if a system exception occurred 619 */ 620 public static int countByC_N(long companyId, java.lang.String name) 621 throws com.liferay.portal.kernel.exception.SystemException { 622 return getPersistence().countByC_N(companyId, name); 623 } 624 625 /** 626 * Counts all the user groups. 627 * 628 * @return the number of user groups 629 * @throws SystemException if a system exception occurred 630 */ 631 public static int countAll() 632 throws com.liferay.portal.kernel.exception.SystemException { 633 return getPersistence().countAll(); 634 } 635 636 /** 637 * Gets all the groups associated with the user group. 638 * 639 * @param pk the primary key of the user group to get the associated groups for 640 * @return the groups associated with the user group 641 * @throws SystemException if a system exception occurred 642 */ 643 public static java.util.List<com.liferay.portal.model.Group> getGroups( 644 long pk) throws com.liferay.portal.kernel.exception.SystemException { 645 return getPersistence().getGroups(pk); 646 } 647 648 /** 649 * Gets a range of all the groups associated with the user group. 650 * 651 * <p> 652 * 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. 653 * </p> 654 * 655 * @param pk the primary key of the user group to get the associated groups for 656 * @param start the lower bound of the range of user groups to return 657 * @param end the upper bound of the range of user groups to return (not inclusive) 658 * @return the range of groups associated with the user group 659 * @throws SystemException if a system exception occurred 660 */ 661 public static java.util.List<com.liferay.portal.model.Group> getGroups( 662 long pk, int start, int end) 663 throws com.liferay.portal.kernel.exception.SystemException { 664 return getPersistence().getGroups(pk, start, end); 665 } 666 667 /** 668 * Gets an ordered range of all the groups associated with the user group. 669 * 670 * <p> 671 * 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. 672 * </p> 673 * 674 * @param pk the primary key of the user group to get the associated groups for 675 * @param start the lower bound of the range of user groups to return 676 * @param end the upper bound of the range of user groups to return (not inclusive) 677 * @param orderByComparator the comparator to order the results by 678 * @return the ordered range of groups associated with the user group 679 * @throws SystemException if a system exception occurred 680 */ 681 public static java.util.List<com.liferay.portal.model.Group> getGroups( 682 long pk, int start, int end, 683 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 684 throws com.liferay.portal.kernel.exception.SystemException { 685 return getPersistence().getGroups(pk, start, end, orderByComparator); 686 } 687 688 /** 689 * Gets the number of groups associated with the user group. 690 * 691 * @param pk the primary key of the user group to get the number of associated groups for 692 * @return the number of groups associated with the user group 693 * @throws SystemException if a system exception occurred 694 */ 695 public static int getGroupsSize(long pk) 696 throws com.liferay.portal.kernel.exception.SystemException { 697 return getPersistence().getGroupsSize(pk); 698 } 699 700 /** 701 * Determines whether the group is associated with the user group. 702 * 703 * @param pk the primary key of the user group 704 * @param groupPK the primary key of the group 705 * @return whether the group is associated with the user group 706 * @throws SystemException if a system exception occurred 707 */ 708 public static boolean containsGroup(long pk, long groupPK) 709 throws com.liferay.portal.kernel.exception.SystemException { 710 return getPersistence().containsGroup(pk, groupPK); 711 } 712 713 /** 714 * Determines whether the user group has any groups associated with it. 715 * 716 * @param pk the primary key of the user group to check for associations with groups 717 * @return whether the user group has any groups associated with it 718 * @throws SystemException if a system exception occurred 719 */ 720 public static boolean containsGroups(long pk) 721 throws com.liferay.portal.kernel.exception.SystemException { 722 return getPersistence().containsGroups(pk); 723 } 724 725 /** 726 * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 727 * 728 * @param pk the primary key of the user group 729 * @param groupPK the primary key of the group 730 * @throws SystemException if a system exception occurred 731 */ 732 public static void addGroup(long pk, long groupPK) 733 throws com.liferay.portal.kernel.exception.SystemException { 734 getPersistence().addGroup(pk, groupPK); 735 } 736 737 /** 738 * Adds an association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 739 * 740 * @param pk the primary key of the user group 741 * @param group the group 742 * @throws SystemException if a system exception occurred 743 */ 744 public static void addGroup(long pk, com.liferay.portal.model.Group group) 745 throws com.liferay.portal.kernel.exception.SystemException { 746 getPersistence().addGroup(pk, group); 747 } 748 749 /** 750 * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 751 * 752 * @param pk the primary key of the user group 753 * @param groupPKs the primary keys of the groups 754 * @throws SystemException if a system exception occurred 755 */ 756 public static void addGroups(long pk, long[] groupPKs) 757 throws com.liferay.portal.kernel.exception.SystemException { 758 getPersistence().addGroups(pk, groupPKs); 759 } 760 761 /** 762 * Adds an association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 763 * 764 * @param pk the primary key of the user group 765 * @param groups the groups 766 * @throws SystemException if a system exception occurred 767 */ 768 public static void addGroups(long pk, 769 java.util.List<com.liferay.portal.model.Group> groups) 770 throws com.liferay.portal.kernel.exception.SystemException { 771 getPersistence().addGroups(pk, groups); 772 } 773 774 /** 775 * Clears all associations between the user group and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 776 * 777 * @param pk the primary key of the user group to clear the associated groups from 778 * @throws SystemException if a system exception occurred 779 */ 780 public static void clearGroups(long pk) 781 throws com.liferay.portal.kernel.exception.SystemException { 782 getPersistence().clearGroups(pk); 783 } 784 785 /** 786 * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 787 * 788 * @param pk the primary key of the user group 789 * @param groupPK the primary key of the group 790 * @throws SystemException if a system exception occurred 791 */ 792 public static void removeGroup(long pk, long groupPK) 793 throws com.liferay.portal.kernel.exception.SystemException { 794 getPersistence().removeGroup(pk, groupPK); 795 } 796 797 /** 798 * Removes the association between the user group and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 799 * 800 * @param pk the primary key of the user group 801 * @param group the group 802 * @throws SystemException if a system exception occurred 803 */ 804 public static void removeGroup(long pk, com.liferay.portal.model.Group group) 805 throws com.liferay.portal.kernel.exception.SystemException { 806 getPersistence().removeGroup(pk, group); 807 } 808 809 /** 810 * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 811 * 812 * @param pk the primary key of the user group 813 * @param groupPKs the primary keys of the groups 814 * @throws SystemException if a system exception occurred 815 */ 816 public static void removeGroups(long pk, long[] groupPKs) 817 throws com.liferay.portal.kernel.exception.SystemException { 818 getPersistence().removeGroups(pk, groupPKs); 819 } 820 821 /** 822 * Removes the association between the user group and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 823 * 824 * @param pk the primary key of the user group 825 * @param groups the groups 826 * @throws SystemException if a system exception occurred 827 */ 828 public static void removeGroups(long pk, 829 java.util.List<com.liferay.portal.model.Group> groups) 830 throws com.liferay.portal.kernel.exception.SystemException { 831 getPersistence().removeGroups(pk, groups); 832 } 833 834 /** 835 * 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. 836 * 837 * @param pk the primary key of the user group to set the associations for 838 * @param groupPKs the primary keys of the groups to be associated with the user group 839 * @throws SystemException if a system exception occurred 840 */ 841 public static void setGroups(long pk, long[] groupPKs) 842 throws com.liferay.portal.kernel.exception.SystemException { 843 getPersistence().setGroups(pk, groupPKs); 844 } 845 846 /** 847 * 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. 848 * 849 * @param pk the primary key of the user group to set the associations for 850 * @param groups the groups to be associated with the user group 851 * @throws SystemException if a system exception occurred 852 */ 853 public static void setGroups(long pk, 854 java.util.List<com.liferay.portal.model.Group> groups) 855 throws com.liferay.portal.kernel.exception.SystemException { 856 getPersistence().setGroups(pk, groups); 857 } 858 859 /** 860 * Gets all the users associated with the user group. 861 * 862 * @param pk the primary key of the user group to get the associated users for 863 * @return the users associated with the user group 864 * @throws SystemException if a system exception occurred 865 */ 866 public static java.util.List<com.liferay.portal.model.User> getUsers( 867 long pk) throws com.liferay.portal.kernel.exception.SystemException { 868 return getPersistence().getUsers(pk); 869 } 870 871 /** 872 * Gets a range of all the users associated with the user group. 873 * 874 * <p> 875 * 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. 876 * </p> 877 * 878 * @param pk the primary key of the user group to get the associated users for 879 * @param start the lower bound of the range of user groups to return 880 * @param end the upper bound of the range of user groups to return (not inclusive) 881 * @return the range of users associated with the user group 882 * @throws SystemException if a system exception occurred 883 */ 884 public static java.util.List<com.liferay.portal.model.User> getUsers( 885 long pk, int start, int end) 886 throws com.liferay.portal.kernel.exception.SystemException { 887 return getPersistence().getUsers(pk, start, end); 888 } 889 890 /** 891 * Gets an ordered range of all the users associated with the user group. 892 * 893 * <p> 894 * 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. 895 * </p> 896 * 897 * @param pk the primary key of the user group to get the associated users for 898 * @param start the lower bound of the range of user groups to return 899 * @param end the upper bound of the range of user groups to return (not inclusive) 900 * @param orderByComparator the comparator to order the results by 901 * @return the ordered range of users associated with the user group 902 * @throws SystemException if a system exception occurred 903 */ 904 public static java.util.List<com.liferay.portal.model.User> getUsers( 905 long pk, int start, int end, 906 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 907 throws com.liferay.portal.kernel.exception.SystemException { 908 return getPersistence().getUsers(pk, start, end, orderByComparator); 909 } 910 911 /** 912 * Gets the number of users associated with the user group. 913 * 914 * @param pk the primary key of the user group to get the number of associated users for 915 * @return the number of users associated with the user group 916 * @throws SystemException if a system exception occurred 917 */ 918 public static int getUsersSize(long pk) 919 throws com.liferay.portal.kernel.exception.SystemException { 920 return getPersistence().getUsersSize(pk); 921 } 922 923 /** 924 * Determines whether the user is associated with the user group. 925 * 926 * @param pk the primary key of the user group 927 * @param userPK the primary key of the user 928 * @return whether the user is associated with the user group 929 * @throws SystemException if a system exception occurred 930 */ 931 public static boolean containsUser(long pk, long userPK) 932 throws com.liferay.portal.kernel.exception.SystemException { 933 return getPersistence().containsUser(pk, userPK); 934 } 935 936 /** 937 * Determines whether the user group has any users associated with it. 938 * 939 * @param pk the primary key of the user group to check for associations with users 940 * @return whether the user group has any users associated with it 941 * @throws SystemException if a system exception occurred 942 */ 943 public static boolean containsUsers(long pk) 944 throws com.liferay.portal.kernel.exception.SystemException { 945 return getPersistence().containsUsers(pk); 946 } 947 948 /** 949 * Adds an association between the user group and the user. 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 userPK the primary key of the user 953 * @throws SystemException if a system exception occurred 954 */ 955 public static void addUser(long pk, long userPK) 956 throws com.liferay.portal.kernel.exception.SystemException { 957 getPersistence().addUser(pk, userPK); 958 } 959 960 /** 961 * Adds an association between the user group and the user. 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 user the user 965 * @throws SystemException if a system exception occurred 966 */ 967 public static void addUser(long pk, com.liferay.portal.model.User user) 968 throws com.liferay.portal.kernel.exception.SystemException { 969 getPersistence().addUser(pk, user); 970 } 971 972 /** 973 * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 974 * 975 * @param pk the primary key of the user group 976 * @param userPKs the primary keys of the users 977 * @throws SystemException if a system exception occurred 978 */ 979 public static void addUsers(long pk, long[] userPKs) 980 throws com.liferay.portal.kernel.exception.SystemException { 981 getPersistence().addUsers(pk, userPKs); 982 } 983 984 /** 985 * Adds an association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 986 * 987 * @param pk the primary key of the user group 988 * @param users the users 989 * @throws SystemException if a system exception occurred 990 */ 991 public static void addUsers(long pk, 992 java.util.List<com.liferay.portal.model.User> users) 993 throws com.liferay.portal.kernel.exception.SystemException { 994 getPersistence().addUsers(pk, users); 995 } 996 997 /** 998 * Clears all associations between the user group and its users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 999 * 1000 * @param pk the primary key of the user group to clear the associated users from 1001 * @throws SystemException if a system exception occurred 1002 */ 1003 public static void clearUsers(long pk) 1004 throws com.liferay.portal.kernel.exception.SystemException { 1005 getPersistence().clearUsers(pk); 1006 } 1007 1008 /** 1009 * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1010 * 1011 * @param pk the primary key of the user group 1012 * @param userPK the primary key of the user 1013 * @throws SystemException if a system exception occurred 1014 */ 1015 public static void removeUser(long pk, long userPK) 1016 throws com.liferay.portal.kernel.exception.SystemException { 1017 getPersistence().removeUser(pk, userPK); 1018 } 1019 1020 /** 1021 * Removes the association between the user group and the user. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1022 * 1023 * @param pk the primary key of the user group 1024 * @param user the user 1025 * @throws SystemException if a system exception occurred 1026 */ 1027 public static void removeUser(long pk, com.liferay.portal.model.User user) 1028 throws com.liferay.portal.kernel.exception.SystemException { 1029 getPersistence().removeUser(pk, user); 1030 } 1031 1032 /** 1033 * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1034 * 1035 * @param pk the primary key of the user group 1036 * @param userPKs the primary keys of the users 1037 * @throws SystemException if a system exception occurred 1038 */ 1039 public static void removeUsers(long pk, long[] userPKs) 1040 throws com.liferay.portal.kernel.exception.SystemException { 1041 getPersistence().removeUsers(pk, userPKs); 1042 } 1043 1044 /** 1045 * Removes the association between the user group and the users. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1046 * 1047 * @param pk the primary key of the user group 1048 * @param users the users 1049 * @throws SystemException if a system exception occurred 1050 */ 1051 public static void removeUsers(long pk, 1052 java.util.List<com.liferay.portal.model.User> users) 1053 throws com.liferay.portal.kernel.exception.SystemException { 1054 getPersistence().removeUsers(pk, users); 1055 } 1056 1057 /** 1058 * 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. 1059 * 1060 * @param pk the primary key of the user group to set the associations for 1061 * @param userPKs the primary keys of the users to be associated with the user group 1062 * @throws SystemException if a system exception occurred 1063 */ 1064 public static void setUsers(long pk, long[] userPKs) 1065 throws com.liferay.portal.kernel.exception.SystemException { 1066 getPersistence().setUsers(pk, userPKs); 1067 } 1068 1069 /** 1070 * 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. 1071 * 1072 * @param pk the primary key of the user group to set the associations for 1073 * @param users the users to be associated with the user group 1074 * @throws SystemException if a system exception occurred 1075 */ 1076 public static void setUsers(long pk, 1077 java.util.List<com.liferay.portal.model.User> users) 1078 throws com.liferay.portal.kernel.exception.SystemException { 1079 getPersistence().setUsers(pk, users); 1080 } 1081 1082 public static UserGroupPersistence getPersistence() { 1083 if (_persistence == null) { 1084 _persistence = (UserGroupPersistence)PortalBeanLocatorUtil.locate(UserGroupPersistence.class.getName()); 1085 } 1086 1087 return _persistence; 1088 } 1089 1090 public void setPersistence(UserGroupPersistence persistence) { 1091 _persistence = persistence; 1092 } 1093 1094 private static UserGroupPersistence _persistence; 1095 }