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