001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 018 import com.liferay.portal.kernel.dao.orm.DynamicQuery; 019 import com.liferay.portal.kernel.exception.SystemException; 020 import com.liferay.portal.kernel.util.OrderByComparator; 021 import com.liferay.portal.kernel.util.ReferenceRegistry; 022 import com.liferay.portal.model.User; 023 import com.liferay.portal.service.ServiceContext; 024 025 import java.util.List; 026 027 /** 028 * The persistence utility for the user service. This utility wraps {@link UserPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. 029 * 030 * <p> 031 * Caching information and settings can be found in <code>portal.properties</code> 032 * </p> 033 * 034 * @author Brian Wing Shun Chan 035 * @see UserPersistence 036 * @see UserPersistenceImpl 037 * @generated 038 */ 039 public class UserUtil { 040 /* 041 * NOTE FOR DEVELOPERS: 042 * 043 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class. 044 */ 045 046 /** 047 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache() 048 */ 049 public static void clearCache() { 050 getPersistence().clearCache(); 051 } 052 053 /** 054 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel) 055 */ 056 public static void clearCache(User user) { 057 getPersistence().clearCache(user); 058 } 059 060 /** 061 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) 062 */ 063 public long countWithDynamicQuery(DynamicQuery dynamicQuery) 064 throws SystemException { 065 return getPersistence().countWithDynamicQuery(dynamicQuery); 066 } 067 068 /** 069 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) 070 */ 071 public static List<User> findWithDynamicQuery(DynamicQuery dynamicQuery) 072 throws SystemException { 073 return getPersistence().findWithDynamicQuery(dynamicQuery); 074 } 075 076 /** 077 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) 078 */ 079 public static List<User> findWithDynamicQuery(DynamicQuery dynamicQuery, 080 int start, int end) throws SystemException { 081 return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); 082 } 083 084 /** 085 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) 086 */ 087 public static List<User> findWithDynamicQuery(DynamicQuery dynamicQuery, 088 int start, int end, OrderByComparator orderByComparator) 089 throws SystemException { 090 return getPersistence() 091 .findWithDynamicQuery(dynamicQuery, start, end, 092 orderByComparator); 093 } 094 095 /** 096 * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel) 097 */ 098 public static User remove(User user) throws SystemException { 099 return getPersistence().remove(user); 100 } 101 102 /** 103 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean) 104 */ 105 public static User update(User user, boolean merge) 106 throws SystemException { 107 return getPersistence().update(user, merge); 108 } 109 110 /** 111 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext) 112 */ 113 public static User update(User user, boolean merge, 114 ServiceContext serviceContext) throws SystemException { 115 return getPersistence().update(user, merge, serviceContext); 116 } 117 118 /** 119 * Caches the user in the entity cache if it is enabled. 120 * 121 * @param user the user 122 */ 123 public static void cacheResult(com.liferay.portal.model.User user) { 124 getPersistence().cacheResult(user); 125 } 126 127 /** 128 * Caches the users in the entity cache if it is enabled. 129 * 130 * @param users the users 131 */ 132 public static void cacheResult( 133 java.util.List<com.liferay.portal.model.User> users) { 134 getPersistence().cacheResult(users); 135 } 136 137 /** 138 * Creates a new user with the primary key. Does not add the user to the database. 139 * 140 * @param userId the primary key for the new user 141 * @return the new user 142 */ 143 public static com.liferay.portal.model.User create(long userId) { 144 return getPersistence().create(userId); 145 } 146 147 /** 148 * Removes the user with the primary key from the database. Also notifies the appropriate model listeners. 149 * 150 * @param userId the primary key of the user 151 * @return the user that was removed 152 * @throws com.liferay.portal.NoSuchUserException if a user with the primary key could not be found 153 * @throws SystemException if a system exception occurred 154 */ 155 public static com.liferay.portal.model.User remove(long userId) 156 throws com.liferay.portal.NoSuchUserException, 157 com.liferay.portal.kernel.exception.SystemException { 158 return getPersistence().remove(userId); 159 } 160 161 public static com.liferay.portal.model.User updateImpl( 162 com.liferay.portal.model.User user, boolean merge) 163 throws com.liferay.portal.kernel.exception.SystemException { 164 return getPersistence().updateImpl(user, merge); 165 } 166 167 /** 168 * Returns the user with the primary key or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found. 169 * 170 * @param userId the primary key of the user 171 * @return the user 172 * @throws com.liferay.portal.NoSuchUserException if a user with the primary key could not be found 173 * @throws SystemException if a system exception occurred 174 */ 175 public static com.liferay.portal.model.User findByPrimaryKey(long userId) 176 throws com.liferay.portal.NoSuchUserException, 177 com.liferay.portal.kernel.exception.SystemException { 178 return getPersistence().findByPrimaryKey(userId); 179 } 180 181 /** 182 * Returns the user with the primary key or returns <code>null</code> if it could not be found. 183 * 184 * @param userId the primary key of the user 185 * @return the user, or <code>null</code> if a user with the primary key could not be found 186 * @throws SystemException if a system exception occurred 187 */ 188 public static com.liferay.portal.model.User fetchByPrimaryKey(long userId) 189 throws com.liferay.portal.kernel.exception.SystemException { 190 return getPersistence().fetchByPrimaryKey(userId); 191 } 192 193 /** 194 * Returns all the users where uuid = ?. 195 * 196 * @param uuid the uuid 197 * @return the matching users 198 * @throws SystemException if a system exception occurred 199 */ 200 public static java.util.List<com.liferay.portal.model.User> findByUuid( 201 java.lang.String uuid) 202 throws com.liferay.portal.kernel.exception.SystemException { 203 return getPersistence().findByUuid(uuid); 204 } 205 206 /** 207 * Returns a range of all the users where uuid = ?. 208 * 209 * <p> 210 * 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. 211 * </p> 212 * 213 * @param uuid the uuid 214 * @param start the lower bound of the range of users 215 * @param end the upper bound of the range of users (not inclusive) 216 * @return the range of matching users 217 * @throws SystemException if a system exception occurred 218 */ 219 public static java.util.List<com.liferay.portal.model.User> findByUuid( 220 java.lang.String uuid, int start, int end) 221 throws com.liferay.portal.kernel.exception.SystemException { 222 return getPersistence().findByUuid(uuid, start, end); 223 } 224 225 /** 226 * Returns an ordered range of all the users where uuid = ?. 227 * 228 * <p> 229 * 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. 230 * </p> 231 * 232 * @param uuid the uuid 233 * @param start the lower bound of the range of users 234 * @param end the upper bound of the range of users (not inclusive) 235 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 236 * @return the ordered range of matching users 237 * @throws SystemException if a system exception occurred 238 */ 239 public static java.util.List<com.liferay.portal.model.User> findByUuid( 240 java.lang.String uuid, int start, int end, 241 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 242 throws com.liferay.portal.kernel.exception.SystemException { 243 return getPersistence().findByUuid(uuid, start, end, orderByComparator); 244 } 245 246 /** 247 * Returns the first user in the ordered set where uuid = ?. 248 * 249 * <p> 250 * 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. 251 * </p> 252 * 253 * @param uuid the uuid 254 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 255 * @return the first matching user 256 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 257 * @throws SystemException if a system exception occurred 258 */ 259 public static com.liferay.portal.model.User findByUuid_First( 260 java.lang.String uuid, 261 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 262 throws com.liferay.portal.NoSuchUserException, 263 com.liferay.portal.kernel.exception.SystemException { 264 return getPersistence().findByUuid_First(uuid, orderByComparator); 265 } 266 267 /** 268 * Returns the last user in the ordered set where uuid = ?. 269 * 270 * <p> 271 * 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. 272 * </p> 273 * 274 * @param uuid the uuid 275 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 276 * @return the last matching user 277 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 278 * @throws SystemException if a system exception occurred 279 */ 280 public static com.liferay.portal.model.User findByUuid_Last( 281 java.lang.String uuid, 282 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 283 throws com.liferay.portal.NoSuchUserException, 284 com.liferay.portal.kernel.exception.SystemException { 285 return getPersistence().findByUuid_Last(uuid, orderByComparator); 286 } 287 288 /** 289 * Returns the users before and after the current user in the ordered set where uuid = ?. 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 userId the primary key of the current user 296 * @param uuid the uuid 297 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 298 * @return the previous, current, and next user 299 * @throws com.liferay.portal.NoSuchUserException if a user with the primary key could not be found 300 * @throws SystemException if a system exception occurred 301 */ 302 public static com.liferay.portal.model.User[] findByUuid_PrevAndNext( 303 long userId, java.lang.String uuid, 304 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 305 throws com.liferay.portal.NoSuchUserException, 306 com.liferay.portal.kernel.exception.SystemException { 307 return getPersistence() 308 .findByUuid_PrevAndNext(userId, uuid, orderByComparator); 309 } 310 311 /** 312 * Returns all the users where companyId = ?. 313 * 314 * @param companyId the company ID 315 * @return the matching users 316 * @throws SystemException if a system exception occurred 317 */ 318 public static java.util.List<com.liferay.portal.model.User> findByCompanyId( 319 long companyId) 320 throws com.liferay.portal.kernel.exception.SystemException { 321 return getPersistence().findByCompanyId(companyId); 322 } 323 324 /** 325 * Returns a range of all the users where companyId = ?. 326 * 327 * <p> 328 * 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. 329 * </p> 330 * 331 * @param companyId the company ID 332 * @param start the lower bound of the range of users 333 * @param end the upper bound of the range of users (not inclusive) 334 * @return the range of matching users 335 * @throws SystemException if a system exception occurred 336 */ 337 public static java.util.List<com.liferay.portal.model.User> findByCompanyId( 338 long companyId, int start, int end) 339 throws com.liferay.portal.kernel.exception.SystemException { 340 return getPersistence().findByCompanyId(companyId, start, end); 341 } 342 343 /** 344 * Returns an ordered range of all the users where companyId = ?. 345 * 346 * <p> 347 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 348 * </p> 349 * 350 * @param companyId the company ID 351 * @param start the lower bound of the range of users 352 * @param end the upper bound of the range of users (not inclusive) 353 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 354 * @return the ordered range of matching users 355 * @throws SystemException if a system exception occurred 356 */ 357 public static java.util.List<com.liferay.portal.model.User> findByCompanyId( 358 long companyId, int start, int end, 359 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 360 throws com.liferay.portal.kernel.exception.SystemException { 361 return getPersistence() 362 .findByCompanyId(companyId, start, end, orderByComparator); 363 } 364 365 /** 366 * Returns the first user in the ordered set where companyId = ?. 367 * 368 * <p> 369 * 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. 370 * </p> 371 * 372 * @param companyId the company ID 373 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 374 * @return the first matching user 375 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 376 * @throws SystemException if a system exception occurred 377 */ 378 public static com.liferay.portal.model.User findByCompanyId_First( 379 long companyId, 380 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 381 throws com.liferay.portal.NoSuchUserException, 382 com.liferay.portal.kernel.exception.SystemException { 383 return getPersistence() 384 .findByCompanyId_First(companyId, orderByComparator); 385 } 386 387 /** 388 * Returns the last user in the ordered set where companyId = ?. 389 * 390 * <p> 391 * 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. 392 * </p> 393 * 394 * @param companyId the company ID 395 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 396 * @return the last matching user 397 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 398 * @throws SystemException if a system exception occurred 399 */ 400 public static com.liferay.portal.model.User findByCompanyId_Last( 401 long companyId, 402 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 403 throws com.liferay.portal.NoSuchUserException, 404 com.liferay.portal.kernel.exception.SystemException { 405 return getPersistence() 406 .findByCompanyId_Last(companyId, orderByComparator); 407 } 408 409 /** 410 * Returns the users before and after the current user in the ordered set where companyId = ?. 411 * 412 * <p> 413 * 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. 414 * </p> 415 * 416 * @param userId the primary key of the current user 417 * @param companyId the company ID 418 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 419 * @return the previous, current, and next user 420 * @throws com.liferay.portal.NoSuchUserException if a user with the primary key could not be found 421 * @throws SystemException if a system exception occurred 422 */ 423 public static com.liferay.portal.model.User[] findByCompanyId_PrevAndNext( 424 long userId, long companyId, 425 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 426 throws com.liferay.portal.NoSuchUserException, 427 com.liferay.portal.kernel.exception.SystemException { 428 return getPersistence() 429 .findByCompanyId_PrevAndNext(userId, companyId, 430 orderByComparator); 431 } 432 433 /** 434 * Returns the user where contactId = ? or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found. 435 * 436 * @param contactId the contact ID 437 * @return the matching user 438 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 439 * @throws SystemException if a system exception occurred 440 */ 441 public static com.liferay.portal.model.User findByContactId(long contactId) 442 throws com.liferay.portal.NoSuchUserException, 443 com.liferay.portal.kernel.exception.SystemException { 444 return getPersistence().findByContactId(contactId); 445 } 446 447 /** 448 * Returns the user where contactId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 449 * 450 * @param contactId the contact ID 451 * @return the matching user, or <code>null</code> if a matching user could not be found 452 * @throws SystemException if a system exception occurred 453 */ 454 public static com.liferay.portal.model.User fetchByContactId(long contactId) 455 throws com.liferay.portal.kernel.exception.SystemException { 456 return getPersistence().fetchByContactId(contactId); 457 } 458 459 /** 460 * Returns the user where contactId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 461 * 462 * @param contactId the contact ID 463 * @param retrieveFromCache whether to use the finder cache 464 * @return the matching user, or <code>null</code> if a matching user could not be found 465 * @throws SystemException if a system exception occurred 466 */ 467 public static com.liferay.portal.model.User fetchByContactId( 468 long contactId, boolean retrieveFromCache) 469 throws com.liferay.portal.kernel.exception.SystemException { 470 return getPersistence().fetchByContactId(contactId, retrieveFromCache); 471 } 472 473 /** 474 * Returns all the users where emailAddress = ?. 475 * 476 * @param emailAddress the email address 477 * @return the matching users 478 * @throws SystemException if a system exception occurred 479 */ 480 public static java.util.List<com.liferay.portal.model.User> findByEmailAddress( 481 java.lang.String emailAddress) 482 throws com.liferay.portal.kernel.exception.SystemException { 483 return getPersistence().findByEmailAddress(emailAddress); 484 } 485 486 /** 487 * Returns a range of all the users where emailAddress = ?. 488 * 489 * <p> 490 * 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. 491 * </p> 492 * 493 * @param emailAddress the email address 494 * @param start the lower bound of the range of users 495 * @param end the upper bound of the range of users (not inclusive) 496 * @return the range of matching users 497 * @throws SystemException if a system exception occurred 498 */ 499 public static java.util.List<com.liferay.portal.model.User> findByEmailAddress( 500 java.lang.String emailAddress, int start, int end) 501 throws com.liferay.portal.kernel.exception.SystemException { 502 return getPersistence().findByEmailAddress(emailAddress, start, end); 503 } 504 505 /** 506 * Returns an ordered range of all the users where emailAddress = ?. 507 * 508 * <p> 509 * 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. 510 * </p> 511 * 512 * @param emailAddress the email address 513 * @param start the lower bound of the range of users 514 * @param end the upper bound of the range of users (not inclusive) 515 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 516 * @return the ordered range of matching users 517 * @throws SystemException if a system exception occurred 518 */ 519 public static java.util.List<com.liferay.portal.model.User> findByEmailAddress( 520 java.lang.String emailAddress, int start, int end, 521 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 522 throws com.liferay.portal.kernel.exception.SystemException { 523 return getPersistence() 524 .findByEmailAddress(emailAddress, start, end, 525 orderByComparator); 526 } 527 528 /** 529 * Returns the first user in the ordered set where emailAddress = ?. 530 * 531 * <p> 532 * 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. 533 * </p> 534 * 535 * @param emailAddress the email address 536 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 537 * @return the first matching user 538 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 539 * @throws SystemException if a system exception occurred 540 */ 541 public static com.liferay.portal.model.User findByEmailAddress_First( 542 java.lang.String emailAddress, 543 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 544 throws com.liferay.portal.NoSuchUserException, 545 com.liferay.portal.kernel.exception.SystemException { 546 return getPersistence() 547 .findByEmailAddress_First(emailAddress, orderByComparator); 548 } 549 550 /** 551 * Returns the last user in the ordered set where emailAddress = ?. 552 * 553 * <p> 554 * 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. 555 * </p> 556 * 557 * @param emailAddress the email address 558 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 559 * @return the last matching user 560 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 561 * @throws SystemException if a system exception occurred 562 */ 563 public static com.liferay.portal.model.User findByEmailAddress_Last( 564 java.lang.String emailAddress, 565 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 566 throws com.liferay.portal.NoSuchUserException, 567 com.liferay.portal.kernel.exception.SystemException { 568 return getPersistence() 569 .findByEmailAddress_Last(emailAddress, orderByComparator); 570 } 571 572 /** 573 * Returns the users before and after the current user in the ordered set where emailAddress = ?. 574 * 575 * <p> 576 * 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. 577 * </p> 578 * 579 * @param userId the primary key of the current user 580 * @param emailAddress the email address 581 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 582 * @return the previous, current, and next user 583 * @throws com.liferay.portal.NoSuchUserException if a user with the primary key could not be found 584 * @throws SystemException if a system exception occurred 585 */ 586 public static com.liferay.portal.model.User[] findByEmailAddress_PrevAndNext( 587 long userId, java.lang.String emailAddress, 588 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 589 throws com.liferay.portal.NoSuchUserException, 590 com.liferay.portal.kernel.exception.SystemException { 591 return getPersistence() 592 .findByEmailAddress_PrevAndNext(userId, emailAddress, 593 orderByComparator); 594 } 595 596 /** 597 * Returns the user where portraitId = ? or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found. 598 * 599 * @param portraitId the portrait ID 600 * @return the matching user 601 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 602 * @throws SystemException if a system exception occurred 603 */ 604 public static com.liferay.portal.model.User findByPortraitId( 605 long portraitId) 606 throws com.liferay.portal.NoSuchUserException, 607 com.liferay.portal.kernel.exception.SystemException { 608 return getPersistence().findByPortraitId(portraitId); 609 } 610 611 /** 612 * Returns the user where portraitId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 613 * 614 * @param portraitId the portrait ID 615 * @return the matching user, or <code>null</code> if a matching user could not be found 616 * @throws SystemException if a system exception occurred 617 */ 618 public static com.liferay.portal.model.User fetchByPortraitId( 619 long portraitId) 620 throws com.liferay.portal.kernel.exception.SystemException { 621 return getPersistence().fetchByPortraitId(portraitId); 622 } 623 624 /** 625 * Returns the user where portraitId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 626 * 627 * @param portraitId the portrait ID 628 * @param retrieveFromCache whether to use the finder cache 629 * @return the matching user, or <code>null</code> if a matching user could not be found 630 * @throws SystemException if a system exception occurred 631 */ 632 public static com.liferay.portal.model.User fetchByPortraitId( 633 long portraitId, boolean retrieveFromCache) 634 throws com.liferay.portal.kernel.exception.SystemException { 635 return getPersistence().fetchByPortraitId(portraitId, retrieveFromCache); 636 } 637 638 /** 639 * Returns the user where companyId = ? and userId = ? or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found. 640 * 641 * @param companyId the company ID 642 * @param userId the user ID 643 * @return the matching user 644 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 645 * @throws SystemException if a system exception occurred 646 */ 647 public static com.liferay.portal.model.User findByC_U(long companyId, 648 long userId) 649 throws com.liferay.portal.NoSuchUserException, 650 com.liferay.portal.kernel.exception.SystemException { 651 return getPersistence().findByC_U(companyId, userId); 652 } 653 654 /** 655 * Returns the user where companyId = ? and userId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 656 * 657 * @param companyId the company ID 658 * @param userId the user ID 659 * @return the matching user, or <code>null</code> if a matching user could not be found 660 * @throws SystemException if a system exception occurred 661 */ 662 public static com.liferay.portal.model.User fetchByC_U(long companyId, 663 long userId) throws com.liferay.portal.kernel.exception.SystemException { 664 return getPersistence().fetchByC_U(companyId, userId); 665 } 666 667 /** 668 * Returns the user where companyId = ? and userId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 669 * 670 * @param companyId the company ID 671 * @param userId the user ID 672 * @param retrieveFromCache whether to use the finder cache 673 * @return the matching user, or <code>null</code> if a matching user could not be found 674 * @throws SystemException if a system exception occurred 675 */ 676 public static com.liferay.portal.model.User fetchByC_U(long companyId, 677 long userId, boolean retrieveFromCache) 678 throws com.liferay.portal.kernel.exception.SystemException { 679 return getPersistence().fetchByC_U(companyId, userId, retrieveFromCache); 680 } 681 682 /** 683 * Returns the user where companyId = ? and defaultUser = ? or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found. 684 * 685 * @param companyId the company ID 686 * @param defaultUser the default user 687 * @return the matching user 688 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 689 * @throws SystemException if a system exception occurred 690 */ 691 public static com.liferay.portal.model.User findByC_DU(long companyId, 692 boolean defaultUser) 693 throws com.liferay.portal.NoSuchUserException, 694 com.liferay.portal.kernel.exception.SystemException { 695 return getPersistence().findByC_DU(companyId, defaultUser); 696 } 697 698 /** 699 * Returns the user where companyId = ? and defaultUser = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 700 * 701 * @param companyId the company ID 702 * @param defaultUser the default user 703 * @return the matching user, or <code>null</code> if a matching user could not be found 704 * @throws SystemException if a system exception occurred 705 */ 706 public static com.liferay.portal.model.User fetchByC_DU(long companyId, 707 boolean defaultUser) 708 throws com.liferay.portal.kernel.exception.SystemException { 709 return getPersistence().fetchByC_DU(companyId, defaultUser); 710 } 711 712 /** 713 * Returns the user where companyId = ? and defaultUser = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 714 * 715 * @param companyId the company ID 716 * @param defaultUser the default user 717 * @param retrieveFromCache whether to use the finder cache 718 * @return the matching user, or <code>null</code> if a matching user could not be found 719 * @throws SystemException if a system exception occurred 720 */ 721 public static com.liferay.portal.model.User fetchByC_DU(long companyId, 722 boolean defaultUser, boolean retrieveFromCache) 723 throws com.liferay.portal.kernel.exception.SystemException { 724 return getPersistence() 725 .fetchByC_DU(companyId, defaultUser, retrieveFromCache); 726 } 727 728 /** 729 * Returns the user where companyId = ? and screenName = ? or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found. 730 * 731 * @param companyId the company ID 732 * @param screenName the screen name 733 * @return the matching user 734 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 735 * @throws SystemException if a system exception occurred 736 */ 737 public static com.liferay.portal.model.User findByC_SN(long companyId, 738 java.lang.String screenName) 739 throws com.liferay.portal.NoSuchUserException, 740 com.liferay.portal.kernel.exception.SystemException { 741 return getPersistence().findByC_SN(companyId, screenName); 742 } 743 744 /** 745 * Returns the user where companyId = ? and screenName = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 746 * 747 * @param companyId the company ID 748 * @param screenName the screen name 749 * @return the matching user, or <code>null</code> if a matching user could not be found 750 * @throws SystemException if a system exception occurred 751 */ 752 public static com.liferay.portal.model.User fetchByC_SN(long companyId, 753 java.lang.String screenName) 754 throws com.liferay.portal.kernel.exception.SystemException { 755 return getPersistence().fetchByC_SN(companyId, screenName); 756 } 757 758 /** 759 * Returns the user where companyId = ? and screenName = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 760 * 761 * @param companyId the company ID 762 * @param screenName the screen name 763 * @param retrieveFromCache whether to use the finder cache 764 * @return the matching user, or <code>null</code> if a matching user could not be found 765 * @throws SystemException if a system exception occurred 766 */ 767 public static com.liferay.portal.model.User fetchByC_SN(long companyId, 768 java.lang.String screenName, boolean retrieveFromCache) 769 throws com.liferay.portal.kernel.exception.SystemException { 770 return getPersistence() 771 .fetchByC_SN(companyId, screenName, retrieveFromCache); 772 } 773 774 /** 775 * Returns the user where companyId = ? and emailAddress = ? or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found. 776 * 777 * @param companyId the company ID 778 * @param emailAddress the email address 779 * @return the matching user 780 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 781 * @throws SystemException if a system exception occurred 782 */ 783 public static com.liferay.portal.model.User findByC_EA(long companyId, 784 java.lang.String emailAddress) 785 throws com.liferay.portal.NoSuchUserException, 786 com.liferay.portal.kernel.exception.SystemException { 787 return getPersistence().findByC_EA(companyId, emailAddress); 788 } 789 790 /** 791 * Returns the user where companyId = ? and emailAddress = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 792 * 793 * @param companyId the company ID 794 * @param emailAddress the email address 795 * @return the matching user, or <code>null</code> if a matching user could not be found 796 * @throws SystemException if a system exception occurred 797 */ 798 public static com.liferay.portal.model.User fetchByC_EA(long companyId, 799 java.lang.String emailAddress) 800 throws com.liferay.portal.kernel.exception.SystemException { 801 return getPersistence().fetchByC_EA(companyId, emailAddress); 802 } 803 804 /** 805 * Returns the user where companyId = ? and emailAddress = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 806 * 807 * @param companyId the company ID 808 * @param emailAddress the email address 809 * @param retrieveFromCache whether to use the finder cache 810 * @return the matching user, or <code>null</code> if a matching user could not be found 811 * @throws SystemException if a system exception occurred 812 */ 813 public static com.liferay.portal.model.User fetchByC_EA(long companyId, 814 java.lang.String emailAddress, boolean retrieveFromCache) 815 throws com.liferay.portal.kernel.exception.SystemException { 816 return getPersistence() 817 .fetchByC_EA(companyId, emailAddress, retrieveFromCache); 818 } 819 820 /** 821 * Returns the user where companyId = ? and facebookId = ? or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found. 822 * 823 * @param companyId the company ID 824 * @param facebookId the facebook ID 825 * @return the matching user 826 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 827 * @throws SystemException if a system exception occurred 828 */ 829 public static com.liferay.portal.model.User findByC_FID(long companyId, 830 long facebookId) 831 throws com.liferay.portal.NoSuchUserException, 832 com.liferay.portal.kernel.exception.SystemException { 833 return getPersistence().findByC_FID(companyId, facebookId); 834 } 835 836 /** 837 * Returns the user where companyId = ? and facebookId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 838 * 839 * @param companyId the company ID 840 * @param facebookId the facebook ID 841 * @return the matching user, or <code>null</code> if a matching user could not be found 842 * @throws SystemException if a system exception occurred 843 */ 844 public static com.liferay.portal.model.User fetchByC_FID(long companyId, 845 long facebookId) 846 throws com.liferay.portal.kernel.exception.SystemException { 847 return getPersistence().fetchByC_FID(companyId, facebookId); 848 } 849 850 /** 851 * Returns the user where companyId = ? and facebookId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 852 * 853 * @param companyId the company ID 854 * @param facebookId the facebook ID 855 * @param retrieveFromCache whether to use the finder cache 856 * @return the matching user, or <code>null</code> if a matching user could not be found 857 * @throws SystemException if a system exception occurred 858 */ 859 public static com.liferay.portal.model.User fetchByC_FID(long companyId, 860 long facebookId, boolean retrieveFromCache) 861 throws com.liferay.portal.kernel.exception.SystemException { 862 return getPersistence() 863 .fetchByC_FID(companyId, facebookId, retrieveFromCache); 864 } 865 866 /** 867 * Returns the user where companyId = ? and openId = ? or throws a {@link com.liferay.portal.NoSuchUserException} if it could not be found. 868 * 869 * @param companyId the company ID 870 * @param openId the open ID 871 * @return the matching user 872 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 873 * @throws SystemException if a system exception occurred 874 */ 875 public static com.liferay.portal.model.User findByC_O(long companyId, 876 java.lang.String openId) 877 throws com.liferay.portal.NoSuchUserException, 878 com.liferay.portal.kernel.exception.SystemException { 879 return getPersistence().findByC_O(companyId, openId); 880 } 881 882 /** 883 * Returns the user where companyId = ? and openId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 884 * 885 * @param companyId the company ID 886 * @param openId the open ID 887 * @return the matching user, or <code>null</code> if a matching user could not be found 888 * @throws SystemException if a system exception occurred 889 */ 890 public static com.liferay.portal.model.User fetchByC_O(long companyId, 891 java.lang.String openId) 892 throws com.liferay.portal.kernel.exception.SystemException { 893 return getPersistence().fetchByC_O(companyId, openId); 894 } 895 896 /** 897 * Returns the user where companyId = ? and openId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 898 * 899 * @param companyId the company ID 900 * @param openId the open ID 901 * @param retrieveFromCache whether to use the finder cache 902 * @return the matching user, or <code>null</code> if a matching user could not be found 903 * @throws SystemException if a system exception occurred 904 */ 905 public static com.liferay.portal.model.User fetchByC_O(long companyId, 906 java.lang.String openId, boolean retrieveFromCache) 907 throws com.liferay.portal.kernel.exception.SystemException { 908 return getPersistence().fetchByC_O(companyId, openId, retrieveFromCache); 909 } 910 911 /** 912 * Returns all the users where companyId = ? and status = ?. 913 * 914 * @param companyId the company ID 915 * @param status the status 916 * @return the matching users 917 * @throws SystemException if a system exception occurred 918 */ 919 public static java.util.List<com.liferay.portal.model.User> findByC_S( 920 long companyId, int status) 921 throws com.liferay.portal.kernel.exception.SystemException { 922 return getPersistence().findByC_S(companyId, status); 923 } 924 925 /** 926 * Returns a range of all the users where companyId = ? and status = ?. 927 * 928 * <p> 929 * 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. 930 * </p> 931 * 932 * @param companyId the company ID 933 * @param status the status 934 * @param start the lower bound of the range of users 935 * @param end the upper bound of the range of users (not inclusive) 936 * @return the range of matching users 937 * @throws SystemException if a system exception occurred 938 */ 939 public static java.util.List<com.liferay.portal.model.User> findByC_S( 940 long companyId, int status, int start, int end) 941 throws com.liferay.portal.kernel.exception.SystemException { 942 return getPersistence().findByC_S(companyId, status, start, end); 943 } 944 945 /** 946 * Returns an ordered range of all the users where companyId = ? and status = ?. 947 * 948 * <p> 949 * 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. 950 * </p> 951 * 952 * @param companyId the company ID 953 * @param status the status 954 * @param start the lower bound of the range of users 955 * @param end the upper bound of the range of users (not inclusive) 956 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 957 * @return the ordered range of matching users 958 * @throws SystemException if a system exception occurred 959 */ 960 public static java.util.List<com.liferay.portal.model.User> findByC_S( 961 long companyId, int status, int start, int end, 962 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 963 throws com.liferay.portal.kernel.exception.SystemException { 964 return getPersistence() 965 .findByC_S(companyId, status, start, end, orderByComparator); 966 } 967 968 /** 969 * Returns the first user in the ordered set where companyId = ? and status = ?. 970 * 971 * <p> 972 * 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. 973 * </p> 974 * 975 * @param companyId the company ID 976 * @param status the status 977 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 978 * @return the first matching user 979 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 980 * @throws SystemException if a system exception occurred 981 */ 982 public static com.liferay.portal.model.User findByC_S_First( 983 long companyId, int status, 984 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 985 throws com.liferay.portal.NoSuchUserException, 986 com.liferay.portal.kernel.exception.SystemException { 987 return getPersistence() 988 .findByC_S_First(companyId, status, orderByComparator); 989 } 990 991 /** 992 * Returns the last user in the ordered set where companyId = ? and status = ?. 993 * 994 * <p> 995 * 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. 996 * </p> 997 * 998 * @param companyId the company ID 999 * @param status the status 1000 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1001 * @return the last matching user 1002 * @throws com.liferay.portal.NoSuchUserException if a matching user could not be found 1003 * @throws SystemException if a system exception occurred 1004 */ 1005 public static com.liferay.portal.model.User findByC_S_Last(long companyId, 1006 int status, 1007 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1008 throws com.liferay.portal.NoSuchUserException, 1009 com.liferay.portal.kernel.exception.SystemException { 1010 return getPersistence() 1011 .findByC_S_Last(companyId, status, orderByComparator); 1012 } 1013 1014 /** 1015 * Returns the users before and after the current user in the ordered set where companyId = ? and status = ?. 1016 * 1017 * <p> 1018 * 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. 1019 * </p> 1020 * 1021 * @param userId the primary key of the current user 1022 * @param companyId the company ID 1023 * @param status the status 1024 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 1025 * @return the previous, current, and next user 1026 * @throws com.liferay.portal.NoSuchUserException if a user with the primary key could not be found 1027 * @throws SystemException if a system exception occurred 1028 */ 1029 public static com.liferay.portal.model.User[] findByC_S_PrevAndNext( 1030 long userId, long companyId, int status, 1031 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1032 throws com.liferay.portal.NoSuchUserException, 1033 com.liferay.portal.kernel.exception.SystemException { 1034 return getPersistence() 1035 .findByC_S_PrevAndNext(userId, companyId, status, 1036 orderByComparator); 1037 } 1038 1039 /** 1040 * Returns all the users. 1041 * 1042 * @return the users 1043 * @throws SystemException if a system exception occurred 1044 */ 1045 public static java.util.List<com.liferay.portal.model.User> findAll() 1046 throws com.liferay.portal.kernel.exception.SystemException { 1047 return getPersistence().findAll(); 1048 } 1049 1050 /** 1051 * Returns a range of all the users. 1052 * 1053 * <p> 1054 * 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. 1055 * </p> 1056 * 1057 * @param start the lower bound of the range of users 1058 * @param end the upper bound of the range of users (not inclusive) 1059 * @return the range of users 1060 * @throws SystemException if a system exception occurred 1061 */ 1062 public static java.util.List<com.liferay.portal.model.User> findAll( 1063 int start, int end) 1064 throws com.liferay.portal.kernel.exception.SystemException { 1065 return getPersistence().findAll(start, end); 1066 } 1067 1068 /** 1069 * Returns an ordered range of all the users. 1070 * 1071 * <p> 1072 * 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. 1073 * </p> 1074 * 1075 * @param start the lower bound of the range of users 1076 * @param end the upper bound of the range of users (not inclusive) 1077 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1078 * @return the ordered range of users 1079 * @throws SystemException if a system exception occurred 1080 */ 1081 public static java.util.List<com.liferay.portal.model.User> findAll( 1082 int start, int end, 1083 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1084 throws com.liferay.portal.kernel.exception.SystemException { 1085 return getPersistence().findAll(start, end, orderByComparator); 1086 } 1087 1088 /** 1089 * Removes all the users where uuid = ? from the database. 1090 * 1091 * @param uuid the uuid 1092 * @throws SystemException if a system exception occurred 1093 */ 1094 public static void removeByUuid(java.lang.String uuid) 1095 throws com.liferay.portal.kernel.exception.SystemException { 1096 getPersistence().removeByUuid(uuid); 1097 } 1098 1099 /** 1100 * Removes all the users where companyId = ? from the database. 1101 * 1102 * @param companyId the company ID 1103 * @throws SystemException if a system exception occurred 1104 */ 1105 public static void removeByCompanyId(long companyId) 1106 throws com.liferay.portal.kernel.exception.SystemException { 1107 getPersistence().removeByCompanyId(companyId); 1108 } 1109 1110 /** 1111 * Removes the user where contactId = ? from the database. 1112 * 1113 * @param contactId the contact ID 1114 * @throws SystemException if a system exception occurred 1115 */ 1116 public static void removeByContactId(long contactId) 1117 throws com.liferay.portal.NoSuchUserException, 1118 com.liferay.portal.kernel.exception.SystemException { 1119 getPersistence().removeByContactId(contactId); 1120 } 1121 1122 /** 1123 * Removes all the users where emailAddress = ? from the database. 1124 * 1125 * @param emailAddress the email address 1126 * @throws SystemException if a system exception occurred 1127 */ 1128 public static void removeByEmailAddress(java.lang.String emailAddress) 1129 throws com.liferay.portal.kernel.exception.SystemException { 1130 getPersistence().removeByEmailAddress(emailAddress); 1131 } 1132 1133 /** 1134 * Removes the user where portraitId = ? from the database. 1135 * 1136 * @param portraitId the portrait ID 1137 * @throws SystemException if a system exception occurred 1138 */ 1139 public static void removeByPortraitId(long portraitId) 1140 throws com.liferay.portal.NoSuchUserException, 1141 com.liferay.portal.kernel.exception.SystemException { 1142 getPersistence().removeByPortraitId(portraitId); 1143 } 1144 1145 /** 1146 * Removes the user where companyId = ? and userId = ? from the database. 1147 * 1148 * @param companyId the company ID 1149 * @param userId the user ID 1150 * @throws SystemException if a system exception occurred 1151 */ 1152 public static void removeByC_U(long companyId, long userId) 1153 throws com.liferay.portal.NoSuchUserException, 1154 com.liferay.portal.kernel.exception.SystemException { 1155 getPersistence().removeByC_U(companyId, userId); 1156 } 1157 1158 /** 1159 * Removes the user where companyId = ? and defaultUser = ? from the database. 1160 * 1161 * @param companyId the company ID 1162 * @param defaultUser the default user 1163 * @throws SystemException if a system exception occurred 1164 */ 1165 public static void removeByC_DU(long companyId, boolean defaultUser) 1166 throws com.liferay.portal.NoSuchUserException, 1167 com.liferay.portal.kernel.exception.SystemException { 1168 getPersistence().removeByC_DU(companyId, defaultUser); 1169 } 1170 1171 /** 1172 * Removes the user where companyId = ? and screenName = ? from the database. 1173 * 1174 * @param companyId the company ID 1175 * @param screenName the screen name 1176 * @throws SystemException if a system exception occurred 1177 */ 1178 public static void removeByC_SN(long companyId, java.lang.String screenName) 1179 throws com.liferay.portal.NoSuchUserException, 1180 com.liferay.portal.kernel.exception.SystemException { 1181 getPersistence().removeByC_SN(companyId, screenName); 1182 } 1183 1184 /** 1185 * Removes the user where companyId = ? and emailAddress = ? from the database. 1186 * 1187 * @param companyId the company ID 1188 * @param emailAddress the email address 1189 * @throws SystemException if a system exception occurred 1190 */ 1191 public static void removeByC_EA(long companyId, 1192 java.lang.String emailAddress) 1193 throws com.liferay.portal.NoSuchUserException, 1194 com.liferay.portal.kernel.exception.SystemException { 1195 getPersistence().removeByC_EA(companyId, emailAddress); 1196 } 1197 1198 /** 1199 * Removes the user where companyId = ? and facebookId = ? from the database. 1200 * 1201 * @param companyId the company ID 1202 * @param facebookId the facebook ID 1203 * @throws SystemException if a system exception occurred 1204 */ 1205 public static void removeByC_FID(long companyId, long facebookId) 1206 throws com.liferay.portal.NoSuchUserException, 1207 com.liferay.portal.kernel.exception.SystemException { 1208 getPersistence().removeByC_FID(companyId, facebookId); 1209 } 1210 1211 /** 1212 * Removes the user where companyId = ? and openId = ? from the database. 1213 * 1214 * @param companyId the company ID 1215 * @param openId the open ID 1216 * @throws SystemException if a system exception occurred 1217 */ 1218 public static void removeByC_O(long companyId, java.lang.String openId) 1219 throws com.liferay.portal.NoSuchUserException, 1220 com.liferay.portal.kernel.exception.SystemException { 1221 getPersistence().removeByC_O(companyId, openId); 1222 } 1223 1224 /** 1225 * Removes all the users where companyId = ? and status = ? from the database. 1226 * 1227 * @param companyId the company ID 1228 * @param status the status 1229 * @throws SystemException if a system exception occurred 1230 */ 1231 public static void removeByC_S(long companyId, int status) 1232 throws com.liferay.portal.kernel.exception.SystemException { 1233 getPersistence().removeByC_S(companyId, status); 1234 } 1235 1236 /** 1237 * Removes all the users from the database. 1238 * 1239 * @throws SystemException if a system exception occurred 1240 */ 1241 public static void removeAll() 1242 throws com.liferay.portal.kernel.exception.SystemException { 1243 getPersistence().removeAll(); 1244 } 1245 1246 /** 1247 * Returns the number of users where uuid = ?. 1248 * 1249 * @param uuid the uuid 1250 * @return the number of matching users 1251 * @throws SystemException if a system exception occurred 1252 */ 1253 public static int countByUuid(java.lang.String uuid) 1254 throws com.liferay.portal.kernel.exception.SystemException { 1255 return getPersistence().countByUuid(uuid); 1256 } 1257 1258 /** 1259 * Returns the number of users where companyId = ?. 1260 * 1261 * @param companyId the company ID 1262 * @return the number of matching users 1263 * @throws SystemException if a system exception occurred 1264 */ 1265 public static int countByCompanyId(long companyId) 1266 throws com.liferay.portal.kernel.exception.SystemException { 1267 return getPersistence().countByCompanyId(companyId); 1268 } 1269 1270 /** 1271 * Returns the number of users where contactId = ?. 1272 * 1273 * @param contactId the contact ID 1274 * @return the number of matching users 1275 * @throws SystemException if a system exception occurred 1276 */ 1277 public static int countByContactId(long contactId) 1278 throws com.liferay.portal.kernel.exception.SystemException { 1279 return getPersistence().countByContactId(contactId); 1280 } 1281 1282 /** 1283 * Returns the number of users where emailAddress = ?. 1284 * 1285 * @param emailAddress the email address 1286 * @return the number of matching users 1287 * @throws SystemException if a system exception occurred 1288 */ 1289 public static int countByEmailAddress(java.lang.String emailAddress) 1290 throws com.liferay.portal.kernel.exception.SystemException { 1291 return getPersistence().countByEmailAddress(emailAddress); 1292 } 1293 1294 /** 1295 * Returns the number of users where portraitId = ?. 1296 * 1297 * @param portraitId the portrait ID 1298 * @return the number of matching users 1299 * @throws SystemException if a system exception occurred 1300 */ 1301 public static int countByPortraitId(long portraitId) 1302 throws com.liferay.portal.kernel.exception.SystemException { 1303 return getPersistence().countByPortraitId(portraitId); 1304 } 1305 1306 /** 1307 * Returns the number of users where companyId = ? and userId = ?. 1308 * 1309 * @param companyId the company ID 1310 * @param userId the user ID 1311 * @return the number of matching users 1312 * @throws SystemException if a system exception occurred 1313 */ 1314 public static int countByC_U(long companyId, long userId) 1315 throws com.liferay.portal.kernel.exception.SystemException { 1316 return getPersistence().countByC_U(companyId, userId); 1317 } 1318 1319 /** 1320 * Returns the number of users where companyId = ? and defaultUser = ?. 1321 * 1322 * @param companyId the company ID 1323 * @param defaultUser the default user 1324 * @return the number of matching users 1325 * @throws SystemException if a system exception occurred 1326 */ 1327 public static int countByC_DU(long companyId, boolean defaultUser) 1328 throws com.liferay.portal.kernel.exception.SystemException { 1329 return getPersistence().countByC_DU(companyId, defaultUser); 1330 } 1331 1332 /** 1333 * Returns the number of users where companyId = ? and screenName = ?. 1334 * 1335 * @param companyId the company ID 1336 * @param screenName the screen name 1337 * @return the number of matching users 1338 * @throws SystemException if a system exception occurred 1339 */ 1340 public static int countByC_SN(long companyId, java.lang.String screenName) 1341 throws com.liferay.portal.kernel.exception.SystemException { 1342 return getPersistence().countByC_SN(companyId, screenName); 1343 } 1344 1345 /** 1346 * Returns the number of users where companyId = ? and emailAddress = ?. 1347 * 1348 * @param companyId the company ID 1349 * @param emailAddress the email address 1350 * @return the number of matching users 1351 * @throws SystemException if a system exception occurred 1352 */ 1353 public static int countByC_EA(long companyId, java.lang.String emailAddress) 1354 throws com.liferay.portal.kernel.exception.SystemException { 1355 return getPersistence().countByC_EA(companyId, emailAddress); 1356 } 1357 1358 /** 1359 * Returns the number of users where companyId = ? and facebookId = ?. 1360 * 1361 * @param companyId the company ID 1362 * @param facebookId the facebook ID 1363 * @return the number of matching users 1364 * @throws SystemException if a system exception occurred 1365 */ 1366 public static int countByC_FID(long companyId, long facebookId) 1367 throws com.liferay.portal.kernel.exception.SystemException { 1368 return getPersistence().countByC_FID(companyId, facebookId); 1369 } 1370 1371 /** 1372 * Returns the number of users where companyId = ? and openId = ?. 1373 * 1374 * @param companyId the company ID 1375 * @param openId the open ID 1376 * @return the number of matching users 1377 * @throws SystemException if a system exception occurred 1378 */ 1379 public static int countByC_O(long companyId, java.lang.String openId) 1380 throws com.liferay.portal.kernel.exception.SystemException { 1381 return getPersistence().countByC_O(companyId, openId); 1382 } 1383 1384 /** 1385 * Returns the number of users where companyId = ? and status = ?. 1386 * 1387 * @param companyId the company ID 1388 * @param status the status 1389 * @return the number of matching users 1390 * @throws SystemException if a system exception occurred 1391 */ 1392 public static int countByC_S(long companyId, int status) 1393 throws com.liferay.portal.kernel.exception.SystemException { 1394 return getPersistence().countByC_S(companyId, status); 1395 } 1396 1397 /** 1398 * Returns the number of users. 1399 * 1400 * @return the number of users 1401 * @throws SystemException if a system exception occurred 1402 */ 1403 public static int countAll() 1404 throws com.liferay.portal.kernel.exception.SystemException { 1405 return getPersistence().countAll(); 1406 } 1407 1408 /** 1409 * Returns all the groups associated with the user. 1410 * 1411 * @param pk the primary key of the user 1412 * @return the groups associated with the user 1413 * @throws SystemException if a system exception occurred 1414 */ 1415 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1416 long pk) throws com.liferay.portal.kernel.exception.SystemException { 1417 return getPersistence().getGroups(pk); 1418 } 1419 1420 /** 1421 * Returns a range of all the groups associated with the user. 1422 * 1423 * <p> 1424 * 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. 1425 * </p> 1426 * 1427 * @param pk the primary key of the user 1428 * @param start the lower bound of the range of users 1429 * @param end the upper bound of the range of users (not inclusive) 1430 * @return the range of groups associated with the user 1431 * @throws SystemException if a system exception occurred 1432 */ 1433 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1434 long pk, int start, int end) 1435 throws com.liferay.portal.kernel.exception.SystemException { 1436 return getPersistence().getGroups(pk, start, end); 1437 } 1438 1439 /** 1440 * Returns an ordered range of all the groups associated with the user. 1441 * 1442 * <p> 1443 * 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. 1444 * </p> 1445 * 1446 * @param pk the primary key of the user 1447 * @param start the lower bound of the range of users 1448 * @param end the upper bound of the range of users (not inclusive) 1449 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1450 * @return the ordered range of groups associated with the user 1451 * @throws SystemException if a system exception occurred 1452 */ 1453 public static java.util.List<com.liferay.portal.model.Group> getGroups( 1454 long pk, int start, int end, 1455 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1456 throws com.liferay.portal.kernel.exception.SystemException { 1457 return getPersistence().getGroups(pk, start, end, orderByComparator); 1458 } 1459 1460 /** 1461 * Returns the number of groups associated with the user. 1462 * 1463 * @param pk the primary key of the user 1464 * @return the number of groups associated with the user 1465 * @throws SystemException if a system exception occurred 1466 */ 1467 public static int getGroupsSize(long pk) 1468 throws com.liferay.portal.kernel.exception.SystemException { 1469 return getPersistence().getGroupsSize(pk); 1470 } 1471 1472 /** 1473 * Returns <code>true</code> if the group is associated with the user. 1474 * 1475 * @param pk the primary key of the user 1476 * @param groupPK the primary key of the group 1477 * @return <code>true</code> if the group is associated with the user; <code>false</code> otherwise 1478 * @throws SystemException if a system exception occurred 1479 */ 1480 public static boolean containsGroup(long pk, long groupPK) 1481 throws com.liferay.portal.kernel.exception.SystemException { 1482 return getPersistence().containsGroup(pk, groupPK); 1483 } 1484 1485 /** 1486 * Returns <code>true</code> if the user has any groups associated with it. 1487 * 1488 * @param pk the primary key of the user to check for associations with groups 1489 * @return <code>true</code> if the user has any groups associated with it; <code>false</code> otherwise 1490 * @throws SystemException if a system exception occurred 1491 */ 1492 public static boolean containsGroups(long pk) 1493 throws com.liferay.portal.kernel.exception.SystemException { 1494 return getPersistence().containsGroups(pk); 1495 } 1496 1497 /** 1498 * Adds an association between the user and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1499 * 1500 * @param pk the primary key of the user 1501 * @param groupPK the primary key of the group 1502 * @throws SystemException if a system exception occurred 1503 */ 1504 public static void addGroup(long pk, long groupPK) 1505 throws com.liferay.portal.kernel.exception.SystemException { 1506 getPersistence().addGroup(pk, groupPK); 1507 } 1508 1509 /** 1510 * Adds an association between the user and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1511 * 1512 * @param pk the primary key of the user 1513 * @param group the group 1514 * @throws SystemException if a system exception occurred 1515 */ 1516 public static void addGroup(long pk, com.liferay.portal.model.Group group) 1517 throws com.liferay.portal.kernel.exception.SystemException { 1518 getPersistence().addGroup(pk, group); 1519 } 1520 1521 /** 1522 * Adds an association between the user and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1523 * 1524 * @param pk the primary key of the user 1525 * @param groupPKs the primary keys of the groups 1526 * @throws SystemException if a system exception occurred 1527 */ 1528 public static void addGroups(long pk, long[] groupPKs) 1529 throws com.liferay.portal.kernel.exception.SystemException { 1530 getPersistence().addGroups(pk, groupPKs); 1531 } 1532 1533 /** 1534 * Adds an association between the user and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1535 * 1536 * @param pk the primary key of the user 1537 * @param groups the groups 1538 * @throws SystemException if a system exception occurred 1539 */ 1540 public static void addGroups(long pk, 1541 java.util.List<com.liferay.portal.model.Group> groups) 1542 throws com.liferay.portal.kernel.exception.SystemException { 1543 getPersistence().addGroups(pk, groups); 1544 } 1545 1546 /** 1547 * Clears all associations between the user and its groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1548 * 1549 * @param pk the primary key of the user to clear the associated groups from 1550 * @throws SystemException if a system exception occurred 1551 */ 1552 public static void clearGroups(long pk) 1553 throws com.liferay.portal.kernel.exception.SystemException { 1554 getPersistence().clearGroups(pk); 1555 } 1556 1557 /** 1558 * Removes the association between the user and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1559 * 1560 * @param pk the primary key of the user 1561 * @param groupPK the primary key of the group 1562 * @throws SystemException if a system exception occurred 1563 */ 1564 public static void removeGroup(long pk, long groupPK) 1565 throws com.liferay.portal.kernel.exception.SystemException { 1566 getPersistence().removeGroup(pk, groupPK); 1567 } 1568 1569 /** 1570 * Removes the association between the user and the group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1571 * 1572 * @param pk the primary key of the user 1573 * @param group the group 1574 * @throws SystemException if a system exception occurred 1575 */ 1576 public static void removeGroup(long pk, com.liferay.portal.model.Group group) 1577 throws com.liferay.portal.kernel.exception.SystemException { 1578 getPersistence().removeGroup(pk, group); 1579 } 1580 1581 /** 1582 * Removes the association between the user and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1583 * 1584 * @param pk the primary key of the user 1585 * @param groupPKs the primary keys of the groups 1586 * @throws SystemException if a system exception occurred 1587 */ 1588 public static void removeGroups(long pk, long[] groupPKs) 1589 throws com.liferay.portal.kernel.exception.SystemException { 1590 getPersistence().removeGroups(pk, groupPKs); 1591 } 1592 1593 /** 1594 * Removes the association between the user and the groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1595 * 1596 * @param pk the primary key of the user 1597 * @param groups the groups 1598 * @throws SystemException if a system exception occurred 1599 */ 1600 public static void removeGroups(long pk, 1601 java.util.List<com.liferay.portal.model.Group> groups) 1602 throws com.liferay.portal.kernel.exception.SystemException { 1603 getPersistence().removeGroups(pk, groups); 1604 } 1605 1606 /** 1607 * Sets the groups associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1608 * 1609 * @param pk the primary key of the user 1610 * @param groupPKs the primary keys of the groups to be associated with the user 1611 * @throws SystemException if a system exception occurred 1612 */ 1613 public static void setGroups(long pk, long[] groupPKs) 1614 throws com.liferay.portal.kernel.exception.SystemException { 1615 getPersistence().setGroups(pk, groupPKs); 1616 } 1617 1618 /** 1619 * Sets the groups associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1620 * 1621 * @param pk the primary key of the user 1622 * @param groups the groups to be associated with the user 1623 * @throws SystemException if a system exception occurred 1624 */ 1625 public static void setGroups(long pk, 1626 java.util.List<com.liferay.portal.model.Group> groups) 1627 throws com.liferay.portal.kernel.exception.SystemException { 1628 getPersistence().setGroups(pk, groups); 1629 } 1630 1631 /** 1632 * Returns all the organizations associated with the user. 1633 * 1634 * @param pk the primary key of the user 1635 * @return the organizations associated with the user 1636 * @throws SystemException if a system exception occurred 1637 */ 1638 public static java.util.List<com.liferay.portal.model.Organization> getOrganizations( 1639 long pk) throws com.liferay.portal.kernel.exception.SystemException { 1640 return getPersistence().getOrganizations(pk); 1641 } 1642 1643 /** 1644 * Returns a range of all the organizations associated with the user. 1645 * 1646 * <p> 1647 * 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. 1648 * </p> 1649 * 1650 * @param pk the primary key of the user 1651 * @param start the lower bound of the range of users 1652 * @param end the upper bound of the range of users (not inclusive) 1653 * @return the range of organizations associated with the user 1654 * @throws SystemException if a system exception occurred 1655 */ 1656 public static java.util.List<com.liferay.portal.model.Organization> getOrganizations( 1657 long pk, int start, int end) 1658 throws com.liferay.portal.kernel.exception.SystemException { 1659 return getPersistence().getOrganizations(pk, start, end); 1660 } 1661 1662 /** 1663 * Returns an ordered range of all the organizations associated with the user. 1664 * 1665 * <p> 1666 * 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. 1667 * </p> 1668 * 1669 * @param pk the primary key of the user 1670 * @param start the lower bound of the range of users 1671 * @param end the upper bound of the range of users (not inclusive) 1672 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1673 * @return the ordered range of organizations associated with the user 1674 * @throws SystemException if a system exception occurred 1675 */ 1676 public static java.util.List<com.liferay.portal.model.Organization> getOrganizations( 1677 long pk, int start, int end, 1678 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1679 throws com.liferay.portal.kernel.exception.SystemException { 1680 return getPersistence() 1681 .getOrganizations(pk, start, end, orderByComparator); 1682 } 1683 1684 /** 1685 * Returns the number of organizations associated with the user. 1686 * 1687 * @param pk the primary key of the user 1688 * @return the number of organizations associated with the user 1689 * @throws SystemException if a system exception occurred 1690 */ 1691 public static int getOrganizationsSize(long pk) 1692 throws com.liferay.portal.kernel.exception.SystemException { 1693 return getPersistence().getOrganizationsSize(pk); 1694 } 1695 1696 /** 1697 * Returns <code>true</code> if the organization is associated with the user. 1698 * 1699 * @param pk the primary key of the user 1700 * @param organizationPK the primary key of the organization 1701 * @return <code>true</code> if the organization is associated with the user; <code>false</code> otherwise 1702 * @throws SystemException if a system exception occurred 1703 */ 1704 public static boolean containsOrganization(long pk, long organizationPK) 1705 throws com.liferay.portal.kernel.exception.SystemException { 1706 return getPersistence().containsOrganization(pk, organizationPK); 1707 } 1708 1709 /** 1710 * Returns <code>true</code> if the user has any organizations associated with it. 1711 * 1712 * @param pk the primary key of the user to check for associations with organizations 1713 * @return <code>true</code> if the user has any organizations associated with it; <code>false</code> otherwise 1714 * @throws SystemException if a system exception occurred 1715 */ 1716 public static boolean containsOrganizations(long pk) 1717 throws com.liferay.portal.kernel.exception.SystemException { 1718 return getPersistence().containsOrganizations(pk); 1719 } 1720 1721 /** 1722 * Adds an association between the user and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1723 * 1724 * @param pk the primary key of the user 1725 * @param organizationPK the primary key of the organization 1726 * @throws SystemException if a system exception occurred 1727 */ 1728 public static void addOrganization(long pk, long organizationPK) 1729 throws com.liferay.portal.kernel.exception.SystemException { 1730 getPersistence().addOrganization(pk, organizationPK); 1731 } 1732 1733 /** 1734 * Adds an association between the user and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1735 * 1736 * @param pk the primary key of the user 1737 * @param organization the organization 1738 * @throws SystemException if a system exception occurred 1739 */ 1740 public static void addOrganization(long pk, 1741 com.liferay.portal.model.Organization organization) 1742 throws com.liferay.portal.kernel.exception.SystemException { 1743 getPersistence().addOrganization(pk, organization); 1744 } 1745 1746 /** 1747 * Adds an association between the user and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1748 * 1749 * @param pk the primary key of the user 1750 * @param organizationPKs the primary keys of the organizations 1751 * @throws SystemException if a system exception occurred 1752 */ 1753 public static void addOrganizations(long pk, long[] organizationPKs) 1754 throws com.liferay.portal.kernel.exception.SystemException { 1755 getPersistence().addOrganizations(pk, organizationPKs); 1756 } 1757 1758 /** 1759 * Adds an association between the user and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1760 * 1761 * @param pk the primary key of the user 1762 * @param organizations the organizations 1763 * @throws SystemException if a system exception occurred 1764 */ 1765 public static void addOrganizations(long pk, 1766 java.util.List<com.liferay.portal.model.Organization> organizations) 1767 throws com.liferay.portal.kernel.exception.SystemException { 1768 getPersistence().addOrganizations(pk, organizations); 1769 } 1770 1771 /** 1772 * Clears all associations between the user and its organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1773 * 1774 * @param pk the primary key of the user to clear the associated organizations from 1775 * @throws SystemException if a system exception occurred 1776 */ 1777 public static void clearOrganizations(long pk) 1778 throws com.liferay.portal.kernel.exception.SystemException { 1779 getPersistence().clearOrganizations(pk); 1780 } 1781 1782 /** 1783 * Removes the association between the user and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1784 * 1785 * @param pk the primary key of the user 1786 * @param organizationPK the primary key of the organization 1787 * @throws SystemException if a system exception occurred 1788 */ 1789 public static void removeOrganization(long pk, long organizationPK) 1790 throws com.liferay.portal.kernel.exception.SystemException { 1791 getPersistence().removeOrganization(pk, organizationPK); 1792 } 1793 1794 /** 1795 * Removes the association between the user and the organization. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1796 * 1797 * @param pk the primary key of the user 1798 * @param organization the organization 1799 * @throws SystemException if a system exception occurred 1800 */ 1801 public static void removeOrganization(long pk, 1802 com.liferay.portal.model.Organization organization) 1803 throws com.liferay.portal.kernel.exception.SystemException { 1804 getPersistence().removeOrganization(pk, organization); 1805 } 1806 1807 /** 1808 * Removes the association between the user and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1809 * 1810 * @param pk the primary key of the user 1811 * @param organizationPKs the primary keys of the organizations 1812 * @throws SystemException if a system exception occurred 1813 */ 1814 public static void removeOrganizations(long pk, long[] organizationPKs) 1815 throws com.liferay.portal.kernel.exception.SystemException { 1816 getPersistence().removeOrganizations(pk, organizationPKs); 1817 } 1818 1819 /** 1820 * Removes the association between the user and the organizations. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1821 * 1822 * @param pk the primary key of the user 1823 * @param organizations the organizations 1824 * @throws SystemException if a system exception occurred 1825 */ 1826 public static void removeOrganizations(long pk, 1827 java.util.List<com.liferay.portal.model.Organization> organizations) 1828 throws com.liferay.portal.kernel.exception.SystemException { 1829 getPersistence().removeOrganizations(pk, organizations); 1830 } 1831 1832 /** 1833 * Sets the organizations associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1834 * 1835 * @param pk the primary key of the user 1836 * @param organizationPKs the primary keys of the organizations to be associated with the user 1837 * @throws SystemException if a system exception occurred 1838 */ 1839 public static void setOrganizations(long pk, long[] organizationPKs) 1840 throws com.liferay.portal.kernel.exception.SystemException { 1841 getPersistence().setOrganizations(pk, organizationPKs); 1842 } 1843 1844 /** 1845 * Sets the organizations associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1846 * 1847 * @param pk the primary key of the user 1848 * @param organizations the organizations to be associated with the user 1849 * @throws SystemException if a system exception occurred 1850 */ 1851 public static void setOrganizations(long pk, 1852 java.util.List<com.liferay.portal.model.Organization> organizations) 1853 throws com.liferay.portal.kernel.exception.SystemException { 1854 getPersistence().setOrganizations(pk, organizations); 1855 } 1856 1857 /** 1858 * Returns all the permissions associated with the user. 1859 * 1860 * @param pk the primary key of the user 1861 * @return the permissions associated with the user 1862 * @throws SystemException if a system exception occurred 1863 */ 1864 public static java.util.List<com.liferay.portal.model.Permission> getPermissions( 1865 long pk) throws com.liferay.portal.kernel.exception.SystemException { 1866 return getPersistence().getPermissions(pk); 1867 } 1868 1869 /** 1870 * Returns a range of all the permissions associated with the user. 1871 * 1872 * <p> 1873 * 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. 1874 * </p> 1875 * 1876 * @param pk the primary key of the user 1877 * @param start the lower bound of the range of users 1878 * @param end the upper bound of the range of users (not inclusive) 1879 * @return the range of permissions associated with the user 1880 * @throws SystemException if a system exception occurred 1881 */ 1882 public static java.util.List<com.liferay.portal.model.Permission> getPermissions( 1883 long pk, int start, int end) 1884 throws com.liferay.portal.kernel.exception.SystemException { 1885 return getPersistence().getPermissions(pk, start, end); 1886 } 1887 1888 /** 1889 * Returns an ordered range of all the permissions associated with the user. 1890 * 1891 * <p> 1892 * 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. 1893 * </p> 1894 * 1895 * @param pk the primary key of the user 1896 * @param start the lower bound of the range of users 1897 * @param end the upper bound of the range of users (not inclusive) 1898 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1899 * @return the ordered range of permissions associated with the user 1900 * @throws SystemException if a system exception occurred 1901 */ 1902 public static java.util.List<com.liferay.portal.model.Permission> getPermissions( 1903 long pk, int start, int end, 1904 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1905 throws com.liferay.portal.kernel.exception.SystemException { 1906 return getPersistence().getPermissions(pk, start, end, orderByComparator); 1907 } 1908 1909 /** 1910 * Returns the number of permissions associated with the user. 1911 * 1912 * @param pk the primary key of the user 1913 * @return the number of permissions associated with the user 1914 * @throws SystemException if a system exception occurred 1915 */ 1916 public static int getPermissionsSize(long pk) 1917 throws com.liferay.portal.kernel.exception.SystemException { 1918 return getPersistence().getPermissionsSize(pk); 1919 } 1920 1921 /** 1922 * Returns <code>true</code> if the permission is associated with the user. 1923 * 1924 * @param pk the primary key of the user 1925 * @param permissionPK the primary key of the permission 1926 * @return <code>true</code> if the permission is associated with the user; <code>false</code> otherwise 1927 * @throws SystemException if a system exception occurred 1928 */ 1929 public static boolean containsPermission(long pk, long permissionPK) 1930 throws com.liferay.portal.kernel.exception.SystemException { 1931 return getPersistence().containsPermission(pk, permissionPK); 1932 } 1933 1934 /** 1935 * Returns <code>true</code> if the user has any permissions associated with it. 1936 * 1937 * @param pk the primary key of the user to check for associations with permissions 1938 * @return <code>true</code> if the user has any permissions associated with it; <code>false</code> otherwise 1939 * @throws SystemException if a system exception occurred 1940 */ 1941 public static boolean containsPermissions(long pk) 1942 throws com.liferay.portal.kernel.exception.SystemException { 1943 return getPersistence().containsPermissions(pk); 1944 } 1945 1946 /** 1947 * Adds an association between the user and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1948 * 1949 * @param pk the primary key of the user 1950 * @param permissionPK the primary key of the permission 1951 * @throws SystemException if a system exception occurred 1952 */ 1953 public static void addPermission(long pk, long permissionPK) 1954 throws com.liferay.portal.kernel.exception.SystemException { 1955 getPersistence().addPermission(pk, permissionPK); 1956 } 1957 1958 /** 1959 * Adds an association between the user and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1960 * 1961 * @param pk the primary key of the user 1962 * @param permission the permission 1963 * @throws SystemException if a system exception occurred 1964 */ 1965 public static void addPermission(long pk, 1966 com.liferay.portal.model.Permission permission) 1967 throws com.liferay.portal.kernel.exception.SystemException { 1968 getPersistence().addPermission(pk, permission); 1969 } 1970 1971 /** 1972 * Adds an association between the user and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1973 * 1974 * @param pk the primary key of the user 1975 * @param permissionPKs the primary keys of the permissions 1976 * @throws SystemException if a system exception occurred 1977 */ 1978 public static void addPermissions(long pk, long[] permissionPKs) 1979 throws com.liferay.portal.kernel.exception.SystemException { 1980 getPersistence().addPermissions(pk, permissionPKs); 1981 } 1982 1983 /** 1984 * Adds an association between the user and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1985 * 1986 * @param pk the primary key of the user 1987 * @param permissions the permissions 1988 * @throws SystemException if a system exception occurred 1989 */ 1990 public static void addPermissions(long pk, 1991 java.util.List<com.liferay.portal.model.Permission> permissions) 1992 throws com.liferay.portal.kernel.exception.SystemException { 1993 getPersistence().addPermissions(pk, permissions); 1994 } 1995 1996 /** 1997 * Clears all associations between the user and its permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 1998 * 1999 * @param pk the primary key of the user to clear the associated permissions from 2000 * @throws SystemException if a system exception occurred 2001 */ 2002 public static void clearPermissions(long pk) 2003 throws com.liferay.portal.kernel.exception.SystemException { 2004 getPersistence().clearPermissions(pk); 2005 } 2006 2007 /** 2008 * Removes the association between the user and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2009 * 2010 * @param pk the primary key of the user 2011 * @param permissionPK the primary key of the permission 2012 * @throws SystemException if a system exception occurred 2013 */ 2014 public static void removePermission(long pk, long permissionPK) 2015 throws com.liferay.portal.kernel.exception.SystemException { 2016 getPersistence().removePermission(pk, permissionPK); 2017 } 2018 2019 /** 2020 * Removes the association between the user and the permission. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2021 * 2022 * @param pk the primary key of the user 2023 * @param permission the permission 2024 * @throws SystemException if a system exception occurred 2025 */ 2026 public static void removePermission(long pk, 2027 com.liferay.portal.model.Permission permission) 2028 throws com.liferay.portal.kernel.exception.SystemException { 2029 getPersistence().removePermission(pk, permission); 2030 } 2031 2032 /** 2033 * Removes the association between the user and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2034 * 2035 * @param pk the primary key of the user 2036 * @param permissionPKs the primary keys of the permissions 2037 * @throws SystemException if a system exception occurred 2038 */ 2039 public static void removePermissions(long pk, long[] permissionPKs) 2040 throws com.liferay.portal.kernel.exception.SystemException { 2041 getPersistence().removePermissions(pk, permissionPKs); 2042 } 2043 2044 /** 2045 * Removes the association between the user and the permissions. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2046 * 2047 * @param pk the primary key of the user 2048 * @param permissions the permissions 2049 * @throws SystemException if a system exception occurred 2050 */ 2051 public static void removePermissions(long pk, 2052 java.util.List<com.liferay.portal.model.Permission> permissions) 2053 throws com.liferay.portal.kernel.exception.SystemException { 2054 getPersistence().removePermissions(pk, permissions); 2055 } 2056 2057 /** 2058 * Sets the permissions associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2059 * 2060 * @param pk the primary key of the user 2061 * @param permissionPKs the primary keys of the permissions to be associated with the user 2062 * @throws SystemException if a system exception occurred 2063 */ 2064 public static void setPermissions(long pk, long[] permissionPKs) 2065 throws com.liferay.portal.kernel.exception.SystemException { 2066 getPersistence().setPermissions(pk, permissionPKs); 2067 } 2068 2069 /** 2070 * Sets the permissions associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2071 * 2072 * @param pk the primary key of the user 2073 * @param permissions the permissions to be associated with the user 2074 * @throws SystemException if a system exception occurred 2075 */ 2076 public static void setPermissions(long pk, 2077 java.util.List<com.liferay.portal.model.Permission> permissions) 2078 throws com.liferay.portal.kernel.exception.SystemException { 2079 getPersistence().setPermissions(pk, permissions); 2080 } 2081 2082 /** 2083 * Returns all the roles associated with the user. 2084 * 2085 * @param pk the primary key of the user 2086 * @return the roles associated with the user 2087 * @throws SystemException if a system exception occurred 2088 */ 2089 public static java.util.List<com.liferay.portal.model.Role> getRoles( 2090 long pk) throws com.liferay.portal.kernel.exception.SystemException { 2091 return getPersistence().getRoles(pk); 2092 } 2093 2094 /** 2095 * Returns a range of all the roles associated with the user. 2096 * 2097 * <p> 2098 * 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. 2099 * </p> 2100 * 2101 * @param pk the primary key of the user 2102 * @param start the lower bound of the range of users 2103 * @param end the upper bound of the range of users (not inclusive) 2104 * @return the range of roles associated with the user 2105 * @throws SystemException if a system exception occurred 2106 */ 2107 public static java.util.List<com.liferay.portal.model.Role> getRoles( 2108 long pk, int start, int end) 2109 throws com.liferay.portal.kernel.exception.SystemException { 2110 return getPersistence().getRoles(pk, start, end); 2111 } 2112 2113 /** 2114 * Returns an ordered range of all the roles associated with the user. 2115 * 2116 * <p> 2117 * 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. 2118 * </p> 2119 * 2120 * @param pk the primary key of the user 2121 * @param start the lower bound of the range of users 2122 * @param end the upper bound of the range of users (not inclusive) 2123 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 2124 * @return the ordered range of roles associated with the user 2125 * @throws SystemException if a system exception occurred 2126 */ 2127 public static java.util.List<com.liferay.portal.model.Role> getRoles( 2128 long pk, int start, int end, 2129 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 2130 throws com.liferay.portal.kernel.exception.SystemException { 2131 return getPersistence().getRoles(pk, start, end, orderByComparator); 2132 } 2133 2134 /** 2135 * Returns the number of roles associated with the user. 2136 * 2137 * @param pk the primary key of the user 2138 * @return the number of roles associated with the user 2139 * @throws SystemException if a system exception occurred 2140 */ 2141 public static int getRolesSize(long pk) 2142 throws com.liferay.portal.kernel.exception.SystemException { 2143 return getPersistence().getRolesSize(pk); 2144 } 2145 2146 /** 2147 * Returns <code>true</code> if the role is associated with the user. 2148 * 2149 * @param pk the primary key of the user 2150 * @param rolePK the primary key of the role 2151 * @return <code>true</code> if the role is associated with the user; <code>false</code> otherwise 2152 * @throws SystemException if a system exception occurred 2153 */ 2154 public static boolean containsRole(long pk, long rolePK) 2155 throws com.liferay.portal.kernel.exception.SystemException { 2156 return getPersistence().containsRole(pk, rolePK); 2157 } 2158 2159 /** 2160 * Returns <code>true</code> if the user has any roles associated with it. 2161 * 2162 * @param pk the primary key of the user to check for associations with roles 2163 * @return <code>true</code> if the user has any roles associated with it; <code>false</code> otherwise 2164 * @throws SystemException if a system exception occurred 2165 */ 2166 public static boolean containsRoles(long pk) 2167 throws com.liferay.portal.kernel.exception.SystemException { 2168 return getPersistence().containsRoles(pk); 2169 } 2170 2171 /** 2172 * Adds an association between the user and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2173 * 2174 * @param pk the primary key of the user 2175 * @param rolePK the primary key of the role 2176 * @throws SystemException if a system exception occurred 2177 */ 2178 public static void addRole(long pk, long rolePK) 2179 throws com.liferay.portal.kernel.exception.SystemException { 2180 getPersistence().addRole(pk, rolePK); 2181 } 2182 2183 /** 2184 * Adds an association between the user and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2185 * 2186 * @param pk the primary key of the user 2187 * @param role the role 2188 * @throws SystemException if a system exception occurred 2189 */ 2190 public static void addRole(long pk, com.liferay.portal.model.Role role) 2191 throws com.liferay.portal.kernel.exception.SystemException { 2192 getPersistence().addRole(pk, role); 2193 } 2194 2195 /** 2196 * Adds an association between the user and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2197 * 2198 * @param pk the primary key of the user 2199 * @param rolePKs the primary keys of the roles 2200 * @throws SystemException if a system exception occurred 2201 */ 2202 public static void addRoles(long pk, long[] rolePKs) 2203 throws com.liferay.portal.kernel.exception.SystemException { 2204 getPersistence().addRoles(pk, rolePKs); 2205 } 2206 2207 /** 2208 * Adds an association between the user and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2209 * 2210 * @param pk the primary key of the user 2211 * @param roles the roles 2212 * @throws SystemException if a system exception occurred 2213 */ 2214 public static void addRoles(long pk, 2215 java.util.List<com.liferay.portal.model.Role> roles) 2216 throws com.liferay.portal.kernel.exception.SystemException { 2217 getPersistence().addRoles(pk, roles); 2218 } 2219 2220 /** 2221 * Clears all associations between the user and its roles. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2222 * 2223 * @param pk the primary key of the user to clear the associated roles from 2224 * @throws SystemException if a system exception occurred 2225 */ 2226 public static void clearRoles(long pk) 2227 throws com.liferay.portal.kernel.exception.SystemException { 2228 getPersistence().clearRoles(pk); 2229 } 2230 2231 /** 2232 * Removes the association between the user and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2233 * 2234 * @param pk the primary key of the user 2235 * @param rolePK the primary key of the role 2236 * @throws SystemException if a system exception occurred 2237 */ 2238 public static void removeRole(long pk, long rolePK) 2239 throws com.liferay.portal.kernel.exception.SystemException { 2240 getPersistence().removeRole(pk, rolePK); 2241 } 2242 2243 /** 2244 * Removes the association between the user and the role. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2245 * 2246 * @param pk the primary key of the user 2247 * @param role the role 2248 * @throws SystemException if a system exception occurred 2249 */ 2250 public static void removeRole(long pk, com.liferay.portal.model.Role role) 2251 throws com.liferay.portal.kernel.exception.SystemException { 2252 getPersistence().removeRole(pk, role); 2253 } 2254 2255 /** 2256 * Removes the association between the user and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2257 * 2258 * @param pk the primary key of the user 2259 * @param rolePKs the primary keys of the roles 2260 * @throws SystemException if a system exception occurred 2261 */ 2262 public static void removeRoles(long pk, long[] rolePKs) 2263 throws com.liferay.portal.kernel.exception.SystemException { 2264 getPersistence().removeRoles(pk, rolePKs); 2265 } 2266 2267 /** 2268 * Removes the association between the user and the roles. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2269 * 2270 * @param pk the primary key of the user 2271 * @param roles the roles 2272 * @throws SystemException if a system exception occurred 2273 */ 2274 public static void removeRoles(long pk, 2275 java.util.List<com.liferay.portal.model.Role> roles) 2276 throws com.liferay.portal.kernel.exception.SystemException { 2277 getPersistence().removeRoles(pk, roles); 2278 } 2279 2280 /** 2281 * Sets the roles associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2282 * 2283 * @param pk the primary key of the user 2284 * @param rolePKs the primary keys of the roles to be associated with the user 2285 * @throws SystemException if a system exception occurred 2286 */ 2287 public static void setRoles(long pk, long[] rolePKs) 2288 throws com.liferay.portal.kernel.exception.SystemException { 2289 getPersistence().setRoles(pk, rolePKs); 2290 } 2291 2292 /** 2293 * Sets the roles associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2294 * 2295 * @param pk the primary key of the user 2296 * @param roles the roles to be associated with the user 2297 * @throws SystemException if a system exception occurred 2298 */ 2299 public static void setRoles(long pk, 2300 java.util.List<com.liferay.portal.model.Role> roles) 2301 throws com.liferay.portal.kernel.exception.SystemException { 2302 getPersistence().setRoles(pk, roles); 2303 } 2304 2305 /** 2306 * Returns all the teams associated with the user. 2307 * 2308 * @param pk the primary key of the user 2309 * @return the teams associated with the user 2310 * @throws SystemException if a system exception occurred 2311 */ 2312 public static java.util.List<com.liferay.portal.model.Team> getTeams( 2313 long pk) throws com.liferay.portal.kernel.exception.SystemException { 2314 return getPersistence().getTeams(pk); 2315 } 2316 2317 /** 2318 * Returns a range of all the teams associated with the user. 2319 * 2320 * <p> 2321 * 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. 2322 * </p> 2323 * 2324 * @param pk the primary key of the user 2325 * @param start the lower bound of the range of users 2326 * @param end the upper bound of the range of users (not inclusive) 2327 * @return the range of teams associated with the user 2328 * @throws SystemException if a system exception occurred 2329 */ 2330 public static java.util.List<com.liferay.portal.model.Team> getTeams( 2331 long pk, int start, int end) 2332 throws com.liferay.portal.kernel.exception.SystemException { 2333 return getPersistence().getTeams(pk, start, end); 2334 } 2335 2336 /** 2337 * Returns an ordered range of all the teams associated with the user. 2338 * 2339 * <p> 2340 * 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. 2341 * </p> 2342 * 2343 * @param pk the primary key of the user 2344 * @param start the lower bound of the range of users 2345 * @param end the upper bound of the range of users (not inclusive) 2346 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 2347 * @return the ordered range of teams associated with the user 2348 * @throws SystemException if a system exception occurred 2349 */ 2350 public static java.util.List<com.liferay.portal.model.Team> getTeams( 2351 long pk, int start, int end, 2352 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 2353 throws com.liferay.portal.kernel.exception.SystemException { 2354 return getPersistence().getTeams(pk, start, end, orderByComparator); 2355 } 2356 2357 /** 2358 * Returns the number of teams associated with the user. 2359 * 2360 * @param pk the primary key of the user 2361 * @return the number of teams associated with the user 2362 * @throws SystemException if a system exception occurred 2363 */ 2364 public static int getTeamsSize(long pk) 2365 throws com.liferay.portal.kernel.exception.SystemException { 2366 return getPersistence().getTeamsSize(pk); 2367 } 2368 2369 /** 2370 * Returns <code>true</code> if the team is associated with the user. 2371 * 2372 * @param pk the primary key of the user 2373 * @param teamPK the primary key of the team 2374 * @return <code>true</code> if the team is associated with the user; <code>false</code> otherwise 2375 * @throws SystemException if a system exception occurred 2376 */ 2377 public static boolean containsTeam(long pk, long teamPK) 2378 throws com.liferay.portal.kernel.exception.SystemException { 2379 return getPersistence().containsTeam(pk, teamPK); 2380 } 2381 2382 /** 2383 * Returns <code>true</code> if the user has any teams associated with it. 2384 * 2385 * @param pk the primary key of the user to check for associations with teams 2386 * @return <code>true</code> if the user has any teams associated with it; <code>false</code> otherwise 2387 * @throws SystemException if a system exception occurred 2388 */ 2389 public static boolean containsTeams(long pk) 2390 throws com.liferay.portal.kernel.exception.SystemException { 2391 return getPersistence().containsTeams(pk); 2392 } 2393 2394 /** 2395 * Adds an association between the user and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2396 * 2397 * @param pk the primary key of the user 2398 * @param teamPK the primary key of the team 2399 * @throws SystemException if a system exception occurred 2400 */ 2401 public static void addTeam(long pk, long teamPK) 2402 throws com.liferay.portal.kernel.exception.SystemException { 2403 getPersistence().addTeam(pk, teamPK); 2404 } 2405 2406 /** 2407 * Adds an association between the user and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2408 * 2409 * @param pk the primary key of the user 2410 * @param team the team 2411 * @throws SystemException if a system exception occurred 2412 */ 2413 public static void addTeam(long pk, com.liferay.portal.model.Team team) 2414 throws com.liferay.portal.kernel.exception.SystemException { 2415 getPersistence().addTeam(pk, team); 2416 } 2417 2418 /** 2419 * Adds an association between the user and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2420 * 2421 * @param pk the primary key of the user 2422 * @param teamPKs the primary keys of the teams 2423 * @throws SystemException if a system exception occurred 2424 */ 2425 public static void addTeams(long pk, long[] teamPKs) 2426 throws com.liferay.portal.kernel.exception.SystemException { 2427 getPersistence().addTeams(pk, teamPKs); 2428 } 2429 2430 /** 2431 * Adds an association between the user and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2432 * 2433 * @param pk the primary key of the user 2434 * @param teams the teams 2435 * @throws SystemException if a system exception occurred 2436 */ 2437 public static void addTeams(long pk, 2438 java.util.List<com.liferay.portal.model.Team> teams) 2439 throws com.liferay.portal.kernel.exception.SystemException { 2440 getPersistence().addTeams(pk, teams); 2441 } 2442 2443 /** 2444 * Clears all associations between the user and its teams. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2445 * 2446 * @param pk the primary key of the user to clear the associated teams from 2447 * @throws SystemException if a system exception occurred 2448 */ 2449 public static void clearTeams(long pk) 2450 throws com.liferay.portal.kernel.exception.SystemException { 2451 getPersistence().clearTeams(pk); 2452 } 2453 2454 /** 2455 * Removes the association between the user and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2456 * 2457 * @param pk the primary key of the user 2458 * @param teamPK the primary key of the team 2459 * @throws SystemException if a system exception occurred 2460 */ 2461 public static void removeTeam(long pk, long teamPK) 2462 throws com.liferay.portal.kernel.exception.SystemException { 2463 getPersistence().removeTeam(pk, teamPK); 2464 } 2465 2466 /** 2467 * Removes the association between the user and the team. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2468 * 2469 * @param pk the primary key of the user 2470 * @param team the team 2471 * @throws SystemException if a system exception occurred 2472 */ 2473 public static void removeTeam(long pk, com.liferay.portal.model.Team team) 2474 throws com.liferay.portal.kernel.exception.SystemException { 2475 getPersistence().removeTeam(pk, team); 2476 } 2477 2478 /** 2479 * Removes the association between the user and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2480 * 2481 * @param pk the primary key of the user 2482 * @param teamPKs the primary keys of the teams 2483 * @throws SystemException if a system exception occurred 2484 */ 2485 public static void removeTeams(long pk, long[] teamPKs) 2486 throws com.liferay.portal.kernel.exception.SystemException { 2487 getPersistence().removeTeams(pk, teamPKs); 2488 } 2489 2490 /** 2491 * Removes the association between the user and the teams. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2492 * 2493 * @param pk the primary key of the user 2494 * @param teams the teams 2495 * @throws SystemException if a system exception occurred 2496 */ 2497 public static void removeTeams(long pk, 2498 java.util.List<com.liferay.portal.model.Team> teams) 2499 throws com.liferay.portal.kernel.exception.SystemException { 2500 getPersistence().removeTeams(pk, teams); 2501 } 2502 2503 /** 2504 * Sets the teams associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2505 * 2506 * @param pk the primary key of the user 2507 * @param teamPKs the primary keys of the teams to be associated with the user 2508 * @throws SystemException if a system exception occurred 2509 */ 2510 public static void setTeams(long pk, long[] teamPKs) 2511 throws com.liferay.portal.kernel.exception.SystemException { 2512 getPersistence().setTeams(pk, teamPKs); 2513 } 2514 2515 /** 2516 * Sets the teams associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2517 * 2518 * @param pk the primary key of the user 2519 * @param teams the teams to be associated with the user 2520 * @throws SystemException if a system exception occurred 2521 */ 2522 public static void setTeams(long pk, 2523 java.util.List<com.liferay.portal.model.Team> teams) 2524 throws com.liferay.portal.kernel.exception.SystemException { 2525 getPersistence().setTeams(pk, teams); 2526 } 2527 2528 /** 2529 * Returns all the user groups associated with the user. 2530 * 2531 * @param pk the primary key of the user 2532 * @return the user groups associated with the user 2533 * @throws SystemException if a system exception occurred 2534 */ 2535 public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 2536 long pk) throws com.liferay.portal.kernel.exception.SystemException { 2537 return getPersistence().getUserGroups(pk); 2538 } 2539 2540 /** 2541 * Returns a range of all the user groups associated with the user. 2542 * 2543 * <p> 2544 * 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. 2545 * </p> 2546 * 2547 * @param pk the primary key of the user 2548 * @param start the lower bound of the range of users 2549 * @param end the upper bound of the range of users (not inclusive) 2550 * @return the range of user groups associated with the user 2551 * @throws SystemException if a system exception occurred 2552 */ 2553 public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 2554 long pk, int start, int end) 2555 throws com.liferay.portal.kernel.exception.SystemException { 2556 return getPersistence().getUserGroups(pk, start, end); 2557 } 2558 2559 /** 2560 * Returns an ordered range of all the user groups associated with the user. 2561 * 2562 * <p> 2563 * 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. 2564 * </p> 2565 * 2566 * @param pk the primary key of the user 2567 * @param start the lower bound of the range of users 2568 * @param end the upper bound of the range of users (not inclusive) 2569 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 2570 * @return the ordered range of user groups associated with the user 2571 * @throws SystemException if a system exception occurred 2572 */ 2573 public static java.util.List<com.liferay.portal.model.UserGroup> getUserGroups( 2574 long pk, int start, int end, 2575 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 2576 throws com.liferay.portal.kernel.exception.SystemException { 2577 return getPersistence().getUserGroups(pk, start, end, orderByComparator); 2578 } 2579 2580 /** 2581 * Returns the number of user groups associated with the user. 2582 * 2583 * @param pk the primary key of the user 2584 * @return the number of user groups associated with the user 2585 * @throws SystemException if a system exception occurred 2586 */ 2587 public static int getUserGroupsSize(long pk) 2588 throws com.liferay.portal.kernel.exception.SystemException { 2589 return getPersistence().getUserGroupsSize(pk); 2590 } 2591 2592 /** 2593 * Returns <code>true</code> if the user group is associated with the user. 2594 * 2595 * @param pk the primary key of the user 2596 * @param userGroupPK the primary key of the user group 2597 * @return <code>true</code> if the user group is associated with the user; <code>false</code> otherwise 2598 * @throws SystemException if a system exception occurred 2599 */ 2600 public static boolean containsUserGroup(long pk, long userGroupPK) 2601 throws com.liferay.portal.kernel.exception.SystemException { 2602 return getPersistence().containsUserGroup(pk, userGroupPK); 2603 } 2604 2605 /** 2606 * Returns <code>true</code> if the user has any user groups associated with it. 2607 * 2608 * @param pk the primary key of the user to check for associations with user groups 2609 * @return <code>true</code> if the user has any user groups associated with it; <code>false</code> otherwise 2610 * @throws SystemException if a system exception occurred 2611 */ 2612 public static boolean containsUserGroups(long pk) 2613 throws com.liferay.portal.kernel.exception.SystemException { 2614 return getPersistence().containsUserGroups(pk); 2615 } 2616 2617 /** 2618 * Adds an association between the user and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2619 * 2620 * @param pk the primary key of the user 2621 * @param userGroupPK the primary key of the user group 2622 * @throws SystemException if a system exception occurred 2623 */ 2624 public static void addUserGroup(long pk, long userGroupPK) 2625 throws com.liferay.portal.kernel.exception.SystemException { 2626 getPersistence().addUserGroup(pk, userGroupPK); 2627 } 2628 2629 /** 2630 * Adds an association between the user and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2631 * 2632 * @param pk the primary key of the user 2633 * @param userGroup the user group 2634 * @throws SystemException if a system exception occurred 2635 */ 2636 public static void addUserGroup(long pk, 2637 com.liferay.portal.model.UserGroup userGroup) 2638 throws com.liferay.portal.kernel.exception.SystemException { 2639 getPersistence().addUserGroup(pk, userGroup); 2640 } 2641 2642 /** 2643 * Adds an association between the user and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2644 * 2645 * @param pk the primary key of the user 2646 * @param userGroupPKs the primary keys of the user groups 2647 * @throws SystemException if a system exception occurred 2648 */ 2649 public static void addUserGroups(long pk, long[] userGroupPKs) 2650 throws com.liferay.portal.kernel.exception.SystemException { 2651 getPersistence().addUserGroups(pk, userGroupPKs); 2652 } 2653 2654 /** 2655 * Adds an association between the user and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2656 * 2657 * @param pk the primary key of the user 2658 * @param userGroups the user groups 2659 * @throws SystemException if a system exception occurred 2660 */ 2661 public static void addUserGroups(long pk, 2662 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 2663 throws com.liferay.portal.kernel.exception.SystemException { 2664 getPersistence().addUserGroups(pk, userGroups); 2665 } 2666 2667 /** 2668 * Clears all associations between the user and its user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2669 * 2670 * @param pk the primary key of the user to clear the associated user groups from 2671 * @throws SystemException if a system exception occurred 2672 */ 2673 public static void clearUserGroups(long pk) 2674 throws com.liferay.portal.kernel.exception.SystemException { 2675 getPersistence().clearUserGroups(pk); 2676 } 2677 2678 /** 2679 * Removes the association between the user and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2680 * 2681 * @param pk the primary key of the user 2682 * @param userGroupPK the primary key of the user group 2683 * @throws SystemException if a system exception occurred 2684 */ 2685 public static void removeUserGroup(long pk, long userGroupPK) 2686 throws com.liferay.portal.kernel.exception.SystemException { 2687 getPersistence().removeUserGroup(pk, userGroupPK); 2688 } 2689 2690 /** 2691 * Removes the association between the user and the user group. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2692 * 2693 * @param pk the primary key of the user 2694 * @param userGroup the user group 2695 * @throws SystemException if a system exception occurred 2696 */ 2697 public static void removeUserGroup(long pk, 2698 com.liferay.portal.model.UserGroup userGroup) 2699 throws com.liferay.portal.kernel.exception.SystemException { 2700 getPersistence().removeUserGroup(pk, userGroup); 2701 } 2702 2703 /** 2704 * Removes the association between the user and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2705 * 2706 * @param pk the primary key of the user 2707 * @param userGroupPKs the primary keys of the user groups 2708 * @throws SystemException if a system exception occurred 2709 */ 2710 public static void removeUserGroups(long pk, long[] userGroupPKs) 2711 throws com.liferay.portal.kernel.exception.SystemException { 2712 getPersistence().removeUserGroups(pk, userGroupPKs); 2713 } 2714 2715 /** 2716 * Removes the association between the user and the user groups. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2717 * 2718 * @param pk the primary key of the user 2719 * @param userGroups the user groups 2720 * @throws SystemException if a system exception occurred 2721 */ 2722 public static void removeUserGroups(long pk, 2723 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 2724 throws com.liferay.portal.kernel.exception.SystemException { 2725 getPersistence().removeUserGroups(pk, userGroups); 2726 } 2727 2728 /** 2729 * Sets the user groups associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2730 * 2731 * @param pk the primary key of the user 2732 * @param userGroupPKs the primary keys of the user groups to be associated with the user 2733 * @throws SystemException if a system exception occurred 2734 */ 2735 public static void setUserGroups(long pk, long[] userGroupPKs) 2736 throws com.liferay.portal.kernel.exception.SystemException { 2737 getPersistence().setUserGroups(pk, userGroupPKs); 2738 } 2739 2740 /** 2741 * Sets the user groups associated with the user, removing and adding associations as necessary. Also notifies the appropriate model listeners and clears the mapping table finder cache. 2742 * 2743 * @param pk the primary key of the user 2744 * @param userGroups the user groups to be associated with the user 2745 * @throws SystemException if a system exception occurred 2746 */ 2747 public static void setUserGroups(long pk, 2748 java.util.List<com.liferay.portal.model.UserGroup> userGroups) 2749 throws com.liferay.portal.kernel.exception.SystemException { 2750 getPersistence().setUserGroups(pk, userGroups); 2751 } 2752 2753 public static UserPersistence getPersistence() { 2754 if (_persistence == null) { 2755 _persistence = (UserPersistence)PortalBeanLocatorUtil.locate(UserPersistence.class.getName()); 2756 2757 ReferenceRegistry.registerReference(UserUtil.class, "_persistence"); 2758 } 2759 2760 return _persistence; 2761 } 2762 2763 public void setPersistence(UserPersistence persistence) { 2764 _persistence = persistence; 2765 2766 ReferenceRegistry.registerReference(UserUtil.class, "_persistence"); 2767 } 2768 2769 private static UserPersistence _persistence; 2770 }